Skip to content

partition_expression is wrong in information_schema.partitions if the table partitioned by RANGE COLUMNS #40931

@SunRunAway

Description

@SunRunAway

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE rc1 (
    a INT,
    b INT
)
PARTITION BY RANGE COLUMNS(a, b) (
    PARTITION p0 VALUES LESS THAN (5, 12),
    PARTITION p3 VALUES LESS THAN (MAXVALUE, MAXVALUE)
);

select partition_expression,partition_description from information_schema.partitions where TABLE_NAME='rc1';

2. What did you expect to see? (Required)

mysql> select partition_expression,partition_description from information_schema.partitions where TABLE_NAME='rc1';
+----------------------+-----------------------+
| PARTITION_EXPRESSION | PARTITION_DESCRIPTION |
+----------------------+-----------------------+
| `a`,`b`              | MAXVALUE,MAXVALUE     |
| `a`,`b`              | 5,12                  |
+----------------------+-----------------------+
2 rows in set (0.01 sec)

3. What did you see instead (Required)

mysql> select partition_expression,partition_description from information_schema.partitions where TABLE_NAME='rc1';
+----------------------+-----------------------+
| partition_expression | partition_description |
+----------------------+-----------------------+
| a                    | 5,12                  |
| a                    | MAXVALUE,MAXVALUE     |
+----------------------+-----------------------+
2 rows in set (0.01 sec)

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Labels

component/tablepartitionThis issue is related to Table Partition of TiDB.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.severity/moderatesig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions