List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:March 30 2006 4:53pm
Subject:bk commit into 5.0 tree (aelkin:1.2122) BUG#17284
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of elkin. When elkin 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
  1.2122 06/03/30 17:53:45 aelkin@stripped +2 -0
  Bug#17284 erroneous temp table cleanup on slave.

  sql/sql_repl.cc
    1.148 06/03/30 17:53:40 aelkin@stripped +6 -0
    Storing zero for assigning to `created' of FD event on the slave.

  mysql-test/t/rpl_temporary.test
    1.16 06/03/30 17:53:40 aelkin@stripped +23 -0
    Specific for temp table check on slave upon its reconnect is added.

# 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:	aelkin
# Host:	dsl-hkigw8-feb0de00-199.dhcp.inet.fi
# Root:	/usr_rh9/home/elkin.rh9/MySQL/FIXES/5.0.20-bug17284-temp_table

--- 1.147/sql/sql_repl.cc	2006-01-03 18:54:37 +02:00
+++ 1.148/sql/sql_repl.cc	2006-03-30 17:53:40 +03:00
@@ -466,6 +466,12 @@
            (rli->group_master_log_pos)
          */
          int4store((char*) packet->ptr()+LOG_POS_OFFSET+1, 0);
+         /*
+           if reconnect master sends FD event with `created' as 0
+           to avoid destroying temp tables.
+          */
+         int4store((char*) packet->ptr()+LOG_EVENT_MINIMAL_HEADER_LEN+
+                   ST_CREATED_OFFSET+1, (ulong) 0);
          /* send it */
          if (my_net_write(net, (char*)packet->ptr(), packet->length()))
          {

--- 1.15/mysql-test/t/rpl_temporary.test	2005-07-28 16:12:37 +03:00
+++ 1.16/mysql-test/t/rpl_temporary.test	2006-03-30 17:53:40 +03:00
@@ -129,6 +129,29 @@
 create temporary table t3 (f int);
 sync_with_master;
 
+#
+# Bug#17284 erroneous temp table cleanup on slave
+#
+connection slave;
+set global slave_net_timeout=10;
+stop slave;
+start slave;
+
+connection master;
+create temporary table t4 (f int);
+create table t5 (f int);
+insert into t4 values (1);
+--sleep 15
+insert into t5 select * from t4;
+sync_with_master;
+
+connection slave;
+select * from t5 /* must be 1 after reconnect */;
+
+connection master;
+drop temporary table t4;
+drop table t5;
+
 # The server will now close done
 
 # End of 4.1 tests
Thread
bk commit into 5.0 tree (aelkin:1.2122) BUG#17284Andrei Elkin30 Mar