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

Set non-exists partition for PointGet plan will not get error #59003

Open
Defined2014 opened this issue Jan 17, 2025 · 0 comments
Open

Set non-exists partition for PointGet plan will not get error #59003

Defined2014 opened this issue Jan 17, 2025 · 0 comments
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t1` (
  `a` int DEFAULT NULL,
  `b` int DEFAULT NULL,
  UNIQUE KEY `idx2` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY HASH (`a`) PARTITIONS 5;
select * from t1 partition(p2000) where a = 1;

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

Like other plans, report error

mysql> select * from t1 partition(p2000);
ERROR 1735 (HY000): Unknown partition 'p2000' in table 't1'

3. What did you see instead (Required)

Get empty result

mysql> select * from t1 partition(p2000) where a = 1;
Empty set (0.00 sec)

4. What is your TiDB version? (Required)

mysql> SELECT tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                     |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v9.0.0-alpha-117-g5e9748c040
Edition: Community
Git Commit Hash: 5e9748c0403e9d01f2bee993e4a4240711f52300
Git Branch: HEAD
UTC Build Time: 2025-01-16 03:38:57
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@Defined2014 Defined2014 added component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. labels Jan 17, 2025
@Defined2014 Defined2014 changed the title Set non exists partition for PointGet plan will not get error Set non-exists partition for PointGet plan will not get error Jan 17, 2025
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 sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant