Uh oh!
There was an error while loading. Please reload this page.
Fix MySQL parsing of GRANT, REVOKE, and CREATE VIEW - #1538
Conversation
This is needed for parsing MySQL-style `'user'@'host'` grantee syntax. As far as I can tell, no dialect allows quotes or backticks as part of an identifier (regardless of whether it starts with `@`) without other specific syntax (e.g. nested in another quote style and thus not starting with `@`), so this shouldn't adversely affect non-MySQL dialects.
Introduces a new `Grantee` enum to differentiate bare identifiers (every other database: `root`) from user/host pairs (MySQL: `'root'@'%'`). While we're here, make the CASCADE/RESTRICT syntax for REVOKE optional since Postgres doesn't require it and MySQL doesn't allow it. Add support for MySQL wildcard object syntax: `GRANT ALL ON *.* ...`
mvzink
commented
Nov 20, 2024
Would appreciate feedback on the naming the MySQL-specific params types (would a generic/non-branded name be better?) and the API change for wildcard support (didn't want to change all 107 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Though as far as I know they are entirely MySQL specific.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
iffyio
commented
Dec 27, 2024
@mvzink it seems there's a couple conflicts in the branch could you take a look when you have some time? |
Hi @mvzink sorry I just noticed this was since rebased, could I ask for another rebase and if you could just ping me when its done I'll prio merging it to avoid further conflicts 🙏 |
@iffyio resolved, but there were some significant changes to grantee parsing by @yoavcloud so maybe he should take a look too. |
Uh oh!
There was an error while loading. Please reload this page.
mvzink
commented
Jan 9, 2025
@iffyio I think this is good to go. |
'user'@'host'syntax.*.*.CASCADE/RESTRICTin revoke statements optional since MySQL doesn't accept it.user@hostsyntax), and security context.