diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 5b2d598222019042b3d946396d1a6262868f2d79..db3b679f93276336aae192cdd453a07f367ffc9f 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -262,7 +262,8 @@ typedef struct { uint8_t msgType; char reserve1[3]; // fix bus error on arm32 bool autoCreated; // create table if it is not existed during retrieve table meta in mnode - + bool subCmd; + union { int32_t count; int32_t numOfTablesInSubmit; diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 27279aaaeeb47e36a7204abef41f5ada930bbcae..a034de17142ee45f2824d28aea2963febae25c49 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -497,7 +497,11 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool removeMeta) { pCmd->pTableBlockHashList = tscDestroyBlockHashTable(pCmd->pTableBlockHashList, removeMeta); pCmd->pDataBlocks = tscDestroyBlockArrayList(pCmd->pDataBlocks); - pCmd->pUdfInfo = tscDestroyUdfArrayList(pCmd->pUdfInfo); + if (pCmd->subCmd) { + pCmd->pUdfInfo = taosArrayDestroy(pCmd->pUdfInfo); + } else { + pCmd->pUdfInfo = tscDestroyUdfArrayList(pCmd->pUdfInfo); + } tscFreeQueryInfo(pCmd, removeMeta); } @@ -2281,6 +2285,8 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t SSqlCmd* pnCmd = &pNew->cmd; memcpy(pnCmd, pCmd, sizeof(SSqlCmd)); + + pnCmd->subCmd = true; pnCmd->command = cmd; pnCmd->payload = NULL; diff --git a/src/query/inc/qUdf.h b/src/query/inc/qUdf.h index 26573cb743f1897da21928ddbd80b0e151b1b122..c66ca5a21b9ba8825a72bcc618dc8d19fbc1b316 100644 --- a/src/query/inc/qUdf.h +++ b/src/query/inc/qUdf.h @@ -51,6 +51,8 @@ typedef struct SUdfInfo { SUdfInit init; char *content; char *path; + + bool cloned; } SUdfInfo; //script