Merge pull request #20512 from taosdata/fix/TD-23161

fix: client invalid write issue
This commit is contained in:
dapan1121 2023-03-18 08:57:44 +08:00 committed by GitHub
commit cd498627bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -1085,6 +1085,10 @@ static int32_t asyncExecSchQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaDat
tscDebug("0x%" PRIx64 " plan not executed, code:%s 0x%" PRIx64, pRequest->self, tstrerror(code), tscDebug("0x%" PRIx64 " plan not executed, code:%s 0x%" PRIx64, pRequest->self, tstrerror(code),
pRequest->requestId); pRequest->requestId);
destorySqlCallbackWrapper(pWrapper); destorySqlCallbackWrapper(pWrapper);
if (TSDB_CODE_SUCCESS != code) {
pRequest->code = terrno;
}
pRequest->body.queryFp(pRequest->body.param, pRequest, code); pRequest->body.queryFp(pRequest->body.param, pRequest, code);
} }
@ -1132,11 +1136,6 @@ void launchAsyncQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaData* pResultM
pRequest->body.queryFp(pRequest->body.param, pRequest, -1); pRequest->body.queryFp(pRequest->body.param, pRequest, -1);
break; break;
} }
// TODO weired responding code?
if (TSDB_CODE_SUCCESS != code) {
pRequest->code = terrno;
}
} }
int32_t refreshMeta(STscObj* pTscObj, SRequestObj* pRequest) { int32_t refreshMeta(STscObj* pTscObj, SRequestObj* pRequest) {

View File

@ -1422,9 +1422,6 @@ static int32_t translateAggFunc(STranslateContext* pCxt, SFunctionNode* pFunc) {
if (isCountStar(pFunc)) { if (isCountStar(pFunc)) {
return rewriteCountStar(pCxt, pFunc); return rewriteCountStar(pCxt, pFunc);
} }
if (isCountNotNullValue(pFunc)) {
return rewriteCountNotNullValue(pCxt, pFunc);
}
if (isCountTbname(pFunc)) { if (isCountTbname(pFunc)) {
return rewriteCountTbname(pCxt, pFunc); return rewriteCountTbname(pCxt, pFunc);
} }