Merge pull request #27864 from taosdata/fix/TD-30813-5

enh(stmt2/gettbname): ignore tbname not set error
This commit is contained in:
Hongze Cheng 2024-09-13 17:13:56 +08:00 committed by GitHub
commit 5b0ed5c559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -1889,7 +1889,12 @@ int stmtGetParamTbName(TAOS_STMT2* stmt, int* nums) {
STMT_ERR_RET(stmtParseSql(pStmt));
}
*nums = STMT_TYPE_MULTI_INSERT == pStmt->sql.type ? 1 : 0;
if (TSDB_CODE_TSC_STMT_TBNAME_ERROR == pStmt->errCode) {
*nums = 1;
pStmt->errCode = TSDB_CODE_SUCCESS;
} else {
*nums = STMT_TYPE_MULTI_INSERT == pStmt->sql.type ? 1 : 0;
}
return TSDB_CODE_SUCCESS;
}