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

Digester produces invalid sql for selecting global variables #18224

Closed
wwar opened this issue Jun 28, 2020 · 4 comments
Closed

Digester produces invalid sql for selecting global variables #18224

wwar opened this issue Jun 28, 2020 · 4 comments

Comments

@wwar
Copy link

wwar commented Jun 28, 2020

Bug Report

1. Minimal reproduce step (Required)

The digester produces an invalid SQL for the following statement:

SELECT @@global.tidb_stmt_summary_refresh_interval AS value

This statement is generated by the tidb-dashboard.

I have another digester bug in #14241 - it is annoying when the syntax generated back is invalid.

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

SELECT @@global.tidb_stmt_summary_refresh_interval AS value

3. What did you see instead (Required)

There is a space between the two @ symbols:

SELECT @ @global.tidb_stmt_summary_refresh_interval AS value

4. Affected version (Required)

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-684-gf590d74e1
Edition: Community
Git Commit Hash: f590d74e158cf4e33555bfeb8f88971af5956697
Git Branch: master
UTC Build Time: 2020-06-27 02:29:48
GoVersion: go1.13.8
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

5. Root Cause Analysis

@wwar wwar added the type/bug The issue is confirmed as a bug. label Jun 28, 2020
@HunDunDM
Copy link
Contributor

/label component/parser

@wjhuang2016
Copy link
Member

@nullnotnil I can't reproduce it in both v4.0.8 and master, could you reproduce it?

@crazycs520
Copy link
Contributor

@wjhuang2016 I can reproduce it, It may be caused by dashboard format SQL before display.

image

@wjhuang2016
Copy link
Member

I move it to the dashboard's repo and close it now.

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

No branches or pull requests

7 participants