• Luis Soares's avatar
    BUG#48632: Fix for Bug #23300 Has Not Been Backported · e925bd73
    Luis Soares authored
    To 5.x Release
          
    Notes
    =====
          
    This is a backport of BUG#23300 into 5.1 GA.
          
    Original cset revid (in betony):
    luis.soares@sun.com-20090929140901-s4kjtl3iiyy4ls2h
    
    Description
    ===========
          
    When using replication, the slave will not log any slow query
    logs queries replicated from the master, even if the
    option "--log-slow-slave-statements" is set and these take more
    than "log_query_time" to execute.
                        
    In order to log slow queries in replicated thread one needs to
    set the --log-slow-slave-statements, so that the SQL thread is
    initialized with the correct switch. Although setting this flag
    correctly configures the slave thread option to log slow queries,
    there is an issue with the condition that is used to check
    whether to log the slow query or not. When replaying binlog
    events the statement contains the SET TIMESTAMP clause which will
    force the slow logging condition check to fail. Consequently, the
    slow query logging will not take place.
                        
    This patch addresses this issue by removing the second condition
    from the log_slow_statements as it prevents slow queries to be
    binlogged and seems to be deprecated.
    e925bd73
log.cc 168 KB