未验证 提交 34a0181d 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #12183 from taosdata/fix/TD-15259

fix: core dump due to state window scan backwards
......@@ -6967,6 +6967,9 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI
STableQueryInfo* item = pRuntimeEnv->current;
SColumnInfoData* pColInfoData = taosArrayGet(pSDataBlock->pDataBlock, pInfo->colIndex);
SQueryAttr *pQueryAttr = pRuntimeEnv->pQueryAttr;
bool ascQuery = QUERY_IS_ASC_QUERY(pQueryAttr);
SOptrBasicInfo* pBInfo = &pInfo->binfo;
bool masterScan = IS_MASTER_SCAN(pRuntimeEnv);
......@@ -7010,7 +7013,10 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI
if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code
longjmp(pRuntimeEnv->env, TSDB_CODE_QRY_APP_ERROR);
}
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, pInfo->start, pInfo->numOfRows, tsList,
int32_t forwardStep = pInfo->numOfRows;
int32_t offset = (ascQuery) ? pInfo->start : pInfo->start + forwardStep - 1;
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, offset, forwardStep, tsList,
pSDataBlock->info.rows, pOperator->numOfOutput);
pInfo->curWindow.skey = tsList[j];
......@@ -7030,7 +7036,9 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI
longjmp(pRuntimeEnv->env, TSDB_CODE_QRY_APP_ERROR);
}
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, pInfo->start, pInfo->numOfRows, tsList,
int32_t forwardStep = pInfo->numOfRows;
int32_t offset = (ascQuery) ? pInfo->start : pInfo->start + forwardStep - 1;
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, offset, forwardStep, tsList,
pSDataBlock->info.rows, pOperator->numOfOutput);
}
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -807,6 +807,7 @@
3,,develop-test,python3 ./test.py -f 2-query/nchar_funcs.py
3,,develop-test,python3 ./test.py -f 2-query/TD-5902.py
3,,develop-test,python3 ./test.py -f 2-query/sample_order_desc.py
3,,develop-test,python3 ./test.py -f 2-query/hll_ts_desc.py
1,,develop-test,python3 ./test.py -f 2-query/TD-14196.py
3,,script,./test.sh -f general/compute/scalar_str_concat_len.sim
3,,develop-test,python3 ./test.py -f 2-query/TD-13414.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册