• Manish Kumar's avatar
    BUG#12400221 - 60926: BINARY LOG EVENTS LARGER THAN MAX_ALLOWED_PACKET · 6c03d09e
    Manish Kumar authored
    Problem
    ========
                
    Replication breaks in the cases if the event length exceeds 
    the size of master Dump thread's max_allowed_packet.
                  
    The reason why this failure is occuring is because the event length is
    more than the total size of the max_allowed_packet, on addition of the  
    max_event_header length exceeds the max_allowed_packet of the DUMP thread.
    This causes the Dump thread to break replication and throw an error.
                          
    That can happen e.g with row-based replication in Update_rows event.
                
    Fix
    ====
              
    The problem is fixed in 2 steps:
    
    1.) The Dump thread limit to read event is increased to the upper limit
        i.e. Dump thread reads whatever gets logged in the binary log.
    
    2.) On the slave side we increase the the max_allowed_packet for the
        slave's threads (IO/SQL) by increasing it to 1GB.
    
        This is done using the new server option (slave_max_allowed_packet)
        included, is used to regulate the max_allowed_packet of the  
        slave thread (IO/SQL) by the DBA, and facilitates the sending of
        large packets from the master to the slave.
    
        This causes the large packets to be received by the slave and apply
        it successfully.
    6c03d09e
sql_repl.cc 56.7 KB