Merge pull request #21030 from taosdata/fix/liaohj_main

fix(query): add null ptr check.
This commit is contained in:
Haojun Liao 2023-04-24 12:03:15 +08:00 committed by GitHub
commit 93a329f5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -88,6 +88,10 @@ void getLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo, int64_t *blocks, double
}
void *destroyLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) {
if (pLoadInfo == NULL) {
return NULL;
}
for (int32_t i = 0; i < pLoadInfo->numOfStt; ++i) {
pLoadInfo[i].currentLoadBlockIndex = 1;
pLoadInfo[i].blockIndex[0] = -1;

View File

@ -52,7 +52,7 @@ void streamCleanUp() {
void streamSchedByTimer(void* param, void* tmrId) {
SStreamTask* pTask = (void*)param;
if (atomic_load_8(&pTask->status.taskStatus) == TASK_STATUS__DROPPING) {
if (streamTaskShouldStop(&pTask->status)) {
streamMetaReleaseTask(NULL, pTask);
return;
}

View File

@ -170,7 +170,7 @@ class TMQCom:
if tdSql.getData(i, 1) == 1:
loopFlag = 0
break
time.sleep(0.02)
time.sleep(0.10)
return
def create_database(self,tsql, dbName,dropFlag=1,vgroups=4,replica=1):