ensure statement is not bigger than statement_size

Bug #1250269 reported by Max Bubenick
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Data Dumper
Fix Released
Low
Max Bubenick

Bug Description

mydumper has this:
/* INSERT statement is closed once over limit */
if (statement->len > statement_size) {
g_string_append(statement,");\n");
If max_allowed_packet is 1MB (1048576) and the last insert is over 48,576 bytes, 1048576-1000000, then trying to load this data will result in max_packet_size errors:
ERROR 1153 (08S01) at line 4064: Got a packet bigger than 'max_allowed_packet' bytes
Instead what it should do is not start to append the insert until it knows the current insert will not exceed max_allowed_packet.

Changed in mydumper:
status: Fix Committed → Fix Released
summary: - ensure satetement is not bigger than statement_size
+ ensure statement is not bigger than statement_size
Revision history for this message
Nasir Mahmood (nasir-mahmood) wrote :

hi,

I'm using the latest version of mydumper i-e 0.6.1 and still getting below given for some of the dbs. could you please suggest whats needed to change.

+ ./mydumper-0.6.1/mydumper --database=ps_db --host= --user=root --password=dbpasswd --outputdir=/db_backup_mysql/dbdump..Tue --rows=500000 --compress --build-empty-files --threads=4 --compress-protocol

** (mydumper:14274): WARNING **: Row bigger than statement_size for pms3_bwestates.pms_attachments

please suggest whats' wrong here.

Regards,
Nasir

Revision history for this message
Max Bubenick (max-bubenick) wrote :

Hi Nasir, that mean that pms3_bwestates.pms_attachments have a row that is bigger (in bytes) than statement_size.

-s, --statement-size Attempted size of INSERT statement in bytes, default 1000000

you can increase that var to reflect the max_allowed_packet server setting.

To be clear, the backups is consistent but mydumper is alerting because maybe you need to increase max_allowed_packet on the server and also on mydumper.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.