GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — CTE parsing fails when name is a non-reserved keyword · Issue #662 · phpmyadmin/sql-parser Open DescriptionThe parser rejects valid CTEs whose names are non-reserved keywords, throwing:
MySQL has a large set of keywords that are explicitly not reserved (no ReproducerUnquoted:vendor/bin/sql-parser --lint --query "WITH data AS (SELECT 1) SELECT * FROM data"Backtick-quoted (which should unconditionally allow any keyword as an identifier):vendor/bin/sql-parser --lint --query "WITH `data` AS (SELECT 1) SELECT * FROM `data`"Expected behaviourThe query parses successfully for any non-reserved keyword used as a CTE name, whether unquoted or backtick-quoted. Actual behaviourParser throws errors in both cases. The root cause appears to be that the lexer classifies all keywords as keyword tokens unconditionally, rather than resolving them contextually. After FootnotesReacted by Zakaria Sellami and Hosni Mansour ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |