[MDEV-32263] Increase mysqldump default max_allowed_packet variable Created: 2023-09-27  Updated: 2023-10-04

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: 10.11, 11.0, 11.1

Type: Task Priority: Minor
Reporter: Silver Asu Assignee: Andrew Hutchings
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File mysqldump-10.11-max-allowed-packet-1G.patch    

 Description   

For some reason mysqldump has by default max_allowed_packet 24MB.
If you have one field bigger than 24MB, then mysqldump will drop connection in the middle of packet and server will see "connection reset by peer" error.
User has basically no idea, what is causing this error.

24MB seems to be too small default value.

For example mysql client has default max_allowed_packet 1GB.

Yes, it is possible to increase this value from commandline parameter, but as there is no proper error message and user does not know what's the problem causing this error.

I suggest, we should increase mysqldump default value to 1GB, the same as mysql client.



 Comments   
Comment by Sergei Golubchik [ 2023-10-02 ]

Sure. I don't see any drawbacks from increasing the default.
May be we should do it in other clients too, e.g. it'd be unexpected if mysqldump could produce a dump that mysql cannot restore.

Comment by Ralf Gebhardt [ 2023-10-03 ]

serg, and you would agree to do this change of the default also for current GA versions?

Comment by Sergei Golubchik [ 2023-10-04 ]

yes, because I cannot think of any negative effects of this change. Except that the client will use more memory instead of aborting in the middle of a big dump. But it's probably a good thing. Those who are short on memory likely set max_allowed_packet anyway and don't rely on a default.

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