-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Digester does not support escaped reserved words #14241
Labels
component/parser
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
severity/minor
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Comments
@djshow832 PTAL |
Confirming that this issue still exists in master: DROP TABLE IF EXISTS `table`;
CREATE TABLE `table` (a int);
SELECT digest_text FROM information_schema.statements_summary WHERE digest_text like '%table%';
..
mysql> SELECT digest_text FROM information_schema.statements_summary WHERE digest_text like '%table%';
+-----------------------------------+
| digest_text |
+-----------------------------------+
| create table table ( a int ) |
| drop table if exists table |
| create table t ( d datetime ) |
| drop table if exists t |
| show tables in information_schema |
+-----------------------------------+
5 rows in set (0.00 sec)
mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-798-gd941ff5cc
Edition: Community
Git Commit Hash: d941ff5cc8b4babf9dcfdd91b66a5c53b798c122
Git Branch: master
UTC Build Time: 2020-07-18 05:54:02
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec) |
ghost
added
the
component/parser
label
Jul 31, 2020
ghost
mentioned this issue
Jul 31, 2020
qw4990
added
severity/minor
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
labels
Aug 26, 2020
Closed
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions[v3.0.0:v3.0.20],[v4.0.0:v4.0.11],[v5.0.0-rc] 6. Fixed versionsmaster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component/parser
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
severity/minor
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
This is a minor issue, but it bugs me that the digest text could print back invalid SQL. i.e. start by creating a table in any schema, and then read back in performance_schema:
In MySQL 8.0, the digest_text will be:
In TiDB:
I also like that MySQL capitalizes the keywords, but this can be a personal preference. MySQL is also normalizing the data type of int to integer. We can see that TiDB doesn't do this with a second example. It's probably not that important, since MySQL doesn't consistently do it (the data type serial, which is an alias for a bigint auto-inc, will digest with the actual word serial.)
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: