[td-225] minor refactoring.
This commit is contained in:
parent
9ab57b25ec
commit
2405590978
|
@ -6501,8 +6501,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
|
||||||
|
|
||||||
(*pRsp)->numOfRows = htonl((int32_t)pQuery->rec.rows);
|
(*pRsp)->numOfRows = htonl((int32_t)pQuery->rec.rows);
|
||||||
|
|
||||||
int32_t code = pQInfo->code;
|
if (pQInfo->code == TSDB_CODE_SUCCESS) {
|
||||||
if (code == TSDB_CODE_SUCCESS) {
|
|
||||||
(*pRsp)->offset = htobe64(pQuery->limit.offset);
|
(*pRsp)->offset = htobe64(pQuery->limit.offset);
|
||||||
(*pRsp)->useconds = htobe64(pRuntimeEnv->summary.elapsedTime);
|
(*pRsp)->useconds = htobe64(pRuntimeEnv->summary.elapsedTime);
|
||||||
} else {
|
} else {
|
||||||
|
@ -6511,11 +6510,10 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
|
||||||
}
|
}
|
||||||
|
|
||||||
(*pRsp)->precision = htons(pQuery->precision);
|
(*pRsp)->precision = htons(pQuery->precision);
|
||||||
if (pQuery->rec.rows > 0 && code == TSDB_CODE_SUCCESS) {
|
if (pQuery->rec.rows > 0 && pQInfo->code == TSDB_CODE_SUCCESS) {
|
||||||
code = doDumpQueryResult(pQInfo, (*pRsp)->data);
|
doDumpQueryResult(pQInfo, (*pRsp)->data);
|
||||||
} else {
|
} else {
|
||||||
setQueryStatus(pQuery, QUERY_OVER);
|
setQueryStatus(pQuery, QUERY_OVER);
|
||||||
code = pQInfo->code;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pQInfo->rspContext = NULL;
|
pQInfo->rspContext = NULL;
|
||||||
|
@ -6529,7 +6527,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
|
||||||
qDebug("QInfo:%p has more results waits for client retrieve", pQInfo);
|
qDebug("QInfo:%p has more results waits for client retrieve", pQInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return pQInfo->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t qQueryCompleted(qinfo_t qinfo) {
|
int32_t qQueryCompleted(qinfo_t qinfo) {
|
||||||
|
|
Loading…
Reference in New Issue