fix bug
This commit is contained in:
parent
6adcba9dd7
commit
b65bc4dc18
|
@ -2731,8 +2731,7 @@ void tscHandleSubqueryError(SRetrieveSupport *trsupport, SSqlObj *pSql, int numO
|
||||||
|
|
||||||
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
|
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
|
||||||
|
|
||||||
doCleanupSubqueries(userSql, userSql->subState.numOfSub);
|
tscFreeSubobj(userSql);
|
||||||
userSql->subState.numOfSub = 0;
|
|
||||||
|
|
||||||
pParentSql->res.code = TSDB_CODE_SUCCESS;
|
pParentSql->res.code = TSDB_CODE_SUCCESS;
|
||||||
pParentSql->retry++;
|
pParentSql->retry++;
|
||||||
|
|
|
@ -3767,8 +3767,7 @@ static void tscSubqueryCompleteCallback(void* param, TAOS_RES* tres, int code) {
|
||||||
|
|
||||||
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
|
SSqlObj *userSql = ((SRetrieveSupport*)pParentSql->param)->pParentSql;
|
||||||
|
|
||||||
doCleanupSubqueries(userSql, userSql->subState.numOfSub);
|
tscFreeSubobj(userSql);
|
||||||
userSql->subState.numOfSub = 0;
|
|
||||||
|
|
||||||
pParentSql->res.code = TSDB_CODE_SUCCESS;
|
pParentSql->res.code = TSDB_CODE_SUCCESS;
|
||||||
pParentSql->retry++;
|
pParentSql->retry++;
|
||||||
|
@ -3815,6 +3814,7 @@ void executeQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) {
|
||||||
pSql->subState.numOfSub = (int32_t) taosArrayGetSize(pQueryInfo->pUpstream);
|
pSql->subState.numOfSub = (int32_t) taosArrayGetSize(pQueryInfo->pUpstream);
|
||||||
assert(pSql->pSubs == NULL);
|
assert(pSql->pSubs == NULL);
|
||||||
pSql->pSubs = calloc(pSql->subState.numOfSub, POINTER_BYTES);
|
pSql->pSubs = calloc(pSql->subState.numOfSub, POINTER_BYTES);
|
||||||
|
assert(pSql->subState.states == NULL);
|
||||||
pSql->subState.states = calloc(pSql->subState.numOfSub, sizeof(int8_t));
|
pSql->subState.states = calloc(pSql->subState.numOfSub, sizeof(int8_t));
|
||||||
code = pthread_mutex_init(&pSql->subState.mutex, NULL);
|
code = pthread_mutex_init(&pSql->subState.mutex, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue