Bug #44690 Not consistent behaviour on slaves when at or over max_allowed_packet size
Submitted: 6 May 14:01 Modified: 12 Jun 11:01
Reporter: Roger Nay
Status: Verified
Category:Server: Replication Severity:S3 (Non-critical)
Version:5.0.74, 5.1 OS:Any
Assigned to: Alfranio Correia Target Version:
Triage: Triaged: D3 (Medium)

[6 May 14: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 6:33] Susanne Ebrecht
Bug #46769 is marked as duplicate of this bug here.