[td-225]
This commit is contained in:
parent
55ee78683b
commit
c93345be15
|
@ -332,7 +332,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcIpSet *pIpSet) {
|
||||||
rpcMsg->code = (*tscProcessMsgRsp[pCmd->command])(pSql);
|
rpcMsg->code = (*tscProcessMsgRsp[pCmd->command])(pSql);
|
||||||
|
|
||||||
if (rpcMsg->code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (rpcMsg->code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
rpcMsg->code = pRes->code ? pRes->code : pRes->numOfRows;
|
rpcMsg->code = (pRes->code == TSDB_CODE_SUCCESS) ? pRes->numOfRows: pRes->code;
|
||||||
|
|
||||||
tscTrace("%p SQL result:%s res:%p", pSql, tstrerror(pRes->code), pSql);
|
tscTrace("%p SQL result:%s res:%p", pSql, tstrerror(pRes->code), pSql);
|
||||||
bool shouldFree = tscShouldBeFreed(pSql);
|
bool shouldFree = tscShouldBeFreed(pSql);
|
||||||
|
@ -2330,7 +2330,7 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pRes->row = 0;
|
pRes->row = 0;
|
||||||
tscTrace("%p numOfRows:%d, offset:%d", pSql, pRes->numOfRows, pRes->offset);
|
tscTrace("%p numOfRows:%d, offset:%d, complete:%d", pSql, pRes->numOfRows, pRes->offset, pRes->completed);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1557,8 +1557,8 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR
|
||||||
assert(pRes->numOfRows == numOfRows);
|
assert(pRes->numOfRows == numOfRows);
|
||||||
int64_t num = atomic_add_fetch_64(&pState->numOfRetrievedRows, numOfRows);
|
int64_t num = atomic_add_fetch_64(&pState->numOfRetrievedRows, numOfRows);
|
||||||
|
|
||||||
// tscTrace("%p sub:%p retrieve numOfRows:%d totalNumOfRows:%d from ip:%u,vid:%d,orderOfSub:%d", pPObj, pSql,
|
tscTrace("%p sub:%p retrieve numOfRows:%d totalNumOfRows:%d from ip:%s, orderOfSub:%d", pPObj, pSql,
|
||||||
// pRes->numOfRows, pState->numOfRetrievedRows, pSvd->ip, pSvd->vnode, idx);
|
pRes->numOfRows, pState->numOfRetrievedRows, pSql->ipList.fqdn[pSql->ipList.inUse], idx);
|
||||||
|
|
||||||
if (num > tsMaxNumOfOrderedResults && tscIsProjectionQueryOnSTable(pQueryInfo, 0)) {
|
if (num > tsMaxNumOfOrderedResults && tscIsProjectionQueryOnSTable(pQueryInfo, 0)) {
|
||||||
tscError("%p sub:%p num of OrderedRes is too many, max allowed:%" PRId64 " , current:%" PRId64,
|
tscError("%p sub:%p num of OrderedRes is too many, max allowed:%" PRId64 " , current:%" PRId64,
|
||||||
|
@ -1713,6 +1713,11 @@ static void multiVnodeInsertMerge(void* param, TAOS_RES* tres, int numOfRows) {
|
||||||
// increase the total inserted rows
|
// increase the total inserted rows
|
||||||
if (numOfRows > 0) {
|
if (numOfRows > 0) {
|
||||||
pParentObj->res.numOfRows += numOfRows;
|
pParentObj->res.numOfRows += numOfRows;
|
||||||
|
} else {
|
||||||
|
SSqlObj* pSql = (SSqlObj*) tres;
|
||||||
|
assert(pSql != NULL && pSql->res.code == numOfRows);
|
||||||
|
|
||||||
|
pParentObj->res.code = pSql->res.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
taos_free_result(tres);
|
taos_free_result(tres);
|
||||||
|
@ -1947,7 +1952,8 @@ void **doSetResultRowData(SSqlObj *pSql, bool finalResult) {
|
||||||
|
|
||||||
SQueryInfo *pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex);
|
SQueryInfo *pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex);
|
||||||
|
|
||||||
for (int i = 0; i < tscNumOfFields(pQueryInfo); ++i) {
|
size_t size = tscNumOfFields(pQueryInfo);
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
SFieldSupInfo* pSup = tscFieldInfoGetSupp(&pQueryInfo->fieldsInfo, i);
|
SFieldSupInfo* pSup = tscFieldInfoGetSupp(&pQueryInfo->fieldsInfo, i);
|
||||||
if (pSup->pSqlExpr != NULL) {
|
if (pSup->pSqlExpr != NULL) {
|
||||||
tscGetResultColumnChr(pRes, &pQueryInfo->fieldsInfo, i);
|
tscGetResultColumnChr(pRes, &pQueryInfo->fieldsInfo, i);
|
||||||
|
|
Loading…
Reference in New Issue