diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index f39169c193d3483e4db6a35aa42f5187ef1bf723..91ac7a2f3ace7f08bafb5d4620e65f59f0b89480 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -168,6 +168,9 @@ static void tscProcessAsyncRetrieveImpl(void *param, TAOS_RES *tres, int numOfRo } else { pRes->code = numOfRows; } + if (pRes->code == TSDB_CODE_SUCCESS) { + pRes->code = TSDB_CODE_TSC_INVALID_QHANDLE; + } tscAsyncResultOnError(pSql); return; diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index f5d9a6a17e1cf6784355d7e7b6f198dcc1fb9248..edb673d1670ca758f087ab9f83dec7d780531b6b 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -1757,6 +1757,7 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int32_t numOfRow pSql->res.numOfRows = 0; code = doPackSendDataBlock(pSql, pInsertParam, pTableMeta, count, pTableDataBlock); if (code != TSDB_CODE_SUCCESS) { + pParentSql->res.code = code; goto _error; } diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index efdc644f2c8637a48b78f122ab847603609dd3f8..ca55bce82aa7916057a9b8a0ecd1e40734392962 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -2265,7 +2265,7 @@ void tscFirstRoundCallback(void* param, TAOS_RES* tres, int code) { destroySup(pSup); taos_free_result(pSql); - parent->res.code = code; + parent->res.code = c; tscAsyncResultOnError(parent); return; }