Skip to content

Handle max_allowed_packet client-side #40

@bgrainger

Description

@bgrainger

If a packet that is larger than max_allowed_packet (a server-defined variable) is sent, the server will reset the connection and send an error packet with the response Got a packet bigger than 'max_allowed_packet' bytes. However, once this happens the connection is destroyed and the client can't recover.

Additionally, it's a waste of time to send the query to the server when we know it'll be rejected. By running SHOW VARIABLES when the connection is established, we could get the value of max_allowed_packet, and check packets to ensure they don't exceed that length before sending them.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions