LucaCappelletti94 opened a new pull request, #2850:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2850

   `CREATE TRIGGER tr BEFORE INSERT ON t FOR EACH ROW SET NEW.id = 1; DROP 
TRIGGER tr` parsed into a single `CreateTrigger` whose body held both the `SET` 
and the `DROP TRIGGER`.
   
   [MySQL](https://dev.mysql.com/doc/refman/8.4/en/create-trigger.html) takes 
exactly one statement there and needs `BEGIN ... END` for more than one. The 
body is now parsed as one statement, so the statements that follow parse on 
their own, and a trigger with no body fails with `Expected: an SQL statement, 
found: EOF`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] MySQL: Parse a `CREATE TRIG... LucaCappelletti94 (via GitHub) via github

Reply via email to