From e1f32badc2328b508bb16d025231e9b00bc7c506 Mon Sep 17 00:00:00 2001 From: djshow832 Date: Mon, 18 Oct 2021 18:16:42 +0800 Subject: [PATCH] ddl: add tests for the compatibility between temporary tables and placement policies (#28875) --- ddl/db_integration_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ddl/db_integration_test.go b/ddl/db_integration_test.go index b9bba64562a4b..3c628fa1b3f11 100644 --- a/ddl/db_integration_test.go +++ b/ddl/db_integration_test.go @@ -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)