diff --git a/executor/infoschema_reader_test.go b/executor/infoschema_reader_test.go index 3fd851fb93d44..2ee6cf92c2496 100644 --- a/executor/infoschema_reader_test.go +++ b/executor/infoschema_reader_test.go @@ -916,7 +916,7 @@ func (s *testInfoschemaClusterTableSuite) TestTableStorageStats(c *C) { tk.MustQuery("select TABLE_SCHEMA, sum(TABLE_SIZE) from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'test' group by TABLE_SCHEMA;").Check(testkit.Rows( "test 2", )) - c.Assert(len(tk.MustQuery("select TABLE_NAME from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql';").Rows()), Equals, 25) + c.Assert(len(tk.MustQuery("select TABLE_NAME from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql';").Rows()), Equals, 24) // More tests about the privileges. tk.MustExec("create user 'testuser'@'localhost'") @@ -942,14 +942,14 @@ func (s *testInfoschemaClusterTableSuite) TestTableStorageStats(c *C) { Hostname: "localhost", }, nil, nil), Equals, true) - tk.MustQuery("select count(1) from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql'").Check(testkit.Rows("25")) + tk.MustQuery("select count(1) from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql'").Check(testkit.Rows("24")) c.Assert(tk.Se.Auth(&auth.UserIdentity{ Username: "testuser3", Hostname: "localhost", }, nil, nil), Equals, true) - tk.MustQuery("select count(1) from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql'").Check(testkit.Rows("25")) + tk.MustQuery("select count(1) from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql'").Check(testkit.Rows("24")) } func (s *testInfoschemaTableSuite) TestSequences(c *C) { diff --git a/session/bootstrap.go b/session/bootstrap.go index 3ea5cf1c655d5..bb25b4a787207 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -340,22 +340,6 @@ const ( WITH_GRANT_OPTION enum('N','Y') NOT NULL DEFAULT 'N', PRIMARY KEY (USER,HOST,PRIV) );` - - // CreatePlacementPolicyTable store the placement policys. - CreatePlacementPolicyTable = `CREATE TABLE IF NOT EXISTS mysql.placement_policy ( - NAME varchar(64) NOT NULL, - PRIMARY_REGION varchar(255) DEFAULT NULL, - REGIONS varchar(255) DEFAULT NULL, - LEADERS BIGINT UNSIGNED DEFAULT NULL, - FOLLOWERS BIGINT UNSIGNED DEFAULT NULL, - VOTERS BIGINT UNSIGNED DEFAULT NULL, - SCHEDULE varchar(255) DEFAULT NULL, - CONSTRAINTS varchar(255) DEFAULT NULL, - LEADER_CONSTRAINTS varchar(255) DEFAULT NULL, - FOLLOWER_CONSTRAINTS varchar(255) DEFAULT NULL, - VOTER_CONSTRAINTS varchar(255) DEFAULT NULL, - PRIMARY KEY (NAME) - );` ) // bootstrap initiates system DB for a store. @@ -515,13 +499,11 @@ const ( version71 = 71 // version72 adds snapshot column for mysql.stats_meta version72 = 72 - // version73 adds the placement policy for mysql.placement_meta - version73 = 73 ) // currentBootstrapVersion is defined as a variable, so we can modify its value for testing. // please make sure this is the largest version -var currentBootstrapVersion int64 = version73 +var currentBootstrapVersion int64 = version72 var ( bootstrapVersion = []func(Session, int64){ @@ -597,7 +579,6 @@ var ( upgradeToVer70, upgradeToVer71, upgradeToVer72, - upgradeToVer73, } ) @@ -1547,13 +1528,6 @@ func upgradeToVer72(s Session, ver int64) { doReentrantDDL(s, "ALTER TABLE mysql.stats_meta ADD COLUMN snapshot BIGINT(64) UNSIGNED NOT NULL DEFAULT 0", infoschema.ErrColumnExists) } -func upgradeToVer73(s Session, ver int64) { - if ver >= version73 { - return - } - doReentrantDDL(s, CreatePlacementPolicyTable) -} - func writeOOMAction(s Session) { comment := "oom-action is `log` by default in v3.0.x, `cancel` by default in v4.0.11+" mustExecute(s, `INSERT HIGH_PRIORITY INTO %n.%n VALUES (%?, %?, %?) ON DUPLICATE KEY UPDATE VARIABLE_VALUE= %?`, @@ -1632,8 +1606,6 @@ func doDDLWorks(s Session) { mustExecute(s, CreateStatsFMSketchTable) // Create global_grants mustExecute(s, CreateGlobalGrantsTable) - // Create placement_policy - mustExecute(s, CreatePlacementPolicyTable) } // doDMLWorks executes DML statements in bootstrap stage.