Merge pull request #2372 from taosdata/hotfix/TD-701

fixbug TD-701
This commit is contained in:
haojun Liao 2020-06-20 11:32:05 +08:00 committed by GitHub
commit f8cf2d81ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1864,6 +1864,7 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
pParentObj->res.code = pSql->res.code;
}
// it is not the initial sqlObj, free it
if (tres != pParentObj) {
taos_free_result(tres);
@ -1901,8 +1902,9 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
tscTrace("%p submit data to %d vnode(s)", pSql, pDataBlocks->nSize);
SSubqueryState *pState = calloc(1, sizeof(SSubqueryState));
pState->numOfTotal = pSql->numOfSubs;
pState->numOfRemain = pState->numOfTotal;
pState->numOfRemain = pSql->numOfSubs;
pRes->code = TSDB_CODE_SUCCESS;
SInsertSupporter* pSupporter = calloc(1, sizeof(SInsertSupporter));