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

incorrect tableDual plan caused by range partition #50082

Closed
wjhuang2016 opened this issue Jan 4, 2024 · 0 comments · Fixed by #50113
Closed

incorrect tableDual plan caused by range partition #50082

wjhuang2016 opened this issue Jan 4, 2024 · 0 comments · Fixed by #50113
Assignees
Labels
affects-5.4 This bug affects 5.4.x versions. affects-6.1 affects-6.5 affects-7.1 affects-7.5 affects-7.6 component/tablepartition This issue is related to Table Partition of TiDB. fuzz/randomtest severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t5adc716d` (
  `col_38` mediumint(8) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY RANGE (`col_38`)
(PARTITION `p0` VALUES LESS THAN (5086706),
 PARTITION `p1` VALUES LESS THAN (7268292),
 PARTITION `p2` VALUES LESS THAN (16545422));

desc select * from t5adc716d where col_38 BETWEEN -6895222 AND 3125507;

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

TableScan

3. What did you see instead (Required)

mysql> desc select * from t5adc716d where col_38 BETWEEN -6895222 AND 3125507;
+-------------+---------+------+---------------+---------------+
| id          | estRows | task | access object | operator info |
+-------------+---------+------+---------------+---------------+
| TableDual_7 | 0.00    | root |               | rows:0        |
+-------------+---------+------+---------------+---------------+
1 row in set, 1 warning (0.00 sec)

4. What is your TiDB version? (Required)

ebe334f

@wjhuang2016 wjhuang2016 added type/bug The issue is confirmed as a bug. fuzz/randomtest labels Jan 4, 2024
@Defined2014 Defined2014 added component/tablepartition This issue is related to Table Partition of TiDB. affects-5.4 This bug affects 5.4.x versions. affects-6.1 affects-6.5 affects-7.1 affects-7.5 and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 labels Jan 4, 2024
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Jan 5, 2024
@Defined2014 Defined2014 self-assigned this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects 5.4.x versions. affects-6.1 affects-6.5 affects-7.1 affects-7.5 affects-7.6 component/tablepartition This issue is related to Table Partition of TiDB. fuzz/randomtest severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants