From 842217e77d7848c754b522c074b7dec99b9886a6 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 22 Nov 2022 18:53:48 +0800 Subject: [PATCH] fix: crash issue caused by insert from query clause --- source/client/src/clientMain.c | 2 ++ source/libs/executor/src/dataInserter.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 0aa88382fe..423cfcdc5b 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -1106,6 +1106,8 @@ int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId return terrno; } + pRequest->syncQuery = true; + STscObj *pTscObj = pRequest->pTscObj; SCatalog *pCtg = NULL; code = catalogGetHandle(pTscObj->pAppInfo->clusterId, &pCtg); diff --git a/source/libs/executor/src/dataInserter.c b/source/libs/executor/src/dataInserter.c index 78afdd16b7..09ca1d27b9 100644 --- a/source/libs/executor/src/dataInserter.c +++ b/source/libs/executor/src/dataInserter.c @@ -250,6 +250,8 @@ static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput, return code; } + taosArrayClear(pInserter->pDataBlocks); + code = sendSubmitRequest(pInserter, pMsg, pInserter->pParam->readHandle->pMsgCb->clientRpc, &pInserter->pNode->epSet); if (code) { return code; -- GitLab