ddl: enlarge the limit of the number of partitions in a table (#20089)

This commit is contained in:
Jack Yu
2020-09-18 17:05:57 +08:00
committed by GitHub
parent 0e4b809cad
commit 6a8e27eefd
2 changed files with 4 additions and 5 deletions

View File

@ -1280,7 +1280,7 @@ func (s *testIntegrationSuite4) TestAddPartitionTooManyPartitions(c *C) {
for i := 1; i <= count; i++ {
sql1 += fmt.Sprintf("partition p%d values less than (%d),", i, i)
}
sql1 += "partition p1025 values less than (1025) );"
sql1 += "partition p8193 values less than (8193) );"
tk.MustGetErrCode(sql1, tmysql.ErrTooManyPartitions)
tk.MustExec("drop table if exists p2;")
@ -1291,11 +1291,11 @@ func (s *testIntegrationSuite4) TestAddPartitionTooManyPartitions(c *C) {
for i := 1; i < count; i++ {
sql2 += fmt.Sprintf("partition p%d values less than (%d),", i, i)
}
sql2 += "partition p1024 values less than (1024) );"
sql2 += "partition p8192 values less than (8192) );"
tk.MustExec(sql2)
sql3 := `alter table p2 add partition (
partition p1025 values less than (1025)
partition p8193 values less than (8193)
);`
tk.MustGetErrCode(sql3, tmysql.ErrTooManyPartitions)
}

View File

@ -59,9 +59,8 @@ const (
batchAddingJobs = 10
// PartitionCountLimit is limit of the number of partitions in a table.
// Mysql maximum number of partitions is 8192, our maximum number of partitions is 1024.
// Reference linking https://dev.mysql.com/doc/refman/5.7/en/partitioning-limitations.html.
PartitionCountLimit = 1024
PartitionCountLimit = 8192
)
// OnExist specifies what to do when a new object has a name collision.