List:Internals« Previous MessageNext Message »
From:guilhem Date:September 20 2005 9:12pm
Subject:bk commit into 5.0 tree (guilhem:1.1985) BUG#13358
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of guilhem. When guilhem 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.1985 05/09/20 23:12:20 guilhem@stripped +16 -0
  Fix for BUG#13352: "REVOKE ALL, CREATE|RENAME|DROP USER are not binlogged in
   RBR form". Similar fix for ALTER PROCEDURE|FUNCTION.
  Fix for BUG#13358 "RBR slave crashes if INSERT DELAYED on master".
  Plus small modifications of display of Delete_rows_log_event. Comments about TODO.

  wl1012-review-pending-comments.txt
    1.7 05/09/20 23:12:15 guilhem@stripped +9 -4
    update on what was done recently

  sql/sql_parse.cc
    1.464 05/09/20 23:12:15 guilhem@stripped +25 -5
    CREATE|RENAME|DROP USER can now be binlogged row-based. Same for ALTER PROCEDURE|FUNCTION.

  sql/sql_insert.cc
    1.174 05/09/20 23:12:15 guilhem@stripped +6 -1
    don't binlog the INSERT DELAYED query if this is row-based binlogging.

  sql/sql_base.cc
    1.303 05/09/20 23:12:15 guilhem@stripped +6 -1
    don't need auto-binlog of DROP TEMPORARY TABLE when doing row-based

  sql/sp_head.cc
    1.185 05/09/20 23:12:15 guilhem@stripped +2 -1
    a comment so that we don't forget (we won't, as we'll look at the total diff before push,
    and grep for TODO).

  sql/log_event.h
    1.126 05/09/20 23:12:15 guilhem@stripped +6 -1
    Rows_log_event::print() de-implemented, Delete_rows_log_event has its own.

  sql/log_event.cc
    1.207 05/09/20 23:12:15 guilhem@stripped +15 -18
    Delete_rows_log_event deserves its own ::print(). Unifying the 3 ::print() of Rows events.

  mysql-test/t/rpl_row_delayed_ins.test
    1.2 05/09/20 23:12:15 guilhem@stripped +9 -3
    test of rbr of INSERT DELAYED

  mysql-test/t/rpl_000012.test
    1.6 05/09/20 23:12:15 guilhem@stripped +2 -1
    this test is meaningful only in statement-based

  mysql-test/t/rpl000013.test
    1.18 05/09/20 23:12:15 guilhem@stripped +10 -0
    This test is meaningful only in statement-based.

  mysql-test/t/disabled.def
    1.22 05/09/20 23:12:15 guilhem@stripped +0 -1
    enabling test

  mysql-test/r/rpl_row_delayed_ins.result
    1.2 05/09/20 23:12:15 guilhem@stripped +33 -0
    INSERT DELAYED rbr slave crash is fixed

  mysql-test/r/rpl_do_grant.result
    1.5 05/09/20 23:12:15 guilhem@stripped +52 -0
    more result

  BitKeeper/deleted/.del-rpl_row_do_grant.result~2abb12ce7dfae9ad
    1.2 05/09/20 16:21:46 guilhem@stripped +0 -0
    Delete: mysql-test/r/rpl_row_do_grant.result

  BitKeeper/deleted/.del-rpl_row_do_grant.test~f951068b6e20b938
    1.2 05/09/20 16:21:42 guilhem@stripped +49 -0
    Delete: mysql-test/t/rpl_row_do_grant.test

  mysql-test/t/rpl_do_grant.test
    1.9 05/09/20 16:21:14 guilhem@stripped +0 -0
    Rename: BitKeeper/deleted/.del-rpl_do_grant.test~e9b3a7cbd7fdb306 -> mysql-test/t/rpl_do_grant.test

  BitKeeper/deleted/.del-rpl_do_grant.test~e9b3a7cbd7fdb306
    1.8 05/09/20 16:20:53 guilhem@stripped +51 -5
    Delete: mysql-test/t/rpl_do_grant.test

