SQL Editor unexpected token with numeric db suffix and table name prefix
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start from the SQL Editor page and reproduce the error with the INSERT and UPDATE examples using foo_1.2_bar. Compare those results with the working SELECT example, then trace the SQL parser's handling of these statements. Done means both non-SELECT examples no longer report an unexpected token near .2.
Written by the indexing model from the issue text.
Description
Describe the bug
A numeric database suffix combined with a numeric table name prefix causes a false positive SQL editor error.
To Reproduce
Steps to reproduce the behavior:
- Go to any SQL Editor page
- Enter
INSERT INTO foo_1.2_bar SELECT * FROM foo;
or
UPDATE foo_1.2_bar SET a = 1; - See error
Unexpected token (near .2)
Expected behavior
Neither of these should flag as syntax errors
The bug does not affect SELECTs e.g.
SELECT * FROM foo_1.2_bar;
Screenshots
Server configuration
- Operating system: el8
- Database version: 10.11.7-MariaDB
- PHP version: 8.3.6
- phpMyAdmin version: 5.2.1-1
Client configuration
- Browser: Chrome
- Operating system: Win 10
- Dominant language
- PHP
- Stars
- 485
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpmyadmin/sql-parser
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phpmyadmin/sql-parser#655 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
phpmyadmin/sql-parser#666 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
phpmyadmin/sql-parser#662 · 2 reactions ·
-
kind/support
Difficulty 3/5 1-2 days Newbie friendliness 45/100
phpmyadmin/sql-parser#653 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
phpmyadmin/sql-parser#649 ·
All issues in phpmyadmin/sql-parser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
a11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Save States Menu Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·