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

Merge pull request #9494 from taosdata/fix/TD-12191-2.4

[TD-12191]<fix>(query, insert): CQ caused taosd stuck in infinite loop when elapsed function used
......@@ -170,6 +170,16 @@ void tscAddIntoStreamList(SSqlStream *pStream) {
STscObj * pObj = pStream->pSql->pTscObj;
pthread_mutex_lock(&pObj->mutex);
//check if newly added stream node is present
//in the streamList to prevent loop in the list
SSqlStream *iter = pObj->streamList;
while (iter) {
if (pStream == iter) {
pthread_mutex_unlock(&pObj->mutex);
return;
}
iter = iter->next;
}
pStream->next = pObj->streamList;
if (pObj->streamList) pObj->streamList->prev = pStream;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册