fix bugs founded in regression test(cancel super table query may cause client crash).
This commit is contained in:
parent
86015bfc25
commit
3932d0accd
|
@ -1324,8 +1324,6 @@ void tscKillMetricQuery(SSqlObj *pSql) {
|
|||
taosStopRpcConn(pSql->pSubs[i]->thandle);
|
||||
}
|
||||
|
||||
pSql->numOfSubs = 0;
|
||||
|
||||
/*
|
||||
* 1. if the subqueries are not launched or partially launched, we need to waiting the launched
|
||||
* query return to successfully free allocated resources.
|
||||
|
@ -1571,7 +1569,7 @@ static char *doSerializeTableInfo(SSqlObj *pSql, int32_t numOfMeters, int32_t vn
|
|||
SMeterMeta * pMeterMeta = pMeterMetaInfo->pMeterMeta;
|
||||
SMetricMeta *pMetricMeta = pMeterMetaInfo->pMetricMeta;
|
||||
|
||||
tscTrace("%p vid:%d, query on %d meters", pSql, htons(vnodeId), numOfMeters);
|
||||
tscTrace("%p vid:%d, query on %d meters", pSql, vnodeId, numOfMeters);
|
||||
if (UTIL_METER_IS_NOMRAL_METER(pMeterMetaInfo)) {
|
||||
#ifdef _DEBUG_VIEW
|
||||
tscTrace("%p sid:%d, uid:%" PRIu64, pSql, pMeterMetaInfo->pMeterMeta->sid, pMeterMetaInfo->pMeterMeta->uid);
|
||||
|
|
|
@ -2891,7 +2891,6 @@ static int64_t getOldestKey(int32_t numOfFiles, int64_t fileId, SVnodeCfg *pCfg)
|
|||
}
|
||||
|
||||
bool isQueryKilled(SQuery *pQuery) {
|
||||
return false;
|
||||
SQInfo *pQInfo = (SQInfo *)GET_QINFO_ADDR(pQuery);
|
||||
|
||||
/*
|
||||
|
@ -5878,13 +5877,13 @@ void disableFunctForTableSuppleScan(SQueryRuntimeEnv *pRuntimeEnv, int32_t order
|
|||
|
||||
// group by normal columns and interval query on normal table
|
||||
for (int32_t i = 0; i < pQuery->numOfOutputCols; ++i) {
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1;
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1u;
|
||||
}
|
||||
|
||||
SWindowResInfo *pWindowResInfo = &pRuntimeEnv->windowResInfo;
|
||||
doDisableFunctsForSupplementaryScan(pQuery, pWindowResInfo, order);
|
||||
|
||||
pQuery->order.order = pQuery->order.order ^ 1;
|
||||
pQuery->order.order = pQuery->order.order ^ 1u;
|
||||
}
|
||||
|
||||
void disableFunctForSuppleScan(STableQuerySupportObj *pSupporter, int32_t order) {
|
||||
|
@ -5900,24 +5899,24 @@ void disableFunctForSuppleScan(STableQuerySupportObj *pSupporter, int32_t order)
|
|||
}
|
||||
} else {
|
||||
for (int32_t i = 0; i < pQuery->numOfOutputCols; ++i) {
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1;
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1u;
|
||||
}
|
||||
|
||||
SWindowResInfo *pWindowResInfo = &pRuntimeEnv->windowResInfo;
|
||||
doDisableFunctsForSupplementaryScan(pQuery, pWindowResInfo, order);
|
||||
}
|
||||
|
||||
pQuery->order.order = pQuery->order.order ^ 1;
|
||||
pQuery->order.order = (pQuery->order.order) ^ 1u;
|
||||
}
|
||||
|
||||
void enableFunctForMasterScan(SQueryRuntimeEnv *pRuntimeEnv, int32_t order) {
|
||||
SQuery *pQuery = pRuntimeEnv->pQuery;
|
||||
|
||||
for (int32_t i = 0; i < pQuery->numOfOutputCols; ++i) {
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1;
|
||||
pRuntimeEnv->pCtx[i].order = (pRuntimeEnv->pCtx[i].order) ^ 1u;
|
||||
}
|
||||
|
||||
pQuery->order.order = (pQuery->order.order ^ 1);
|
||||
pQuery->order.order = (pQuery->order.order) ^ 1u;
|
||||
}
|
||||
|
||||
void createQueryResultInfo(SQuery *pQuery, SWindowResult *pResultRow, bool isSTableQuery, SPosInfo *posInfo) {
|
||||
|
@ -6045,7 +6044,7 @@ void forwardCtxOutputBuf(SQueryRuntimeEnv *pRuntimeEnv, int64_t output) {
|
|||
*
|
||||
* diff function is handled in multi-output function
|
||||
*/
|
||||
pRuntimeEnv->pCtx[j].ptsOutputBuf += TSDB_KEYSIZE * output /* * factor*/;
|
||||
pRuntimeEnv->pCtx[j].ptsOutputBuf += TSDB_KEYSIZE * output;
|
||||
}
|
||||
|
||||
resetResultInfo(pRuntimeEnv->pCtx[j].resultInfo);
|
||||
|
@ -6121,7 +6120,7 @@ static void queryStatusSave(SQueryRuntimeEnv *pRuntimeEnv, SQueryStatus *pStatus
|
|||
pStatus->cur = tsBufGetCursor(pRuntimeEnv->pTSBuf); // save the cursor
|
||||
|
||||
if (pRuntimeEnv->pTSBuf) {
|
||||
pRuntimeEnv->pTSBuf->cur.order ^= 1;
|
||||
pRuntimeEnv->pTSBuf->cur.order ^= 1u;
|
||||
tsBufNextPos(pRuntimeEnv->pTSBuf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue