fix invalid write when assign the ip address at the client side.
This commit is contained in:
parent
df3c457341
commit
dfd3402797
|
@ -283,8 +283,15 @@ void tscAsyncFetchSingleRowProxy(void *param, TAOS_RES *tres, int numOfRows) {
|
|||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pCmd->numOfCols; ++i)
|
||||
pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pQueryInfo, i) + pRes->bytes[i] * pRes->row;
|
||||
for (int i = 0; i < pCmd->numOfCols; ++i){
|
||||
SSqlExpr* pExpr = pQueryInfo->fieldsInfo.pSqlExpr[i];
|
||||
if (pExpr != NULL) {
|
||||
pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pQueryInfo, i) + pExpr->resBytes * pRes->row;
|
||||
} else {
|
||||
//todo add
|
||||
}
|
||||
}
|
||||
|
||||
pRes->row++;
|
||||
|
||||
(*pSql->fetchFp)(pSql->param, pSql, pSql->res.tsrow);
|
||||
|
@ -298,7 +305,12 @@ void tscProcessFetchRow(SSchedMsg *pMsg) {
|
|||
SQueryInfo *pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex);
|
||||
|
||||
for (int i = 0; i < pCmd->numOfCols; ++i) {
|
||||
pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pQueryInfo, i) + pRes->bytes[i] * pRes->row;
|
||||
SSqlExpr* pExpr = pQueryInfo->fieldsInfo.pSqlExpr[i];
|
||||
if (pExpr != NULL) {
|
||||
pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pQueryInfo, i) + pExpr->resBytes * pRes->row;
|
||||
} else {
|
||||
//todo add
|
||||
}
|
||||
}
|
||||
|
||||
pRes->row++;
|
||||
|
|
|
@ -254,6 +254,8 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
|
|||
|
||||
while (pSql->retry < pSql->maxRetry) {
|
||||
(pSql->retry)++;
|
||||
pSql->index = pSql->index%TSDB_VNODES_SUPPORT;
|
||||
|
||||
char ipstr[40] = {0};
|
||||
if (pVPeersDesc[pSql->index].ip == 0) {
|
||||
/*
|
||||
|
|
|
@ -203,6 +203,9 @@ SMeterSidExtInfo* tscGetMeterSidInfo(SVnodeSidList* pSidList, int32_t idx) {
|
|||
tscError("illegal sidIdx:%d, reset to 0, sidIdx range:%d-%d", idx, 0, sidRange);
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
assert(pSidList->pSidExtInfoList[idx] >= 0);
|
||||
|
||||
return (SMeterSidExtInfo*)(pSidList->pSidExtInfoList[idx] + (char*)pSidList);
|
||||
}
|
||||
|
||||
|
|
|
@ -947,12 +947,6 @@ static void vnodeMultiMeterQueryProcessor(SQInfo *pQInfo) {
|
|||
dTrace("QInfo:%p main scan completed, elapsed time: %lldms, supplementary scan start, order:%d", pQInfo, et - st,
|
||||
pQuery->order.order ^ 1);
|
||||
|
||||
// failed to save all intermediate results into disk, abort further query processing
|
||||
// if (doCloseAllOpenedResults(pSupporter) != TSDB_CODE_SUCCESS) {
|
||||
// dError("QInfo:%p failed to save intermediate results, abort further query processing", pQInfo);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (pQuery->intervalTime > 0) {
|
||||
for (int32_t i = 0; i < pSupporter->numOfMeters; ++i) {
|
||||
SMeterQueryInfo *pMeterQueryInfo = pSupporter->pMeterDataInfo[i].pMeterQInfo;
|
||||
|
|
Loading…
Reference in New Issue