Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.0, 13.1
-
None
Description
Likely cause: MDEV-8348, which added the DEFAULT partition for LIST in CS 10.2.2. It made SHOW CREATE TABLE print DEFAULT for this partition, but not information_schema.PARTITIONS.
--source include/have_partition.inc
|
CREATE TABLE t1 (a INT) PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0), PARTITION p1 DEFAULT); |
--let $n= `SELECT COUNT(*) FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 't1' AND PARTITION_DESCRIPTION = '0'`
|
if ($n != 1) |
{
|
--die The DEFAULT partition of a LIST table has PARTITION_DESCRIPTION 0, the same as the partition with VALUES IN (0) |
}
|
CREATE TABLE t2 (a INT) PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (1), PARTITION p1 DEFAULT); |
--let $n= `SELECT COUNT(*) FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 't2' AND PARTITION_DESCRIPTION LIKE '%MAXVALUE%'`
|
if ($n) |
{
|
--die The DEFAULT partition of a LIST COLUMNS table has PARTITION_DESCRIPTION MAXVALUE |
}
|
DROP TABLE t1, t2; |
Leads to:
|
CS 13.1.2 87e62ca17270e163a6d41b3fc8d6f4d440f1bb88 (Optimized, Clang 22.1.8-20260622) Build 05/10/2026 |
mysqltest: At line 6: The DEFAULT partition of a LIST table has PARTITION_DESCRIPTION 0, the same as the partition with VALUES IN (0)
|
For LIST, the DEFAULT partition shows 0, so a table with VALUES IN (0) and DEFAULT shows two partitions for the value 0. For LIST COLUMNS, it shows MAXVALUE, or (MAXVALUE,MAXVALUE) for two columns. SHOW CREATE TABLE shows DEFAULT. Debug builds give the same result.
From the code it seems that the LIST part of information_schema.PARTITIONS in sql/sql_show.cc does not check the max_value flag of the partition, which SHOW CREATE TABLE checks to print DEFAULT.
Attachments
Issue Links
- is caused by
-
MDEV-8348 Add catchall to all table partitioning for list partitions
-
- Closed
-