List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:February 23 2005 6:58pm
Subject:bk commit into 4.1 tree (mats:1.2187) BUG#8412
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mats. When mats 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.2187 05/02/23 19:58:54 mats@stripped +3 -0
  Bug#8412: Merge from 4.0

  sql/log.cc
    1.161 05/02/23 19:58:51 mats@stripped +0 -1
    Merge from 4.0

  mysql-test/t/rpl_insert_id.test
    1.8 05/02/23 19:54:12 mats@stripped +0 -0
    Auto merged

  mysql-test/t/rpl_insert_id.test
    1.1.1.7 05/02/23 19:54:12 mats@stripped +0 -0
    Turn off EOLN_NATIVE flag

  mysql-test/r/rpl_insert_id.result
    1.10 05/02/23 19:54:12 mats@stripped +0 -0
    Auto merged

  mysql-test/r/rpl_insert_id.result
    1.2.1.6 05/02/23 19:54:11 mats@stripped +0 -0
    Turn off EOLN_NATIVE flag

# 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:	mats
# Host:	romeo.kindahl.net
# Root:	/home/bk/b8412-mysql-4.1/RESYNC

--- 1.160/sql/log.cc	2005-02-10 21:22:54 +01:00
+++ 1.161/sql/log.cc	2005-02-23 19:58:51 +01:00
@@ -1389,6 +1389,7 @@
 	p= strmov(strmov(buf, "SET CHARACTER SET "),
 		  thd->variables.convert_set->name);
 	Query_log_event e(thd, buf, (ulong) (p - buf), 0);
+	e.error_code = 0;	// This statement cannot fail (see [1]).
 	e.set_log_pos(this);
 	if (e.write(file))
 	  goto err;
@@ -1407,12 +1408,22 @@
       {
 	Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=0", 24, 0, FALSE);
 	e.set_log_pos(this);
+	e.error_code = 0;	// This statement cannot fail (see [1]).
 	if (e.write(file))
 	  goto err;
       }
     }
 
-    /* Write the SQL command */
+    /* 
+       Write the SQL command 
+       
+       [1] If this statement has an error code, the slave is required to fail
+           with the same error code or stop. The preamble and epilogue should
+           *not* have this error code since the execution of those is
+           guaranteed *not* to produce any error code. This would therefore
+           stop the slave even if the execution of the real statement can be
+           handled gracefully by the slave.
+     */
 
     event_info->set_log_pos(this);
     if (event_info->write(file))
@@ -1426,6 +1437,7 @@
       {
         Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0, FALSE);
         e.set_log_pos(this);
+	e.error_code = 0;	// This statement cannot fail (see [1]).
         if (e.write(file))
           goto err;
       }

--- 1.2.1.5/mysql-test/r/rpl_insert_id.result	2005-02-14 18:39:31 +01:00
+++ 1.10/mysql-test/r/rpl_insert_id.result	2005-02-23 19:54:12 +01:00
@@ -1,10 +1,9 @@
-slave stop;
+stop slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-slave start;
-drop table if exists t1;
+start slave;
 create table t1(a int auto_increment, key(a));
 create table t2(b int auto_increment, c int, key(b));
 insert into t1 values (1),(2),(3);
@@ -21,8 +20,8 @@
 1	4
 drop table t1;
 drop table t2;
-create table t1(a int auto_increment, key(a)) type=innodb;
-create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) type=innodb;
+create table t1(a int auto_increment, key(a)) engine=innodb;
+create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb;
 SET FOREIGN_KEY_CHECKS=0;
 insert into t1 values (10);
 insert into t1 values (null),(null),(null);

--- 1.1.1.6/mysql-test/t/rpl_insert_id.test	2005-02-14 18:39:32 +01:00
+++ 1.8/mysql-test/t/rpl_insert_id.test	2005-02-23 19:54:12 +01:00
@@ -6,7 +6,6 @@
 source include/master-slave.inc;
 source include/have_innodb.inc
 connection master;
-drop table if exists t1;
 create table t1(a int auto_increment, key(a));
 create table t2(b int auto_increment, c int, key(b));
 insert into t1 values (1),(2),(3);
@@ -24,8 +23,8 @@
 drop table t1;
 drop table t2;
 --disable_warnings
-create table t1(a int auto_increment, key(a)) type=innodb;
-create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) type=innodb;
+create table t1(a int auto_increment, key(a)) engine=innodb;
+create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb;
 --enable_warnings
 SET FOREIGN_KEY_CHECKS=0;
 insert into t1 values (10);
Thread
bk commit into 4.1 tree (mats:1.2187) BUG#8412Mats Kindahl23 Feb