From f4088889b026ea4f52e332843d0d02f014c4a534 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 20 Jun 2020 11:39:18 +0800 Subject: [PATCH] [td-225] --- src/client/src/tscParseInsert.c | 1 - src/client/src/tscSubquery.c | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index aa9204e62a..b03972bbfa 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -1321,7 +1321,6 @@ int tsParseSql(SSqlObj *pSql, bool initialParse) { int32_t ret = TSDB_CODE_SUCCESS; SSqlCmd* pCmd = &pSql->cmd; - tscTrace("------------------%p, initial:%d, sqlstr:%s", pSql, initialParse, pSql->sqlstr); if (!pCmd->parseFinished) { tscTrace("%p resume to parse sql: %s", pSql, pCmd->curSql); } diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index bb57da86fd..5faa515d40 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1853,18 +1853,17 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows) SSubqueryState* pState = pSupporter->pState; // record the total inserted rows - if (numOfRows > 0) { - if (tres != pParentObj) { + if (numOfRows > 0 && tres != pParentObj) { pParentObj->res.numOfRows += numOfRows; - } - } else { + } + + if (taos_errno(tres) != 0) { SSqlObj* pSql = (SSqlObj*) tres; assert(pSql != NULL && pSql->res.code == numOfRows); pParentObj->res.code = pSql->res.code; } - // it is not the initial sqlObj, free it if (tres != pParentObj) { taos_free_result(tres); -- GitLab