未验证 提交 ba1cfaf6 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #16719 from taosdata/FIX/TS-1814-2.6

fix: resolve an assertion of index out of range in subAndCheckDone
......@@ -101,13 +101,12 @@ static bool allSubqueryDone(SSqlObj *pParentSql) {
bool subAndCheckDone(SSqlObj *pSql, SSqlObj *pParentSql, int idx) {
SSubqueryState *subState = &pParentSql->subState;
assert(idx < subState->numOfSub);
pthread_mutex_lock(&subState->mutex);
tscDebug("0x%"PRIx64" subquery:0x%"PRIx64", idx:%d state set to 1", pParentSql->self, pSql->self, idx);
subState->states[idx] = 1;
if (idx < subState->numOfSub) {
tscDebug("0x%"PRIx64" subquery:0x%"PRIx64", index:%d state set to 1", pParentSql->self, pSql->self, idx);
subState->states[idx] = 1;
}
bool done = allSubqueryDone(pParentSql);
if (!done) {
tscDebug("0x%"PRIx64" sub:%p,%d completed, total:%d", pParentSql->self, pSql, idx, pParentSql->subState.numOfSub);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册