# 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:	guilhem
# Host:	gbichot3.local
# Root:	/home/mysql_src/mysql-5.0-wl1012

--- 1.206/sql/log_event.cc	2005-09-19 16:26:01 +02:00
+++ 1.207/sql/log_event.cc	2005-09-20 23:12:15 +02:00
@@ -5366,22 +5366,6 @@
 }
 #endif
 
-#if defined(MYSQL_CLIENT)
-void Rows_log_event::print(FILE *file, bool short_form,
-                           LAST_EVENT_INFO *last_event_info)
-{
-  /*
-    This is TODO see WL#2321.
-    Until we do it, rollforward from row-based binlogs won't be possible. So
-    it could be called a bug.
-  */
-  if (!short_form)
-  {
-    print_header(file);
-    fprintf(file, "\n#%s\n", get_type_str());
-  }
-}
-#endif
 
 /**************************************************************************
 	Table_map_log_event member functions
@@ -6073,8 +6057,22 @@
 
   DBUG_RETURN(error);
 }
+
 #endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
 
+#ifdef MYSQL_CLIENT
+void Delete_rows_log_event::print(FILE *file, bool short_form,
+				  LAST_EVENT_INFO* last_event_info)
+{
+  if (!short_form)
+  {
+    print_header(file);
+    fprintf(file, "\nDelete_rows: table id %lu\n", m_table_id); // TODO: WL#2321
+  }
+}
+#endif
+
+
 /**************************************************************************
 	Update_rows_log_event member functions
 **************************************************************************/
@@ -6240,8 +6238,7 @@
   if (!short_form)
   {
     print_header(file);
-    // TODO: WL#2321
-    fprintf(file, "\tUpdate_rows: table id %lu\n", m_table_id);
+    fprintf(file, "\nUpdate_rows: table id %lu\n", m_table_id); // TODO: WL#2321
   }
 }
 #endif

--- 1.125/sql/log_event.h	2005-09-19 16:26:02 +02:00
+++ 1.126/sql/log_event.h	2005-09-20 23:12:15 +02:00
@@ -1756,8 +1756,9 @@
 #endif
 
 #ifdef MYSQL_CLIENT
+  /* not for direct call, each derived has its own ::print() */
   virtual void print(FILE *file, bool short_form = 0, 
-		     LAST_EVENT_INFO *last_event_info= 0);
+		     LAST_EVENT_INFO *last_event_info= 0)= 0;
 #endif
 
   bool add_row_data(byte *data, my_size_t length)
@@ -2073,6 +2074,10 @@
   
 private:
   virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
+
+#ifdef MYSQL_CLIENT
+  void print(FILE *file, bool short_form, LAST_EVENT_INFO *last_event_info);
+#endif
 
 #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
   gptr  m_memory;

--- 1.302/sql/sql_base.cc	2005-09-15 09:02:14 +02:00
+++ 1.303/sql/sql_base.cc	2005-09-20 23:12:15 +02:00
@@ -636,7 +636,11 @@
     next=table->next;
     close_temporary(table, 1);
   }
