From f0a44b31fc063adc39c4907130d1c95fae624a89 Mon Sep 17 00:00:00 2001 From: slzhou Date: Wed, 25 Oct 2023 09:56:21 +0800 Subject: [PATCH] fix: insert into super table syntax is not supported for stmt --- source/libs/parser/src/parInsertSql.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index ec5aeb950d..65ff043e23 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -2055,6 +2055,9 @@ static int32_t parseInsertStbClauseBottom(SInsertParseContext* pCxt, SVnodeModif // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { + if (pStmt->stbSyntax && (pStmt->insertType, TSDB_QUERY_TYPE_STMT_INSERT)) { + return buildSyntaxErrMsg(&pCxt->msg, "insert into super table syntax is not supported for stmt", NULL); + } if (!pStmt->stbSyntax) { STableDataCxt* pTableCxt = NULL; int32_t code = parseSchemaClauseBottom(pCxt, pStmt, &pTableCxt);