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

Cannot parse 2 consecutive identifiers that both start with digit #1203

Closed
kolbe opened this issue Mar 30, 2021 · 2 comments · Fixed by #1228
Closed

Cannot parse 2 consecutive identifiers that both start with digit #1203

kolbe opened this issue Mar 30, 2021 · 2 comments · Fixed by #1228
Assignees
Labels
type/bug Something isn't working

Comments

@kolbe
Copy link

kolbe commented Mar 30, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
select * from 1db.1table;
  1. What did you expect to see?
ERROR 1146 (42S02): Table '1db.1table' doesn't exist
  1. What did you see instead?
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 19 near ".1table"

  1. What version of TiDB SQL Parser are you using?
Release Version: v4.0.0-beta.2-2135-gd6a2b9a37-dirty
Edition: Community
Git Commit Hash: d6a2b9a372edd3638c0ed88e1d2a5e6b702a69ed
Git Branch: master
UTC Build Time: 2021-02-11 02:48:59
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@kolbe kolbe changed the title Cannot parse table name with initial digit after database name with initial digit Cannot parse 2 consecutive identifiers that both start with digit Mar 30, 2021
@kolbe
Copy link
Author

kolbe commented Mar 30, 2021

This occurs whether it's 1db.1table or 1table.1col et cetera:

tidb> select * from 1table.1col;
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 22 near ".1col"
tidb> select * from table.1col;
ERROR 1146 (42S02): Table 'table.1col' doesn't exist
tidb> select * from db.1table.1col;
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 24 near ".1col"

@morgo
Copy link
Contributor

morgo commented May 19, 2021

I bisected this to a regression of pingcap/tidb#21908

@xiongjiwei do you mind taking a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants