From 11eb7235d640149c0bf5f70a566dc1b03492db09 Mon Sep 17 00:00:00 2001 From: Jiaqiang Huang <96465211+River2000i@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:15:13 +0800 Subject: [PATCH 1/2] planner/core: fix error information when enter incorrect partition name --- planner/core/preprocess.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner/core/preprocess.go b/planner/core/preprocess.go index 85eaae80e0041..f081a32ac46ef 100644 --- a/planner/core/preprocess.go +++ b/planner/core/preprocess.go @@ -939,7 +939,7 @@ func (p *preprocessor) checkCreateTableGrammar(stmt *ast.CreateTableStmt) { for _, def := range stmt.Partition.Definitions { pName := def.Name.String() if isIncorrectName(pName) { - p.err = dbterror.ErrWrongPartitionName.GenWithStackByArgs(pName) + p.err = dbterror.ErrWrongPartitionName.GenWithStackByArgs() return } } From cea3c26aab3608141c53c19241c26bd984eb68d3 Mon Sep 17 00:00:00 2001 From: Jiaqiang Huang <96465211+River2000i@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:01:29 +0800 Subject: [PATCH 2/2] planner/core: fix error information when `alter table` enter incorrect partition name --- planner/core/preprocess.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner/core/preprocess.go b/planner/core/preprocess.go index f081a32ac46ef..4f76b2158bfaf 100644 --- a/planner/core/preprocess.go +++ b/planner/core/preprocess.go @@ -1226,7 +1226,7 @@ func (p *preprocessor) checkAlterTableGrammar(stmt *ast.AlterTableStmt) { for _, def := range spec.PartDefinitions { pName := def.Name.String() if isIncorrectName(pName) { - p.err = dbterror.ErrWrongPartitionName.GenWithStackByArgs(pName) + p.err = dbterror.ErrWrongPartitionName.GenWithStackByArgs() return } }