fix bug
This commit is contained in:
parent
3d1a0e0e67
commit
cfaa9adc58
|
@ -450,7 +450,6 @@ int doProcessSql(SSqlObj *pSql) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pRes->code != TSDB_CODE_SUCCESS) {
|
if (pRes->code != TSDB_CODE_SUCCESS) {
|
||||||
tscAsyncResultOnError(pSql);
|
|
||||||
return pRes->code;
|
return pRes->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,7 +458,6 @@ int doProcessSql(SSqlObj *pSql) {
|
||||||
// NOTE: if code is TSDB_CODE_SUCCESS, pSql may have been released here already by other threads.
|
// NOTE: if code is TSDB_CODE_SUCCESS, pSql may have been released here already by other threads.
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
pRes->code = code;
|
pRes->code = code;
|
||||||
tscAsyncResultOnError(pSql);
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2287,11 +2287,12 @@ static int32_t tscReissueSubquery(SRetrieveSupport *oriTrs, SSqlObj *pSql, int32
|
||||||
SSqlObj *pNew = tscCreateSTableSubquery(trsupport->pParentSql, trsupport, pSql);
|
SSqlObj *pNew = tscCreateSTableSubquery(trsupport->pParentSql, trsupport, pSql);
|
||||||
if (pNew == NULL) {
|
if (pNew == NULL) {
|
||||||
tscError("%p sub:%p failed to create new subquery due to error:%s, abort retry, vgId:%d, orderOfSub:%d",
|
tscError("%p sub:%p failed to create new subquery due to error:%s, abort retry, vgId:%d, orderOfSub:%d",
|
||||||
trsupport->pParentSql, pSql, tstrerror(terrno), pVgroup->vgId, trsupport->subqueryIndex);
|
oriTrs->pParentSql, pSql, tstrerror(terrno), pVgroup->vgId, oriTrs->subqueryIndex);
|
||||||
|
|
||||||
pParentSql->res.code = terrno;
|
pParentSql->res.code = terrno;
|
||||||
trsupport->numOfRetry = MAX_NUM_OF_SUBQUERY_RETRY;
|
oriTrs->numOfRetry = MAX_NUM_OF_SUBQUERY_RETRY;
|
||||||
|
|
||||||
|
tfree(trsupport);
|
||||||
return pParentSql->res.code;
|
return pParentSql->res.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2299,9 +2300,13 @@ static int32_t tscReissueSubquery(SRetrieveSupport *oriTrs, SSqlObj *pSql, int32
|
||||||
|
|
||||||
// if failed to process sql, let following code handle the pSql
|
// if failed to process sql, let following code handle the pSql
|
||||||
if (ret == TSDB_CODE_SUCCESS) {
|
if (ret == TSDB_CODE_SUCCESS) {
|
||||||
|
tscFreeRetrieveSup(pSql);
|
||||||
taos_free_result(pSql);
|
taos_free_result(pSql);
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
|
pSql->pSubs[trsupport->subqueryIndex] = pSql;
|
||||||
|
tscFreeRetrieveSup(pNew);
|
||||||
|
taos_free_result(pNew);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue