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

P2-[4.0 Bug Hunting]-[SQL parser]-wrong error returned when missing alias #98

Open
zhangysh1995 opened this issue May 26, 2020 · 1 comment

Comments

@zhangysh1995
Copy link

Bug Report

1. What did you do?

mysql> create table t4 (id int); 
Query OK, 0 rows affected (0.00 sec)   

mysql> select * from (select * from t4);
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 32 near ""

2. What did you expect to see?

mysql>  select * from (select * from t4);
ERROR 1248 (42000): Every derived table must have its own alias

3. What did you see instead?

Error in syntax;

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

Master branch:

commit 8369ffd500f3fb235d8b584ac4298b2e59d8db55 (HEAD -> master, origin/master, origin/HEAD)
Author: Soup <[email protected]>
Date:   Tue May 26 15:38:29 2020 +0800
mysql> select tidb_version();
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                           |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: None
Edition: None
Git Commit Hash: None
Git Branch: None
UTC Build Time: None
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
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

3 participants