Skip to content

Commit

Permalink
fix issue:pingcap#29893 Rename a non exist table report wrong error m…
Browse files Browse the repository at this point in the history
…essage

Signed-off-by: fanrenhoo <[email protected]>
  • Loading branch information
fanrenhoo committed Feb 8, 2022
1 parent 7f44207 commit 601ca60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions executor/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func (e *DDLExec) executeRenameTable(s *ast.RenameTableStmt) error {
return ddl.ErrUnsupportedLocalTempTableDDL.GenWithStackByArgs("RENAME TABLE")
}
newIdent := ast.Ident{Schema: s.TableToTables[0].NewTable.Schema, Name: s.TableToTables[0].NewTable.Name}
isAlterTable := true
err = domain.GetDomain(e.ctx).DDL().RenameTable(e.ctx, oldIdent, newIdent, isAlterTable)
} else {
oldIdents := make([]ast.Ident, 0, len(s.TableToTables))
Expand Down

0 comments on commit 601ca60

Please sign in to comment.