diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index dca79babce9388d7f2d1750db2c9b8410b23c8d1..fcbfc53660352a90b851fd54a45075907571ad86 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6154,7 +6154,7 @@ SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, goto _clean; } - pInfo->seed = rand(); + pInfo->seed = taosSafeRand(); setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MERGE_STAGE); SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo)); @@ -7778,7 +7778,7 @@ SOperatorInfo* createAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera goto _clean; } - pInfo->seed = rand(); + pInfo->seed = taosSafeRand(); setDefaultOutputBuf(pRuntimeEnv, &pInfo->binfo, pInfo->seed, MASTER_SCAN); SOperatorInfo* pOperator = calloc(1, sizeof(SOperatorInfo)); @@ -7985,7 +7985,7 @@ SOperatorInfo* createProjectOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperato return NULL; } - pInfo->seed = rand(); + pInfo->seed = taosSafeRand(); pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity; SOptrBasicInfo* pBInfo = &pInfo->binfo; @@ -8171,7 +8171,7 @@ SOperatorInfo* createTimeEveryOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera SQueryAttr* pQueryAttr = pRuntimeEnv->pQueryAttr; - pInfo->seed = rand(); + pInfo->seed = taosSafeRand(); pInfo->bufCapacity = pRuntimeEnv->resultInfo.capacity; pInfo->groupDone = true; pInfo->lastGroupIdx = -1;