Description:
The REVOKE GRANT OPTION syntax does not work as specified in the manual. I have to qualify it with ON *.* to make it revoke the GRANT OPTION.
Related bugs are #878 and #2642, but I do not think they are the same thing. Will "fixing" this behavior, if it is indeed a bug, cause backwards compatibility issues?
How to repeat:
As root,
mysql> show grants for baron;
+----------------------------------------------------------------------------------------------------------------+
| Grants for baron@% |
+----------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, PROCESS, SUPER ON *.* TO 'baron'@'%' IDENTIFIED BY PASSWORD '5d2e19393cc5ef67' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> REVOKE GRANT OPTION FROM 'baron'@'%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM 'baron'@'%'' at line 1
mysql> REVOKE GRANT OPTION ON *.* FROM 'baron'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> show grants for baron;
+----------------------------------------------------------------------------------------------------------+
| Grants for baron@% |
+----------------------------------------------------------------------------------------------------------+
| GRANT SELECT, PROCESS, SUPER ON *.* TO 'baron'@'%' IDENTIFIED BY PASSWORD '5d2e19393cc5ef67' |
+----------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.0.26 |
+-----------+
1 row in set (0.00 sec)
Suggested fix:
I'm not sure whether this is a documentation mistake or an actual bug.