-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
ANSI mode not working, PHP 7 #284
Comments
Also please correct me if I'm wrong, but looking through your tests data, there is no input data in ANSI_QUOTES format, which means you so far supported only serialization but not deserialization ? |
@devenbansod do you know ? |
@williamdes @devenbansod |
I'm closing this ticket in favor of #294 so we don't fragment the discussion |
Signed-off-by: William Desportes <[email protected]>
@williamdes I did and as I said in #284 (comment) I tried, and tested, and yes, replacing escape character in ANSI mode when building query worked since 2017, but parsing query in ANSI mode apparently not |
I missed that 👍 |
Hi,
while investigating issue phpmyadmin/phpmyadmin#15821 i came to conclusion, that sql-parser does not work correctly in my environment.
I'm using php from sury.org, currently
2:7.4+72+0~20200122.20+debian10~1.gbpcd96c7
Using MySQL server version 8.0.18 with ANSI_QUOTES mode (full list of modes at the end of this comment phpmyadmin/phpmyadmin#15821 (comment) ), yours lint-query fails to parse double-quotes correctly and complains (both table name and field names are escaped by double-quotes in ANSI mode)
I tried to tweak using ContextMySql80000 and/or ANSI or ANSI_QUOTES modes, but the behavior did not change, with any of my tries.
Test data are also in mentioned comment, the string is taken directly from phpmyadmin result of
SHOW CREATE TABLE
query executed from configured datasource.Once I change manually double-quotes to backticks, everything works correctly.
However I've tried tokenzier CLI utility, and the output is the same, for sql query with double-quotes and with backticks (except for Token containing raw value with backticks/doublequotes), Token values, types and flags are correctly the same.
Please let me know, if I can provide you with more debug info for you to test/fix this
The text was updated successfully, but these errors were encountered: