fix: a problem of parser async

This commit is contained in:
Xiaoyu Wang 2022-06-07 13:28:33 +08:00
parent 8a00b3ab86
commit ac0c75ab2d
2 changed files with 9 additions and 5 deletions

View File

@ -110,7 +110,8 @@ static EDealRes collectMetaKeyFromFunction(SCollectMetaKeyFromExprCxt* pCxt, SFu
if (fmIsBuiltinFunc(pFunc->functionName)) {
return TSDB_CODE_SUCCESS;
}
return reserveUdfInCache(pFunc->functionName, pCxt->pComCxt->pMetaCache);
pCxt->errCode = reserveUdfInCache(pFunc->functionName, pCxt->pComCxt->pMetaCache);
return TSDB_CODE_SUCCESS == pCxt->errCode ? DEAL_RES_CONTINUE : DEAL_RES_ERROR;
}
static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, SRealTableNode* pRealTable,

View File

@ -1531,9 +1531,12 @@ typedef struct SInsertParseSyntaxCxt {
static int32_t skipParentheses(SInsertParseSyntaxCxt* pCxt) {
SToken sToken;
int32_t expectRightParenthesis = 1;
while (1) {
NEXT_TOKEN(pCxt->pSql, sToken);
if (TK_NK_RP == sToken.type) {
if (TK_NK_LP == sToken.type) {
++expectRightParenthesis;
} else if (TK_NK_RP == sToken.type && 0 == --expectRightParenthesis) {
break;
}
if (0 == sToken.n) {