sql-parser
sql-parser copied to clipboard
A validating SQL lexer and parser with a focus on MySQL dialect.
In case an error occurs during loading of a context, let the Context::load() method return a boolean value indicating whether the context was successfully loaded or not. Throwing an Exception...
Hopefully this is the right place for this bug. In phpMyAdmin I get an error when using a legitimate query. Using the "Country" table on the demo server as an...
```sql ALTER TABLE d PARTITION BY RANGE (MONTH(departure_date)) ( PARTITION p01 VALUES LESS THAN (02) , PARTITION p02 VALUES LESS THAN (03) , PARTITION p03 VALUES LESS THAN (04) ,...
With the sql-parser version 5.5.0 that's included with my phpMyAdmin, I'm looking at the example WITH...AS statement: ```sql with foo as ( select * from products where bar in ('foo',...
Hey, When I try to login to my php myadmin I get this parse error from php `Parse error: syntax error, unexpected identifier "JSON_CONTAINS_PATH", expecting "]" in C:\localServer\Apache24\htdocs\phpMyAdmin\vendor\phpmyadmin\sql-parser\src\Contexts\ContextMySql50700.php on line...
### Describe the bug ### To Reproduce Select a database, go to "SQL" and paste this query: ```sql SELECT post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1,...
### Describe the bug The phpMyAdmin editor shows errors about tokens when running a call statement for stored procedure with the schema included. Example screenshot is included below ### To...
```sql CREATE TABLE t( x INT, start_timestamp TIMESTAMP(6) GENERATED ALWAYS AS ROW START, end_timestamp TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME(start_timestamp, end_timestamp) ) WITH SYSTEM VERSIONING; ``` https://mariadb.com/kb/en/library/system-versioned-tables/...
When parsing SQL with MySQL specific comments `/*! ... */` (https://dev.mysql.com/doc/refman/5.7/en/comments.html), parser leaves ending comment in parsed query: `*/`. I would expect either ignore all MySQL specific comments or remove...
See: https://github.com/phpmyadmin/phpmyadmin/issues/16837 ```sql create table event( eventID varchar(10) not null, b char(30), c varchar(20), d TIME, e Date, f int, g char(70), h char(90), primary key(eventID) ) ``` is the...