diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 2ddf843a08..bd9c8d794d 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -2093,8 +2093,9 @@ TAOS_RES* taosQueryImpl(TAOS* taos, const char* sql, bool validateOnly) { taosAsyncQueryImpl(*(int64_t*)taos, sql, syncQueryFn, param, validateOnly); tsem_wait(¶m->sem); - - param->pRequest->syncQuery = true; + if (param->pRequest != NULL) { + param->pRequest->syncQuery = true; + } return param->pRequest; #else size_t sqlLen = strlen(sql); diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index d3a7fc51eb..2bbee57faf 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1337,7 +1337,9 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) { if (pFilterNode == NULL) { return; } - + if (pBlock->info.rows == 0) { + return; + } SFilterInfo* filter = NULL; // todo move to the initialization function