Merge pull request #23541 from taosdata/fix/TS-4219.3.0

fix: insert syntax error caused coredump
This commit is contained in:
dapan1121 2023-11-06 08:48:46 +08:00 committed by GitHub
commit 0c4040b48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -166,6 +166,7 @@ static int32_t ignoreUsingClause(SInsertParseContext* pCxt, const char** pSql) {
}
static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pDuplicate) {
int32_t code = TSDB_CODE_SUCCESS;
*pDuplicate = false;
char tbFName[TSDB_TABLE_FNAME_LEN];
@ -173,13 +174,13 @@ static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModify
STableMeta** pMeta = taosHashGet(pStmt->pSubTableHashObj, tbFName, strlen(tbFName));
if (NULL != pMeta) {
*pDuplicate = true;
int32_t code = ignoreUsingClause(pCxt, &pStmt->pSql);
code = ignoreUsingClause(pCxt, &pStmt->pSql);
if (TSDB_CODE_SUCCESS == code) {
return cloneTableMeta(*pMeta, &pStmt->pTableMeta);
}
}
return TSDB_CODE_SUCCESS;
return code;
}
typedef enum {

View File

@ -319,4 +319,7 @@ if $data45 != 30.000000000 then
return -1
endi
sql_error insert into ct1 using stb tags('a', 'b') values ('2022-06-26 13:00:00', 1) ct11 using sta tags('c', 'b#) values ('2022-06-26 13:00:01', 2);
system sh/exec.sh -n dnode1 -s stop -x SIGINT