diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 1af8eaac2eee44831d32f2e2c93dec294dddaaff..1a953cfd3dc3bb3f50d591a6f712cfafb9ea28ed 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -3778,6 +3778,8 @@ static void tscSubqueryCompleteCallback(void* param, TAOS_RES* tres, int code) { tscDebug("0x%"PRIx64" all subquery response received, retry", pParentSql->self); if (code && !((code == TSDB_CODE_TDB_INVALID_TABLE_ID || code == TSDB_CODE_VND_INVALID_VGROUP_ID) && pParentSql->retry < pParentSql->maxRetry)) { + pParentSql->res.code = code; + tscAsyncResultOnError(pParentSql); return; } @@ -3858,6 +3860,7 @@ void executeQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) { pNew->signature = pNew; pNew->sqlstr = strdup(pSql->sqlstr); pNew->fp = tscSubqueryCompleteCallback; + pNew->fetchFp = tscSubqueryCompleteCallback; pNew->maxRetry = pSql->maxRetry; pNew->cmd.resColumnId = TSDB_RES_COL_ID;