Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb_partition_prune_mode = 'static' does not show partition name in original case #32719

Closed
mjonss opened this issue Mar 1, 2022 · 2 comments · Fixed by #32817
Closed

tidb_partition_prune_mode = 'static' does not show partition name in original case #32719

mjonss opened this issue Mar 1, 2022 · 2 comments · Fixed by #32817
Assignees
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@mjonss
Copy link
Contributor

mjonss commented Mar 1, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t (a int) partition by range (a) (partition pUPPERCASE values less than (1000), partition pMAX values less than (MAXVALUE));
set @@tidb_partition_prune_mode = 'static';
explain select * from t where a = 1;
set @@tidb_partition_prune_mode = 'dynamic';
explain select * from t where a = 1;

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

The used partition's name in original case, like pUPPERCASE for dynamic prune mode.

+-------------------------+----------+-----------+----------------------+--------------------------------+
| id                      | estRows  | task      | access object        | operator info                  |
+-------------------------+----------+-----------+----------------------+--------------------------------+
| TableReader_7           | 10.00    | root      | partition:pUPPERCASE | data:Selection_6               |
| └─Selection_6           | 10.00    | cop[tikv] |                      | eq(test.t.a, 1)                |
|   └─TableFullScan_5     | 10000.00 | cop[tikv] | table:t              | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+----------------------+--------------------------------+

3. What did you see instead (Required)

The partition's name in all lower case puppercase for static prune mode.

+-------------------------+----------+-----------+-------------------------------+--------------------------------+
| id                      | estRows  | task      | access object                 | operator info                  |
+-------------------------+----------+-----------+-------------------------------+--------------------------------+
| TableReader_9           | 10.00    | root      |                               | data:Selection_8               |
| └─Selection_8           | 10.00    | cop[tikv] |                               | eq(test.t.a, 1)                |
|   └─TableFullScan_7     | 10000.00 | cop[tikv] | table:t, partition:puppercase | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+-------------------------------+--------------------------------+

4. What is your TiDB version? (Required)

Release Version: v5.5.0-alpha-370-gfbfe36ca7d
Edition: Community
Git Commit Hash: fbfe36ca7dd3a78a714872d468cebfce34e50116
Git Branch: master
UTC Build Time: 2022-03-01 14:01:23
GoVersion: go1.17.6
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@mjonss mjonss added the type/bug The issue is confirmed as a bug. label Mar 1, 2022
@mjonss
Copy link
Contributor Author

mjonss commented Mar 3, 2022

/component tablepartition

@ti-chi-bot ti-chi-bot added the component/tablepartition This issue is related to Table Partition of TiDB. label Mar 3, 2022
mjonss added a commit to mjonss/tidb that referenced this issue Mar 4, 2022
@mjonss
Copy link
Contributor Author

mjonss commented Mar 4, 2022

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants