Bug #55286 GRANT and skip-name-resolv on Slave leads to Error 1133
Submitted: 15 Jul 2010 14:22 Modified: 15 Aug 2010 19:42
Reporter: Holger Thiel Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.48 OS:Linux
Assigned to: CPU Architecture:Any
Tags: 1133, skip_name_resolv

[15 Jul 2010 14:22] Holger Thiel
Description:
Hello,

there is a problem with GRANT and the replication. The slave uses "skip_name_resolv" and the binlog_format is 'MIXED' on the master.
If you grant something to an user with an IP there is no problem. It fails with characters in host.

Regards,
Holger

mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: gedoens.bonn.de
                  Master_User: repl
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: peter-bin.000003
          Read_Master_Log_Pos: 369172211
               Relay_Log_File: slave-relay.000004
                Relay_Log_Pos: 331284199
        Relay_Master_Log_File: peter-bin.000002
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 1133
                   Last_Error: Error 'Can't find any matching row in the user table' on query. Default database: ''. Query: 'GRANT SELECT ON `mysql`.* TO 'peter'@'bonn.de''
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 864830422
              Relay_Log_Space: 909370294
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 1133
               Last_SQL_Error: Error 'Can't find any matching row in the user table' on query. Default database: ''. Query: 'GRANT SELECT ON `mysql`.* TO 'peter'@'bonn.de''
1 row in set (0.00 sec)

How to repeat:
- use "skip_name_resolv" on the slave
- Create an user on the master with characters in the host.
- Grant something to this user
[15 Jul 2010 19:42] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior. Please provide full slave configuration file.
[15 Aug 2010 23: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".