[MDEV-30537] Feature request : REVOKE IF EXISTS / REVOKE ... IGNORE UNKNOWN USER Created: 2023-02-01  Updated: 2023-02-27

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Jean Weisbuch Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5359 CREATE OR REPLACE, CREATE IF NOT EXIS... Closed

 Description   

MySQL 8 has support for "REVOKE IF EXISTS" and also for "REVOKE ... IGNORE UNKNOWN USER" which are not available on MariaDB.



 Comments   
Comment by Sergei Golubchik [ 2023-02-24 ]

REVOKE IF EXISTS makes a lot of sense. We had MDEV-5359 that was about supporting IF EXISTS everywhere, but we forgot to cover GRANT and REVOKE.

On the other hand, IGNORE UNKNOWN USER looks strange, not consistent with existing syntax. I'd prefer to use IF EXISTS too. Like

REVOKE IF EXISTS SELECT ON *.* FROM IF EXISTS foo@bar

This isn't very English, FROM foo@bar IF EXISTS would look better.
Compare with

ALTER TABLE IF EXISTS t1 DROP COLUMN IF EXISTS col1

Comment by Jean Weisbuch [ 2023-02-27 ]

I don't think the FROM IF EXISTS (and IGNORE UNKNOWN USER) has much usefulness on a REVOKE IF EXISTS statement as the privilege(s) could not exist (and thus, be removed) if the user doesn't, it could simply throw the same warning if the privilege(s) and/or user doesn't exist.

Generated at Thu Feb 08 10:17:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.