You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the MySQL Documentation, it is possible to run such query:
ALTER DEFINER = user EVENT myEvent ENABLE;
Nevertheless, when you try to execute it on the linter, it fails to be parsed:1
> php bin/lint-query --query "ALTER DEFINER = user EVENT myEvent ENABLE;"
#1: Missing comma before the beginning of a new operation ALTER. (near "ENABLE" at position 37)
#2: Operation ALTER not recognized. (near "ENABLE" at position 37)
My suggestion would be to add the following element into AlterStatement::$OPTIONS:
// `DEFINER` is also used for `ALTER EVENT`'DEFINER' => [
2,
'expr=',
],
Looking at the MySQL Documentation, it is possible to run such query:
ALTER DEFINER = user EVENT myEvent ENABLE;
Nevertheless, when you try to execute it on the linter, it fails to be parsed:1
My suggestion would be to add the following element into
AlterStatement::$OPTIONS
:But I don't know the impact yet.
As far as I know, support for the DEFINER clause was added in MySQL 5.1.17 (Section 13.1.2), so I don't know how to handle this correctly regarding the fact the sql-parser should stay compatible with MySQL 5.0.
Anyway, I'll try to provide a PR soon about it.
Footnotes
messages are translated from French to English manually. ↩
The text was updated successfully, but these errors were encountered: