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.