sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

A validating SQL lexer and parser with a focus on MySQL dialect.

Results 107 sql-parser issues
Sort by recently updated
recently updated
newest added

Hello! I know this library is primarily for MySQL dialects, but this is the only PHP SQL parser I could find... This can't parse the 'custom' Postgres dump, but I...

bug
enhancement
kind/support

When using ROW_NUMBER and an alias such as : ```sql SELECT ROW_NUMBER() OVER (ORDER BY `start`) ``` Phpmyadmin is showing an error but the query works. It says "An alias...

bug

`UPDATE test SET WHERE` doesn't show any error.

bug

```CHECK TABLE `table` FOR UPGRADE;``` will give two errors. 1. Unrecognized keyword. (near FOR) 2. Unrecognized keyword. (near UPGRADE) ```ALTER TABLE `table` FORCE;``` will give one error. 1. Unrecognized alter...

bug

This query, when formatted will give an unexpected token error because there's no space after `LINES`. ```LOAD DATA INFILE 'filename' IGNORE INTO TABLE `db`.`table` FIELDS TERMINATED BY ',' ENCLOSED BY...

bug

There were unnecessary spaced included in the statement when - a clause is removed (replaced with empty string) - the replacement string already has spaces - the replacement was at...

### Describe the bug This is a valid query, but it fails parsing it. ```SQL KILL 2883486; ``` ### To Reproduce Steps to reproduce the behavior: 1. Go to https://demo.phpmyadmin.net/QA_5_2/index.php?route=/server/sql...

enhancement
kind/support

`CHECK` is in Parser::STATEMENT_PARSERS, but also allowed in the column definition. This doesn't enforce an order for the check constraint. It seems to be only allowed at the end of...

Fixes phpmyadmin/phpmyadmin#17190 Replaces _END_OPTIONS with the actual names from here: https://github.com/phpmyadmin/sql-parser/blob/29f982a9559ac9a97b19e58b78a3fa4c41d5e43f/src/Statements/SelectStatement.php#L84-L228