-  if (query && found_user_tables && mysql_bin_log.is_open())
+  if (query && found_user_tables && mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+      && !binlog_row_based // CREATE TEMP TABLE not binlogged if row-based
+#endif
+      )
   {
     /* The -1 is to remove last ',' */
     thd->clear_error();
@@ -1841,6 +1845,7 @@
       uint query_buf_size= 20 + 2*NAME_LEN + 1;
       if ((query= (char*)my_malloc(query_buf_size,MYF(MY_WME))))
       {
+        /* this DELETE FROM is needed even with row-based binlogging */
         end = strxmov(strmov(query, "DELETE FROM `"),
                       db,"`.`",name,"`", NullS);
         Query_log_event qinfo(thd, query, (ulong)(end-query), 0, FALSE);

--- 1.173/sql/sql_insert.cc	2005-09-16 13:12:02 +02:00
+++ 1.174/sql/sql_insert.cc	2005-09-20 23:12:15 +02:00
@@ -1936,7 +1936,12 @@
 {
   int error;
   ulong max_rows;
-  bool using_ignore=0, using_bin_log=mysql_bin_log.is_open();
+  bool using_ignore=0, using_bin_log= (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+                                       && !binlog_row_based
+#endif
+                                       );
+
   delayed_row *row;
   DBUG_ENTER("handle_inserts");
 

--- 1.463/sql/sql_parse.cc	2005-09-19 16:26:03 +02:00
+++ 1.464/sql/sql_parse.cc	2005-09-20 23:12:15 +02:00
@@ -3651,7 +3651,11 @@
       break;
     if (!(res= mysql_create_user(thd, lex->users_list)))
     {
-      if (mysql_bin_log.is_open())
+      if (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+          && !binlog_row_based
+#endif
+          )
       {
         Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
         mysql_bin_log.write(&qinfo);
@@ -3667,7 +3671,11 @@
       break;
     if (!(res= mysql_drop_user(thd, lex->users_list)))
     {
-      if (mysql_bin_log.is_open())
+      if (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+          && !binlog_row_based
+#endif
+          )
       {
         Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
         mysql_bin_log.write(&qinfo);
@@ -3683,7 +3691,11 @@
       break;
     if (!(res= mysql_rename_user(thd, lex->users_list)))
     {
-      if (mysql_bin_log.is_open())
+      if (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+          && !binlog_row_based
+#endif
+          )
       {
         Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
         mysql_bin_log.write(&qinfo);
@@ -3699,7 +3711,11 @@
       break;
     if (!(res = mysql_revoke_all(thd, lex->users_list)))
     {
-      if (mysql_bin_log.is_open())
+      if (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+          && !binlog_row_based
+#endif
+          )
       {
 	Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
 	mysql_bin_log.write(&qinfo);
@@ -4318,7 +4334,11 @@
       switch (result)
       {
       case SP_OK:
-        if (mysql_bin_log.is_open())
+        if (mysql_bin_log.is_open()
+#ifdef HAVE_ROW_BASED_REPLICATION
+            && !binlog_row_based
+#endif
+            )
         {
           thd->clear_error();
           Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);

--- 1.4/mysql-test/r/rpl_do_grant.result	2004-07-08 15:54:02 +02:00
+++ 1.5/mysql-test/r/rpl_do_grant.result	2005-09-20 23:12:15 +02:00
@@ -24,3 +24,55 @@
 delete from mysql.db where user=_binary'rpl_do_grant';
 flush privileges;
 flush privileges;
+show grants for rpl_do_grant@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
+show grants for rpl_do_grant@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
+create user rpl_do_grant@localhost;
+show grants for rpl_do_grant@localhost;
+Grants for rpl_do_grant@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost'
+show grants for rpl_do_grant2@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
+show grants for rpl_do_grant@localhost;
+Grants for rpl_do_grant@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost'
+show grants for rpl_do_grant2@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
+rename user rpl_do_grant@localhost to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
+revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
+revoke all privileges, grant option from rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+show grants for rpl_do_grant2@localhost;
+Grants for rpl_do_grant2@localhost
+GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
+drop user rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
+show grants for rpl_do_grant2@localhost;
+ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'

--- 1.1/mysql-test/r/rpl_row_delayed_ins.result	2005-09-14 16:20:10 +02:00
+++ 1.2/mysql-test/r/rpl_row_delayed_ins.result	2005-09-20 23:12:15 +02:00
@@ -0,0 +1,33 @@
+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;
+start slave;
+create table t1(a int not null primary key) engine=myisam;
+insert delayed into t1 values (1),(2),(3);
+flush no_write_to_binlog tables;
+select * from t1;
+a
+1
+2
+3
+show binlog events;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	4	Format_desc	1	102	<info>
+master-bin.000001	102	Query	1	222	<info>
+master-bin.000001	222	Table_map	1	259	<info>
+master-bin.000001	259	Write_rows	1	301	<info>
+select * from t1;
+a
+1
+2
+3
+show binlog events;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+slave-bin.000001	4	Format_desc	2	102	<info>
+slave-bin.000001	102	Query	2	212	<info>
+slave-bin.000001	212	Query	1	332	<info>
+slave-bin.000001	332	Table_map	1	369	<info>
+slave-bin.000001	369	Write_rows	1	411	<info>
+drop table t1;

--- 1.7/mysql-test/t/rpl_do_grant.test	2005-09-16 13:12:00 +02:00
+++ 1.9/mysql-test/t/rpl_do_grant.test	2005-09-20 16:21:14 +02:00
@@ -1,8 +1,5 @@
-# NYI - row-based repl of grants table requires special treatment on slave
-# Should be tested on rbr when http://bugs.mysql.com/bug.php?id=12726 is patched# TODO:Once patched remove include have_binlog_format_statement.inc [jbm]
--- source include/have_binlog_format_statement.inc
-
-# Test that GRANT and SET PASSWORD are replicated to the slave
+# Works in statement-based and row-based binlogging.
+# Test that GRANT and other user management commands are replicated to the slave
 
 -- source include/master-slave.inc
 
@@ -50,3 +47,52 @@
 flush privileges;
 
 # End of 4.1 tests
+
+connection master;
+--error 1141
+show grants for rpl_do_grant@localhost;
+connection slave;
+--error 1141
+show grants for rpl_do_grant@localhost;
+
+connection master;
+create user rpl_do_grant@localhost;
+show grants for rpl_do_grant@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+rename user rpl_do_grant@localhost to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+revoke all privileges, grant option from rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+drop user rpl_do_grant2@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+--error 1141
+show grants for rpl_do_grant2@localhost;

--- 1.1/mysql-test/t/rpl_row_delayed_ins.test	2005-09-14 16:20:10 +02:00
+++ 1.2/mysql-test/t/rpl_row_delayed_ins.test	2005-09-20 23:12:15 +02:00
@@ -1,14 +1,20 @@
-# See if INSERT DELAYED gets binlogged row-based
--- source include/have_binlog_format_row.inc
+# See if INSERT DELAYED gets replicated
 -- source include/master-slave.inc
 
 connection master;
 create table t1(a int not null primary key) engine=myisam;
-/* delayed causes a crash */
 insert delayed into t1 values (1),(2),(3);
+# force DELAYED thread to execute. We don't write FLUSH TABLES
+# to binlog because it crashes slave (TODO: investigate).
+flush no_write_to_binlog tables;
+select * from t1;
+ # When we have a solution for this non-repeatable TID,
+# we should not replace column 6
+--replace_column 6 <info>
 show binlog events;
 sync_slave_with_master;
 select * from t1;
+--replace_column 6 <info>
 show binlog events;
 connection master;
 drop table t1;

--- 1.6/wl1012-review-pending-comments.txt	2005-09-19 16:26:01 +02:00
+++ 1.7/wl1012-review-pending-comments.txt	2005-09-20 23:12:15 +02:00
@@ -207,6 +207,8 @@
 [G2DONE] example). I also removed call of db_ok_with_wild_table() as
 [G2DONE] it's a function for the slave (tests again replicate-wild*
 [G2DONE] rules).
+[G2DONE] And Mats fixed all consequences of removing the check of
+[G2DONE] "mysql".
 
 > +int handler::
 > +ha_write_row(byte *buf) 
@@ -4486,9 +4488,10 @@
 [G] which you need to update too
 [G] (there, using_bin_log should depend on opt_binlog_row_based_logging).
 
-[G2TODO] testing row-based binlogging of INSERT DELAYED causes crash
-[G2TODO] in ha_myisam.cc, which looks like BUG#12854. So should be checked
-[G2TODO] again after BUG#12854 has been fixed.
+[G2DONE] testing row-based binlogging of INSERT DELAYED caused crash
+[G2DONE] in ha_myisam.cc (BUG#13358), I fixed crash and proper binlogging.
+
+
 
 > --- 1.457/sql/sql_parse.cc	2005-07-13 13:11:48 +02:00
 > +++ 1.458/sql/sql_parse.cc	2005-07-15 20:33:17 +02:00
@@ -4539,7 +4542,9 @@
 [G] As you don't binlog CREATE/ALTER of a tmp table, DROP shouldn't be
 [G] binlogged either (sql_table.cc).
 
-[G2TODO]
+[G2DONE] Mats fixed some of the issues above, I fixed some others, I
+[G2DONE] grepped for all potential problems above and we have now
+[G2DONE] fixed them all.
 
 > --- 1.253/sql/sql_show.cc	2005-07-07 15:48:40 +02:00
 > +++ 1.254/sql/sql_show.cc	2005-07-15 20:33:17 +02:00

--- 1.1/mysql-test/t/rpl_row_do_grant.test	2005-08-26 02:29:13 +02:00
+++ 1.2/BitKeeper/deleted/.del-rpl_row_do_grant.test~f951068b6e20b938	2005-09-20 16:21:42 +02:00
@@ -49,3 +49,52 @@
 flush privileges;
 
 # End of 4.1 tests
+
+#create user, drop user, rename user, revoke all, alter proc
+
+connection master;
+--error 1141
+show grants for rpl_do_grant@localhost;
+connection slave;
+--error 1141
+show grants for rpl_do_grant@localhost;
+
+connection master;
+create user rpl_do_grant@localhost;
+show grants for rpl_do_grant@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+rename user rpl_do_grant@localhost to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+connection master;
+revoke all privileges, grant option from rpl_do_grant2@localhost;
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+show grants for rpl_do_grant2@localhost;
+
+
+connection master;
+drop user rpl_do_grant2@localhost;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+sync_slave_with_master;
+--error 1141
+show grants for rpl_do_grant2@localhost;
+
+
+# TODO: cleanup

--- 1.21/mysql-test/t/disabled.def	2005-09-19 18:33:11 +02:00
+++ 1.22/mysql-test/t/disabled.def	2005-09-20 23:12:15 +02:00
@@ -44,4 +44,3 @@
 rpl_row_UUID:Bug 12461
 rpl_row_NOW:Bug 12574 
 rpl_sp004:Bug 12857
-rpl_row_delayed_ins:Bug 12854 probably

--- 1.5/mysql-test/t/rpl_000012.test	2005-09-19 20:23:44 +02:00
+++ 1.6/mysql-test/t/rpl_000012.test	2005-09-20 23:12:15 +02:00
@@ -1,5 +1,6 @@
 # drop table t1 t2 t3 are included int master-slave.inc
-#-- source include/have_binlog_format_row.inc
+# Like rpl000013, meaningful only in statement-based:
+-- source include/have_binlog_format_statement.inc
 # Should work on both stm and row
 -- source include/master-slave.inc
 

--- 1.184/sql/sp_head.cc	2005-09-15 01:57:52 +02:00
+++ 1.185/sql/sp_head.cc	2005-09-20 23:12:15 +02:00
@@ -1149,7 +1149,8 @@
       param_values[i]->print(&bufstr);
     }
     bufstr.append(')');
-    
+
+    /* TODO: check if needed in row-based */
     Query_log_event qinfo(thd, bufstr.ptr(), bufstr.length(),
                           thd->binlog_evt_union.unioned_events_trans, FALSE);
     if (mysql_bin_log.write(&qinfo) && 

--- 1.17/mysql-test/t/rpl000013.test	2005-07-28 02:21:47 +02:00
+++ 1.18/mysql-test/t/rpl000013.test	2005-09-20 23:12:15 +02:00
@@ -1,3 +1,13 @@
+# This test is to verify that DROP TEMPORARY TABLE
+# is automatically binlogged and sent to slave
+# when a temp table is dropped by disconnection
+# of a master's conection.
+# So it does not apply to row-based, where we neither need
+# nor do this automatic binlogging. And if we run this test
+# in row-based, it hangs waiting for an offset which is never
+# reached (the "sync_with_master 1"), logically.
+
+--source include/have_binlog_format_statement.inc
 source include/master-slave.inc;
 save_master_pos;
 connection slave;
Thread
bk commit into 5.0 tree (guilhem:1.1985) BUG#13358guilhem20 Sep