Bug #67686 Grant not Applying properly
Submitted: 23 Nov 2012 14:04 Modified: 23 Dec 2012 17:31
Reporter: Parthasarathy Venkatesan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.77 OS:Linux
Assigned to: CPU Architecture:Any

[23 Nov 2012 14:04] Parthasarathy Venkatesan
Description:
When try to grant a privilege, It is not applying as usual.

How to repeat:
mysql> GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'slave_host' IDENTIFIED BY PASSWORD 'ssssssssss';
Query OK, 0 rows affected (0.00 sec)

mysql>  show grants for replicant@'slave_host';
+-----------------------------------------------------------------------------------------------------------+
| Grants for replicant@slave_host                                                          |
+-----------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'replicant'@'slave_host' IDENTIFIED BY PASSWORD 'ssssssssss' |
+-----------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>  show grants for replicant@'slave_host';
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for replicant@slave_host                                                                                                         |
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'replicant'@'burbank-rt02.warnerbros.com' IDENTIFIED BY PASSWORD 'ssssssssss' |
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Suggested fix:
I am not sure what is the issue is????

Please let me know how to fix this.
[23 Nov 2012 15:52] Peter Laursen
Not reproducible for me on MySQL 5.1.63 and 5.5.28. It works as expected. 

On 5.0.96 I get an error

GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'slave_host';
-- Error Code: 1133
-- Can't find any matching row in the user table
SHOW GRANTS FOR 'replicant'@'slave_host'
-- Error Code: 1141
-- There is no such grant defined for user 'replicant' on host 'slave_host'
[23 Nov 2012 17:31] Sveta Smirnova
Thank you for the report.

I can not repeat it too:

=====mysql-5.0=====
=====bug67686=====
GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'slave_host' IDENTIFIED BY 'ssssssssss';
show grants for replicant@'slave_host';
Grants for replicant@slave_host
GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'slave_host' IDENTIFIED BY PASSWORD '*B7D4E2BC46508B49EA70761437BF34476401987E'
flush privileges;
show grants for replicant@'slave_host';
Grants for replicant@slave_host
GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'slave_host' IDENTIFIED BY PASSWORD '*B7D4E2BC46508B49EA70761437BF34476401987E'

Additionally version 5.0.77 is old and many bugs fixed since. Please upgrade to current version 5.0.96, check if you don't run server with option skip-grant-tables and inform us if problem still exists.
[24 Dec 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".