MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:March 16 2007 2:25pm
Subject:bk commit into 5.0 tree (kaa:1.2391) BUG#23775
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kaa. When kaa does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-03-16 17:25:20+03:00, kaa@stripped +3 -0
  Fix for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits".
  
  Problem: to handle a situation when the size of event on the master is greater than max_allowed_packet on slave, we checked for the wrong constant (ER_NET_PACKET_TOO_LARGE instead of CR_NET_PACKET_TOO_LARGE).
  
  Solution: test for the client "packet too large" error code instead of the server one in slave I/O thread.

  mysql-test/r/rpl_packet.result@stripped, 2007-03-16 17:25:15+03:00, kaa@stripped +9 -0
    Added test case for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits"

  mysql-test/t/rpl_packet.test@stripped, 2007-03-16 17:25:15+03:00, kaa@stripped +33 -0
    Added test case for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits"

  sql/slave.cc@stripped, 2007-03-16 17:25:15+03:00, kaa@stripped +2 -1
    Test for the client "packet too large" error code instead of the server one in slave I/O thread.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kaa
# Host:	polly.local
# Root:	/tmp/maint/bug23775/my50-bug23775

--- 1.287/sql/slave.cc	2007-03-16 17:25:28 +03:00
+++ 1.288/sql/slave.cc	2007-03-16 17:25:28 +03:00
@@ -25,6 +25,7 @@
 #include <thr_alarm.h>
 #include <my_dir.h>
 #include <sql_common.h>
+#include <errmsg.h>
 
 #define MAX_SLAVE_RETRY_PAUSE 5
 bool use_slave_mask = 0;
@@ -3606,7 +3607,7 @@ after reconnect");
       if (event_len == packet_error)
       {
 	uint mysql_error_number= mysql_errno(mysql);
-	if (mysql_error_number == ER_NET_PACKET_TOO_LARGE)
+	if (mysql_error_number == CR_NET_PACKET_TOO_LARGE)
 	{
 	  sql_print_error("\
 Log entry on master is longer than max_allowed_packet (%ld) on \

--- 1.3/mysql-test/r/rpl_packet.result	2007-03-16 17:25:28 +03:00
+++ 1.4/mysql-test/r/rpl_packet.result	2007-03-16 17:25:28 +03:00
@@ -15,3 +15,12 @@ select count(*) from `DB_NAME_OF_MAX_LEN
 count(*)
 1
 drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
+SET @@global.max_allowed_packet=4096;
+SET @@global.net_buffer_length=4096;
+STOP SLAVE;
+START SLAVE;
+CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
+INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
+SHOW STATUS LIKE 'Slave_running';
+Variable_name	Value
+Slave_running	OFF

--- 1.3/mysql-test/t/rpl_packet.test	2007-03-16 17:25:28 +03:00
+++ 1.4/mysql-test/t/rpl_packet.test	2007-03-16 17:25:28 +03:00
@@ -36,4 +36,37 @@ save_master_pos;
 connection slave;
 sync_with_master;
 
+#
+# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits
+#
+# Check that a situation when the size of event on the master is greater than 
+# max_allowed_packet on the slave does not lead to infinite re-transmits.
+
+connection master;
+
+# Change the max packet size on master
+
+SET @@global.max_allowed_packet=4096;
+SET @@global.net_buffer_length=4096;
+
+# Restart slave for new setting to take effect
+connection slave;
+STOP SLAVE;
+START SLAVE;
+
+# Reconnect to master for new setting to take effect
+disconnect master;
+connect (master, localhost, root)
+connection master;
+
+CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
+
+INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
+
+# The slave I/O thread must stop after trying to read the above event
+connection slave; 
+sleep 2;
+SHOW STATUS LIKE 'Slave_running';
+
+
 # End of tests
Thread
bk commit into 5.0 tree (kaa:1.2391) BUG#23775Alexey Kopytov16 Mar