max_allowed_packet can be 1GB
max_long_data_size can be 4GB
So if you want to insert (in chunks) more than 1G you need this variable.
Daniël van Eeden
added a comment - I used this to test this:
https://github.com/dveeden/mysql_supersize/blob/master/C/supersize.c
max_allowed_packet can be 1GB
max_long_data_size can be 4GB
So if you want to insert (in chunks) more than 1G you need this variable.
Note that for max_allowed_packet < transaction < max_long_data_size this will break replication and point-in-time restore based on binlogs. So this setting is dangerous on systems with binlog enabled.
Daniël van Eeden
added a comment - Note that for max_allowed_packet < transaction < max_long_data_size this will break replication and point-in-time restore based on binlogs. So this setting is dangerous on systems with binlog enabled.
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '.' at 4, the last event read from 'mysql-bin.000006' at 1000000917, the last byte read from 'mysql-bin.000006' at 1000000936.'
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'mysql-bin.000001' at 312, the last event read from 'mysql-bin.000005' at 1000000898, the last byte read from 'mysql-bin.000005' at 1000000917.'
This is with master and slave with max_allowed_packet = 1G.
Daniël van Eeden
added a comment - - edited It happens both when master uses SBR and RBR:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '.' at 4, the last event read from 'mysql-bin.000006' at 1000000917, the last byte read from 'mysql-bin.000006' at 1000000936.'
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'mysql-bin.000001' at 312, the last event read from 'mysql-bin.000005' at 1000000898, the last byte read from 'mysql-bin.000005' at 1000000917.'
This is with master and slave with max_allowed_packet = 1G.
This is still listed as deprecated, and in practice set to max_allowed_packet, so perhaps 10.2 is a good time to remove it?
Ian Gilfillan
added a comment - This is still listed as deprecated, and in practice set to max_allowed_packet, so perhaps 10.2 is a good time to remove it?
I used this to test this:
https://github.com/dveeden/mysql_supersize/blob/master/C/supersize.c
max_allowed_packet can be 1GB
max_long_data_size can be 4GB
So if you want to insert (in chunks) more than 1G you need this variable.