Hello,
I'm using the linter provided in this library and found out that when we use it on this query SET @test := (SELECT 1); it fails when we try to build the object \PhpMyAdmin\SqlParser\Statements\SetStatement from \PhpMyAdmin\SqlParser\Parser with the message "A new statement was found, but no delimiter between it and the previous one.".
The parser fails also when we try to build the \PhpMyAdmin\SqlParser\Statements\SelectStatement because we don't add ; at the end before the ), the error message is "Unexpected token.".
Both of the errors are thrown by \PhpMyAdmin\SqlParser\Statement::parse().
I'm happy to create a PR with a fix for this but I'm not entirely sure how the parsing works, can someone explain it to me and suggest a fix for this?
Hello,
I'm using the linter provided in this library and found out that when we use it on this query
SET @test := (SELECT 1);it fails when we try to build the object\PhpMyAdmin\SqlParser\Statements\SetStatementfrom\PhpMyAdmin\SqlParser\Parserwith the message "A new statement was found, but no delimiter between it and the previous one.".The parser fails also when we try to build the
\PhpMyAdmin\SqlParser\Statements\SelectStatementbecause we don't add;at the end before the), the error message is "Unexpected token.".Both of the errors are thrown by
\PhpMyAdmin\SqlParser\Statement::parse().I'm happy to create a PR with a fix for this but I'm not entirely sure how the parsing works, can someone explain it to me and suggest a fix for this?