List:Commits« Previous MessageNext Message »
From:damien Date:June 13 2007 10:24pm
Subject:bk commit into 5.1 tree (dkatz:1.2545) BUG#28953
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of dkatz. When dkatz 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-06-13 16:24:21-04:00, dkatz@stripped +3 -0
  Bug #28953  	Using events in a replication let the slave crash.
  
  Fixed where the slave code would try to update the Lex->sphead which is NULL on an
"alter table" commands.

  mysql-test/r/rpl_events.result@stripped, 2007-06-13 16:24:16-04:00,
dkatz@stripped +6 -0
    test that "alter event" replicates without crashing the slave

  mysql-test/t/rpl_events.test@stripped, 2007-06-13 16:24:16-04:00,
dkatz@stripped +23 -0
    test that "alter event" replicates without crashing the slave

  sql/sql_parse.cc@stripped, 2007-06-13 16:24:16-04:00, dkatz@stripped +1
-1
    Added a check for lex->spd, which isn't set on an "alter event" command

# 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:	dkatz
# Host:	damien-katzs-computer.local
# Root:	/Users/dkatz/51_win

--- 1.677/sql/sql_parse.cc	2007-06-05 16:49:13 -04:00
+++ 1.678/sql/sql_parse.cc	2007-06-13 16:24:16 -04:00
@@ -1567,7 +1567,7 @@ bool sp_process_definer(THD *thd)
     if (lex->definer == NULL)
       DBUG_RETURN(TRUE);
 
-    if (thd->slave_thread)
+    if (thd->slave_thread && lex->sphead)
       lex->sphead->m_chistics->suid= SP_IS_NOT_SUID;
   }
   else

--- 1.5/mysql-test/r/rpl_events.result	2007-04-13 23:53:03 -04:00
+++ 1.6/mysql-test/r/rpl_events.result	2007-06-13 16:24:16 -04:00
@@ -157,3 +157,9 @@ test	slave_terminate	SLAVESIDE_DISABLED	
 DROP EVENT test.slave_terminate;
 "in the master"
 DROP TABLE t1;
+CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
+DO BEGIN
+select * from t1;
+END;|
+ALTER EVENT event1 RENAME TO event2;
+DROP EVENT event2;

--- 1.1/mysql-test/t/rpl_events.test	2007-03-16 09:56:50 -04:00
+++ 1.2/mysql-test/t/rpl_events.test	2007-06-13 16:24:16 -04:00
@@ -22,3 +22,26 @@ set binlog_format=statement;
 # Embedded server doesn't support binlogging
 --source include/rpl_events.inc
 
+#
+# Bug #28953  	Using events in a replication let the slave crash.
+#
+
+connection master;
+
+DELIMITER |;
+CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
+DO BEGIN
+	select * from t1;
+END;|
+DELIMITER ;|
+
+ALTER EVENT event1 RENAME TO event2;
+
+sync_slave_with_master;
+
+connection master;
+
+DROP EVENT event2;
+
+sync_slave_with_master;
+
Thread
bk commit into 5.1 tree (dkatz:1.2545) BUG#28953damien13 Jun