• 's avatar
    Bug #44331 Restore of database with events produces warning in replication · 90e25c6f
    authored
    If an EVENT is created without the DEFINER clause set explicitly or with it set  
    to CURRENT_USER, the master and slaves become inconsistent. This issue stems from 
    the fact that in both cases, the DEFINER is set to the CURRENT_USER of the current 
    thread. On the master, the CURRENT_USER is the mysqld's user, while on the slave,  
    the CURRENT_USER is empty for the SQL Thread which is responsible for executing 
    the statement.
    
    To fix the problem, we do what follows. If the definer is not set explicitly,  
    a DEFINER clause is added when writing the query into binlog; if 'CURRENT_USER' is 
    used as the DEFINER, it is replaced with the value of the current user before 
    writing to binlog.
    90e25c6f
rpl_drop_if_exists.result 5.26 KB