summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorManish Kumar <manish.4.kumar@oracle.com>2012-05-30 10:10:52 +0530
committerManish Kumar <manish.4.kumar@oracle.com>2012-05-30 10:10:52 +0530
commit6c03d09e2e96bed671675f1882e6ab1ff821d50c (patch)
tree178e58bbf700e104a9c217e2dad24525b09dd285 /sql/sql_repl.cc
parent35d4c18ef46923d4d1102ea290365e5704574792 (diff)
parent9aa79dc5966b6bba74c772d110265161a018cbf2 (diff)
downloadmariadb-git-6c03d09e2e96bed671675f1882e6ab1ff821d50c.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.cc2
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