Bug #44690 Not consistent behaviour on slaves when at or over max_allowed_packet size
Submitted: 6 May 2009 12:01 Modified: 10 Jan 2013 14:30
Reporter: Roger Nay Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0.74, 5.1 OS:Any
Assigned to: Alfranio Correia
Triage: Triaged: D3 (Medium)

[6 May 2009 12:01] Roger Nay
Description:
With max_allowed_packet size set to 3M on two slaves, same statement from the master works on one of the slave, but stops on the other with the following error:

090502 10:04:22 [ERROR] Error reading packet from server: Got packet bigger than 'max_allowed_packet' bytes ( server_errno=2020)
090502 10:04:22 [ERROR] Log entry on master is longer than max_allowed_packet (3146189) on slave. If the entry is correct, restart the server with a higher value of
max_allowed_packet

A "slave start" on the slave that previously had the error, and the statement is processed this time without error. The statement is a few bytes over 3M (3145728) at 3145790 bytes and I suppose should always fail with the error.

How to repeat:
I repeated this on 5.1. The statement has no problem, stopping with the error (we've only seen it once with 5.0.74) seems to be the exception rather than the rule.

Create the table and run the SQL statement a number of times. No error. Files attached.

Suggested fix:
Should fail every time if the size of the packet is over the max_allowed_packet size, or at least consistent behaviour.
[8 Sep 2009 4:33] Susanne Ebrecht
Bug #46769 is marked as duplicate of this bug here.
[15 Feb 2010 11:03] Alfranio Correia
See also BUG#49932.
[10 Jan 2013 13:29] Erlend Dahl
Fixed in 5.1.64 as a duplicate of bug#60926