提交 55f179d0 编写于 作者: Z zhihaop 提交者: zhihaop

fix(query): using taosSafeRand() instead of rand()

上级 42b64aa5
...@@ -6154,7 +6154,7 @@ SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, ...@@ -6154,7 +6154,7 @@ SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv,
goto _clean; goto _clean;
} }
pInfo->seed = rand(); pInfo->seed = taosSafeRand();
setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MERGE_STAGE); setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MERGE_STAGE);
SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo)); SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo));
...@@ -7778,7 +7778,7 @@ SOperatorInfo* createAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera ...@@ -7778,7 +7778,7 @@ SOperatorInfo* createAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera
goto _clean; goto _clean;
} }
pInfo->seed = rand(); pInfo->seed = taosSafeRand();
setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MASTER_SCAN); setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MASTER_SCAN);
SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo)); SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo));
...@@ -7985,7 +7985,7 @@ SOperatorInfo* createProjectOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperato ...@@ -7985,7 +7985,7 @@ SOperatorInfo* createProjectOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperato
return NULL; return NULL;
} }
pInfo->seed = rand(); pInfo->seed = taosSafeRand();
pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity; pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity;
SOptrBasicInfo* pBInfo = &pInfo->binfo; SOptrBasicInfo* pBInfo = &pInfo->binfo;
...@@ -8171,7 +8171,7 @@ SOperatorInfo* createTimeEveryOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera ...@@ -8171,7 +8171,7 @@ SOperatorInfo* createTimeEveryOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera
SQueryAttr* pQueryAttr = pRuntimeEnv->pQueryAttr; SQueryAttr* pQueryAttr = pRuntimeEnv->pQueryAttr;
pInfo->seed = rand(); pInfo->seed = taosSafeRand();
pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity; pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity;
pInfo->groupDone = true; pInfo->groupDone = true;
pInfo->lastGroupIdx = -1; pInfo->lastGroupIdx = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册