• Manish Kumar's avatar
    BUG#16438800 - SLAVE_MAX_ALLOWED_PACKET NOT HONORED ON SLAVE IO CONNECT · 142fbb9e
    Manish Kumar authored
          
    Problem - When the slave was disconnected from the master, under certain 
              conditions, upon reconnect, it will report that it received a 
              packet larger the slave_max_allowed_packet which causes the
              replication to stop.
     
    Analysis -The reason of this failure is that on reconnect
              the slave sets the max_allowed_packet from the master's mi->mysql
              object which keeps the max_allowed_packet as 1MB. This causes the 
              slave to report such error on recieving packet bigger than 1MB. 
              START SLAVE on the slave fixes the problem since it restarts
              slave threads which initializes the max_allowed_packet to
              slave_max_allowed_packet.
          
    Fix - The problem is fixed by some code refactoring and introduction of a new
          function which updates the max_allowed_packet for the THD object of the
          slave thread and the mysql->options max_allowed_packet.
    142fbb9e
slave.cc 173 KB