Title: ANSI mode not working, PHP 7 · Issue #284 · phpmyadmin/sql-parser · GitHub
Open Graph Title: ANSI mode not working, PHP 7 · Issue #284 · phpmyadmin/sql-parser
X Title: ANSI mode not working, PHP 7 · Issue #284 · phpmyadmin/sql-parser
Description: 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 ser...
Open Graph Description: 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...
X Description: 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~2020...
Opengraph URL: https://github.com/phpmyadmin/sql-parser/issues/284
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ANSI mode not working, PHP 7","articleBody":"Hi,\r\nwhile investigating issue https://github.com/phpmyadmin/phpmyadmin/issues/15821 i came to conclusion, that sql-parser does not work correctly in my environment.\r\n\r\nI'm using php from sury.org, currently `2:7.4+72+0~20200122.20+debian10~1.gbpcd96c7`\r\n\r\nUsing MySQL server version 8.0.18 with ANSI_QUOTES mode (full list of modes at the end of this comment https://github.com/phpmyadmin/phpmyadmin/issues/15821#issuecomment-578572914 ), 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)\r\n\r\n```\r\n#1: A symbol name was expected! (near \""id"\" at position 29)\r\n#2: At least one column definition was expected. (near \""id"\" at position 29)\r\n#3: Unexpected beginning of statement. (near \"11\" at position 38)\r\n#4: Unrecognized statement type. (near \"NOT NULL\" at position 42)\r\n```\r\n\r\nI tried to tweak using ContextMySql80000 and/or ANSI or ANSI_QUOTES modes, but the behavior did not change, with any of my tries.\r\n\r\nTest data are also in mentioned comment, the string is taken directly from phpmyadmin result of `SHOW CREATE TABLE` query executed from configured datasource.\r\nOnce I change manually double-quotes to backticks, everything works correctly.\r\n\r\nHowever 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.\r\n\r\nPlease let me know, if I can provide you with more debug info for you to test/fix this","author":{"url":"https://github.com/smarek","@type":"Person","name":"smarek"},"datePublished":"2020-01-27T12:50:59Z","url":"https://github.com/phpmyadmin/sql-parser/issues/284"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bfe849b1-1d4f-569e-b1b4-11c08ab610cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 820C:1F98:237730A:2F18A73:6B043E78 |
| html-safe-nonce | 4878a5acfbec05f4c8a92788d014ec790d48e67d3b2382f015201925f029d0ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjBDOjFGOTg6MjM3NzMwQToyRjE4QTczOjZCMDQzRTc4IiwidmlzaXRvcl9pZCI6IjQwNDY0Njk3OTI5NDgwNDMzODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5750212597cc6866e2f2cef5020f484945968d3c832617b25cacbb4ed16d5c0c |
| hovercard-subject-tag | issue:555553228 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpmyadmin/sql-parser/284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/056fec9eadd6774ec8b2c5ff05a7b80992a50f63ab53d3c61b2d1f1e62147834/phpmyadmin/sql-parser/issues/284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/056fec9eadd6774ec8b2c5ff05a7b80992a50f63ab53d3c61b2d1f1e62147834/phpmyadmin/sql-parser/issues/284 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | smarek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/phpmyadmin/sql-parser git https://github.com/phpmyadmin/sql-parser.git |
| octolytics-dimension-user_id | 1351977 |
| octolytics-dimension-user_login | phpmyadmin |
| octolytics-dimension-repository_id | 36256604 |
| octolytics-dimension-repository_nwo | phpmyadmin/sql-parser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36256604 |
| octolytics-dimension-repository_network_root_nwo | phpmyadmin/sql-parser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width