fix bug
This commit is contained in:
parent
835b52d931
commit
b1faa56f77
|
@ -1981,6 +1981,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
|
||||||
// set the parameters for the second round query process
|
// set the parameters for the second round query process
|
||||||
SSqlCmd *pPCmd = &pParent->cmd;
|
SSqlCmd *pPCmd = &pParent->cmd;
|
||||||
SQueryInfo *pQueryInfo1 = tscGetQueryInfoDetail(pPCmd, 0);
|
SQueryInfo *pQueryInfo1 = tscGetQueryInfoDetail(pPCmd, 0);
|
||||||
|
int32_t resRows = pSup->numOfRows;
|
||||||
|
|
||||||
if (pSup->numOfRows > 0) {
|
if (pSup->numOfRows > 0) {
|
||||||
SBufferWriter bw = tbufInitWriter(NULL, false);
|
SBufferWriter bw = tbufInitWriter(NULL, false);
|
||||||
|
@ -1999,6 +2000,20 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
|
||||||
|
|
||||||
taos_free_result(pSql);
|
taos_free_result(pSql);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (pSql->cmd.command == TSDB_SQL_RETRIEVE_EMPTY_RESULT) {
|
||||||
|
pParent->cmd.command = TSDB_SQL_RETRIEVE_EMPTY_RESULT;
|
||||||
|
(*pParent->fp)(pParent->param, pParent, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (resRows == 0) {
|
||||||
|
pParent->cmd.command = TSDB_SQL_RETRIEVE_EMPTY_RESULT;
|
||||||
|
(*pParent->fp)(pParent->param, pParent, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pQueryInfo1->round = 1;
|
pQueryInfo1->round = 1;
|
||||||
tscDoQuery(pParent);
|
tscDoQuery(pParent);
|
||||||
}
|
}
|
||||||
|
@ -2510,6 +2525,14 @@ static void tscAllDataRetrievedFromDnode(SRetrieveSupport *trsupport, SSqlObj* p
|
||||||
tscFreeRetrieveSup(pSql);
|
tscFreeRetrieveSup(pSql);
|
||||||
|
|
||||||
// set the command flag must be after the semaphore been correctly set.
|
// set the command flag must be after the semaphore been correctly set.
|
||||||
|
/*
|
||||||
|
if (pParentSql->cmd.command != TSDB_SQL_RETRIEVE_EMPTY_RESULT) {
|
||||||
|
pParentSql->cmd.command = TSDB_SQL_RETRIEVE_LOCALMERGE;
|
||||||
|
} else {
|
||||||
|
pParentSql->res.completed = true;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
pParentSql->cmd.command = TSDB_SQL_RETRIEVE_LOCALMERGE;
|
pParentSql->cmd.command = TSDB_SQL_RETRIEVE_LOCALMERGE;
|
||||||
if (pParentSql->res.code == TSDB_CODE_SUCCESS) {
|
if (pParentSql->res.code == TSDB_CODE_SUCCESS) {
|
||||||
(*pParentSql->fp)(pParentSql->param, pParentSql, 0);
|
(*pParentSql->fp)(pParentSql->param, pParentSql, 0);
|
||||||
|
|
Loading…
Reference in New Issue