Skip to content

Commit

Permalink
ddl: support alter table TABLE_NAME engine=xxxx (#27484)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Aug 23, 2021
1 parent 3731229 commit 22034c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,7 @@ func (d *ddl) AlterTable(ctx context.Context, sctx sessionctx.Context, ident ast
needsOverwriteCols := needToOverwriteColCharset(spec.Options)
err = d.AlterTableCharsetAndCollate(sctx, ident, toCharset, toCollate, needsOverwriteCols)
handledCharsetOrCollate = true
case ast.TableOptionEngine:
default:
err = errUnsupportedAlterTableOption
}
Expand Down
1 change: 1 addition & 0 deletions util/admin/admin_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestAdminCheckTable(t *testing.T) {
tk.MustExec("ALTER TABLE t1 ADD COLUMN cc2 VARCHAR(36) NULL DEFAULT ''")
tk.MustExec("ALTER TABLE t1 ADD INDEX idx1 (cc1);")
tk.MustExec("ALTER TABLE t1 ADD INDEX idx2 (cc2);")
tk.MustExec("ALTER TABLE t1 engine=innodb;")
tk.MustExec("admin check table t1;")

// For add index on virtual column
Expand Down

0 comments on commit 22034c5

Please sign in to comment.