Skip to content

Commit

Permalink
ddl: add tests for the compatibility between temporary tables and pla…
Browse files Browse the repository at this point in the history
…cement policies (#28875)
  • Loading branch information
djshow832 authored Oct 18, 2021
1 parent fce1a03 commit e1f32ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ddl/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2887,6 +2887,9 @@ func (s *testIntegrationSuite3) TestCreateTemporaryTable(c *C) {
tk.MustGetErrCode("create table t(id int) on commit delete rows", errno.ErrParse)
tk.MustGetErrCode("create table t(id int) on commit preserve rows", errno.ErrParse)

tk.MustGetErrCode("create global temporary table tplacement (id int) followers=4 on commit delete rows", errno.ErrOptOnTemporaryTable)
tk.MustGetErrCode("create global temporary table tplacement (id int) primary_region='us-east-1' regions='us-east-1,us-west-1' on commit delete rows", errno.ErrOptOnTemporaryTable)
tk.MustGetErrCode("create global temporary table tplacement (id int) placement policy='x' on commit delete rows", errno.ErrOptOnTemporaryTable)
tk.MustGetErrCode("create temporary table tplacement (id int) followers=4", errno.ErrOptOnTemporaryTable)
tk.MustGetErrCode("create temporary table tplacement (id int) primary_region='us-east-1' regions='us-east-1,us-west-1'", errno.ErrOptOnTemporaryTable)
tk.MustGetErrCode("create temporary table tplacement (id int) placement policy='x'", errno.ErrOptOnTemporaryTable)
Expand Down

0 comments on commit e1f32ba

Please sign in to comment.