-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
insert into partition table when data meet no partition,show warnings should output the error message #22096
Comments
when i fixed load data meet no partition, I found this bug |
well, actually all the errors in MySQL will appear when |
See https://docs.pingcap.com/tidb/dev/partitioned-table#list-partitioning
Show warnings doesn't print the error message again... |
Example: mysql> a;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a' at line 1
mysql> show warnings;
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a' at line 1 |
+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
mysql> select version();
+-------------------------+
| version() |
+-------------------------+
| 8.0.25-0ubuntu0.21.04.1 |
+-------------------------+
1 row in set (0,00 sec) ^ MySQL 8.0.25 tidb> a;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 1 near "a"
tidb> show warnings;
Empty set (0.00 sec)
tidb> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v5.1.0-alpha-46-gf891c5a7c-dirty
Edition: Community
Git Commit Hash: f891c5a7cbbb2082ed281e1c63e3abb1890cea1c
Git Branch: master
UTC Build Time: 2021-05-27 19:29:34
GoVersion: go1.16.3
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec) So I don't think this should be a part of the partitioning project? |
It's fixed in master branch right now, so close this issue. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t (id int) partition by list (id) (partition p0 values in (3,5,6,9,17));
insert into t_21966 values(100);
show warnings;
2. What did you expect to see? (Required)
show warnings should output:
+-------+------+--------------------------------------+
| Level | Code | Message |
+-------+------+--------------------------------------+
| Error | 1526 | Table has no partition for value 100 |
+-------+------+--------------------------------------+
3. What did you see instead (Required)
show warnings; Empty set (0.01 sec)
4. What is your TiDB version? (Required)
select tidb_version();
Release Version: None
Edition: Community
Git Commit Hash: None
Git Branch: None
UTC Build Time: None
GoVersion: go1.14.9
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: