diff options
author | Manish Kumar <manish.4.kumar@oracle.com> | 2012-06-12 12:59:13 +0530 |
---|---|---|
committer | Manish Kumar <manish.4.kumar@oracle.com> | 2012-06-12 12:59:13 +0530 |
commit | 1211b5d50bb00935d07fb9eda2dd6821d8f1cac5 (patch) | |
tree | 13654e7e8ad2169450fd3f44c20eddcfabc227ff /sql/sql_repl.cc | |
parent | 0a8ae683297e494703c50d362e211d3ed1f3f5c3 (diff) | |
parent | 9aa79dc5966b6bba74c772d110265161a018cbf2 (diff) | |
download | mariadb-git-1211b5d50bb00935d07fb9eda2dd6821d8f1cac5.tar.gz |
BUG#12400221 - 60926: BINARY LOG EVENTS LARGER THAN MAX_ALLOWED_PACKET
Problem
========
Replication breaks in the cases if the event length exceeds
the size of master Dump thread's max_allowed_packet.
The reason why this failure is occuring is because the event length is
more than the total size of the max_allowed_packet, on addition of the
max_event_header length exceeds the max_allowed_packet of the DUMP thread.
This causes the Dump thread to break replication and throw an error.
That can happen e.g with row-based replication in Update_rows event.
Fix
====
The problem is fixed in 2 steps:
1.) The Dump thread limit to read event is increased to the upper limit
i.e. Dump thread reads whatever gets logged in the binary log.
2.) On the slave side we increase the the max_allowed_packet for the
slave's threads (IO/SQL) by increasing it to 1GB.
This is done using the new server option (slave_max_allowed_packet)
included, is used to regulate the max_allowed_packet of the
slave thread (IO/SQL) by the DBA, and facilitates the sending of
large packets from the master to the slave.
This causes the large packets to be received by the slave and apply
it successfully.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index c92d2db2c1e..7aa8176ae62 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -469,7 +469,7 @@ impossible position"; this larger than the corresponding packet (query) sent from client to master. */ - thd->variables.max_allowed_packet+= MAX_LOG_EVENT_HEADER; + thd->variables.max_allowed_packet= MAX_MAX_ALLOWED_PACKET; /* We can set log_lock now, it does not move (it's a member of |