提交 b65bc4dc 编写于 作者: W wpan

fix bug

上级 6adcba9d
......@@ -2731,8 +2731,7 @@ void tscHandleSubqueryError(SRetrieveSupport *trsupport, SSqlObj *pSql, int numO
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
doCleanupSubqueries(userSql, userSql->subState.numOfSub);
userSql->subState.numOfSub = 0;
tscFreeSubobj(userSql);
pParentSql->res.code = TSDB_CODE_SUCCESS;
pParentSql->retry++;
......
......@@ -3767,8 +3767,7 @@ static void tscSubqueryCompleteCallback(void* param, TAOS_RES* tres, int code) {
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
doCleanupSubqueries(userSql, userSql->subState.numOfSub);
userSql->subState.numOfSub = 0;
tscFreeSubobj(userSql);
pParentSql->res.code = TSDB_CODE_SUCCESS;
pParentSql->retry++;
......@@ -3815,6 +3814,7 @@ void executeQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) {
pSql->subState.numOfSub = (int32_t) taosArrayGetSize(pQueryInfo->pUpstream);
assert(pSql->pSubs == NULL);
pSql->pSubs = calloc(pSql->subState.numOfSub, POINTER_BYTES);
assert(pSql->subState.states == NULL);
pSql->subState.states = calloc(pSql->subState.numOfSub, sizeof(int8_t));
code = pthread_mutex_init(&pSql->subState.mutex, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册