Bug #82662 Misleading error message for max_allowed_packet set too small
Submitted: 20 Aug 2016 4:42 Modified: 22 Aug 2016 17:05
Reporter: Rob Lewis (Candidate Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.6 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: max_packet_size

[20 Aug 2016 4:42] Rob Lewis
Description:
### Steps to reproduce
1. Leave max_allowed_packet at default value
2. Try to import a database with large data fields (~64MB)

### Expected behavior
Process fails with message that max_packet_size has been exceeded

### Actual behavior
Process fails with message "The server has gone away"

This bug is known to exist in MySQL 5.5 and 5.6. 

How to repeat:
1. Leave max_allowed_packet at default value
2. Try to import a database with large data fields (~64MB)

Suggested fix:
Change error message to reflect the actual nature of the error.
[22 Aug 2016 8:20] MySQL Verification Team
Hello Rob, 

Thank you for the report.
Imho this is documented behavior, please see http://dev.mysql.com/doc/refman/5.7/en/gone-away.html

Thanks,
Umesh
[22 Aug 2016 17:05] Rob Lewis
You're right: it is "documented" in a well-hidden place. But more importantly, the message makes no sense in the context of a query that is too large. Why can't it produce an error message that describes the actual problem, instead of leading us (me) down the garden path, looking for an answer in all the wrong places? 

It's like if my car runs out of gas while I'm driving along, and a warning light appears on the dash informing me that my tires are low!