[CONC-658] Errors caused by MYSQL_OPT_MAX_ALLOWED_PACKET are misleading Created: 2023-07-24  Updated: 2023-07-24

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: markus makela Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The errors that are reported when the client-side max_allowed_packet limit is reached are not helpful and at worst are misleading: exceeding the value in a resultset causes the error to be reported as:

ERROR 2013 (HY000): Lost connection to server during query

The error is technically true: the connection is lost but it was lost because the connector itself closed it because the client-side limit for max_allowed_packet was exceeded. This makes it hard to debug problems related resultsets when the true cause of the error is not known.

At the time of writing, the default values for the option are also not documented but based on the source code, it appears to be 1GiB. This also differs from the MariaDB default of 16MiB and the default that is used by the mariadb client, also 16MiB.


Generated at Thu Feb 08 03:06:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.