diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 29887115b966964ef1bc3eb2abf9bc9c05a4e933..329d715aafba85cea3e8666276015d6c911c46dc 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -936,6 +936,8 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { tscError("0x%" PRIx64 " error happens, code:%d - %s, reqId:0x%" PRIx64, pRequest->self, code, tstrerror(code), pRequest->requestId); destorySqlCallbackWrapper(pWrapper); + qDestroyQuery(pRequest->pQuery); + pRequest->pQuery = NULL; if (NEED_CLIENT_HANDLE_ERROR(code)) { tscDebug("0x%" PRIx64 " client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%" PRIx64, diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index ff0621c09ea019ee18e9529d9e99b857e38ae284..36420599b3823339bd5fb5f53d0c4a9c93c47ea4 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -1782,10 +1782,6 @@ static int32_t setVnodeModifOpStmt(SInsertParseContext* pCxt, SCatalogReq* pCata SVnodeModifOpStmt* pStmt) { clearCatalogReq(pCatalogReq); - if (NULL == pMetaData) { - return TSDB_CODE_SUCCESS; - } - if (pStmt->usingTableProcessing) { return getTableSchemaFromMetaData(pCxt, pMetaData, pStmt, true); }