Skip to content

Warnings are not cleared #59132

Open
@dveeden

Description

@dveeden

Bug Report

Warnings are not always cleared as expected

1. Minimal reproduce step (Required)

VALUES ( ('foo'), ROW('bar') );
SHOW WARNINGS;
VALUES ( ('foo'), ROW('bar') );
SHOW WARNINGS;
VALUES ( ('foo'), ROW('bar') );
SHOW WARNINGS;

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

Errors being cleared after every statement.

3. What did you see instead (Required)

mysql-8.0.11-TiDB-v8.5.0> VALUES ( ('foo'), ROW('bar') );
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 8 near "( ('foo'), ROW('bar') )" 
mysql-8.0.11-TiDB-v8.5.0> SHOW WARNINGS;
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                                                                                  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1054 | Unknown column '$$' in 'field list'                                                                                                                                      |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql-8.0.11-TiDB-v8.5.0> VALUES ( ('foo'), ROW('bar') );
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 8 near "( ('foo'), ROW('bar') )" 
mysql-8.0.11-TiDB-v8.5.0> SHOW WARNINGS;
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                                                                                  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1054 | Unknown column '$$' in 'field list'                                                                                                                                      |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.01 sec)

mysql-8.0.11-TiDB-v8.5.0> VALUES ( ('foo'), ROW('bar') );
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 8 near "( ('foo'), ROW('bar') )" 
mysql-8.0.11-TiDB-v8.5.0> SHOW WARNINGS;
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                                                                                  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1054 | Unknown column '$$' in 'field list'                                                                                                                                      |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
| Error | 1064 | 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 8 near "( ('foo'), ROW('bar') )"  |
+-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

4. What is your TiDB version? (Required)

Release Version: v8.5.0
Edition: Community
Git Commit Hash: d13e52ed6e22cc5789bed7c64c861578cd2ed55b
Git Branch: HEAD
UTC Build Time: 2024-12-18 02:26:06
GoVersion: go1.23.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions