From 2af9a67089af6f180d9f3eff7f245dc1b0172651 Mon Sep 17 00:00:00 2001 From: Jiaqiang Huang Date: Thu, 13 Jul 2023 17:44:14 +0800 Subject: [PATCH] planner/core: fix error information when enter incorrect partition name (#45078) close pingcap/tidb#44967 --- planner/core/preprocess.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planner/core/preprocess.go b/planner/core/preprocess.go index 85eaae80e0041..4f76b2158bfaf 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 } } @@ -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 } }