List:Commits« Previous MessageNext Message »
From:guilhem Date:December 20 2005 10:06pm
Subject:bk commit into 5.1 tree (guilhem:1.1968)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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.1968 05/12/20 23:05:32 guilhem@stripped +27 -0
  WL#1012 "row-based replication" 1) "make test" now runs all tests in SBR and then all tests in ps-protocol in RBR; the build team could use the new
  targets "test-full" (etc) which does more (the cartesian product) (Elliot will email them).
  2) mysql-test-run.sh now runs in SBR by default (like in mysql-5.1-new) (I'll email Tomas and Jeb)
  3) table map id is now stored in 6 bytes in binlog (instead of 4) in prevision of future need: so implementation of uint6korr+int6store,
  debug code to emulate an old master storing in 4 bytes (to see if a 6-byte slave can understand it). The change to 6 bytes shifts positions in some tests.
  In our internal TODO this is referred to as items #18 and #21.

  mysql-test/t/rpl_row_4_bytes.test
    1.1 05/12/20 23:05:04 guilhem@stripped +33 -0
    To test backward-compatibility between a master storing table map ids in 4 bytes in disk binlog, and a slave storing them in 6 bytes
    (test that the slave understands this binlog has them in 4 bytes only).
    This test can be removed after a few months, when we know that the 4-byte masters are not deployed anymore (check with Tomas Ulin first).

  mysql-test/t/rpl_row_4_bytes.test
    1.0 05/12/20 23:05:04 guilhem@stripped +0 -0
    BitKeeper file /home/mysql_src/mysql-5.1-wl1012-v3/mysql-test/t/rpl_row_4_bytes.test

  mysql-test/t/rpl_row_4_bytes-master.opt
    1.1 05/12/20 23:05:02 guilhem@stripped +1 -0
    tell master to write 4-byte table map ids

  mysql-test/t/rpl_row_4_bytes-master.opt
    1.0 05/12/20 23:05:02 guilhem@stripped +0 -0
    BitKeeper file /home/mysql_src/mysql-5.1-wl1012-v3/mysql-test/t/rpl_row_4_bytes-master.opt

  mysql-test/r/rpl_row_4_bytes.result
    1.1 05/12/20 23:04:58 guilhem@stripped +27 -0
    new result

  sql/log_event.h
    1.149 05/12/20 23:04:58 guilhem@stripped +9 -6
    the RBR table map id is now stored in 6 bytes,not 4 (see log_event.cc)

  sql/log_event.cc
    1.205 05/12/20 23:04:58 guilhem@stripped +68 -15
    In prevision of when the RBR table map ids will be equal to the global table id (which will be 6 bytes), we now store the table map id in 6 bytes
    on disk. The variable in memory is still ulong (changing it to ulonglong is not necessary now).
    Plus some code to still store ids in 4 bytes on disk, controlled by a debug option; this is used to test backward-compatibility (see rpl_row_4_bytes.test);
    this emulation code can be removed after a few months, when we know that the 4-byte masters are not deployed anymore (check with Tomas Ulin first).

  sql/log.cc
    1.182 05/12/20 23:04:58 guilhem@stripped +8 -3
    minor changes

  mysql-test/r/rpl_row_4_bytes.result
    1.0 05/12/20 23:04:58 guilhem@stripped +0 -0
    BitKeeper file /home/mysql_src/mysql-5.1-wl1012-v3/mysql-test/r/rpl_row_4_bytes.result

  mysql-test/t/rpl_stm_until.test
    1.23 05/12/20 23:04:57 guilhem@stripped +1 -1
    binlog position update, correcting sentence

  mysql-test/t/rpl_row_until.test
    1.4 05/12/20 23:04:57 guilhem@stripped +9 -11
    binlog position update, correcting sentence

  mysql-test/t/rpl_row_flsh_tbls.test
    1.5 05/12/20 23:04:57 guilhem@stripped +1 -1
    binlog position update

  mysql-test/t/rpl_row_create_table.test
    1.4 05/12/20 23:04:57 guilhem@stripped +4 -4
    binlog position update

  mysql-test/r/rpl_row_until.result
    1.3 05/12/20 23:04:57 guilhem@stripped +8 -8
    binlog position update

  mysql-test/r/rpl_row_sp008.result
    1.3 05/12/20 23:04:57 guilhem@stripped +6 -6
    binlog position update

  mysql-test/r/rpl_row_max_relay_size.result
    1.4 05/12/20 23:04:56 guilhem@stripped +5 -5
    binlog position update

  mysql-test/r/rpl_row_log.result
    1.5 05/12/20 23:04:56 guilhem@stripped +5 -5
    binlog position update

  mysql-test/r/rpl_row_flsh_tbls.result
    1.5 05/12/20 23:04:56 guilhem@stripped +2 -2
    binlog position update

  mysql-test/r/rpl_row_delayed_ins.result
    1.8 05/12/20 23:04:54 guilhem@stripped +3 -3
    binlog position update

  mysql-test/r/rpl_row_create_table.result
    1.4 05/12/20 23:04:53 guilhem@stripped +11 -11
    binlog position update

  mysql-test/r/binlog_row_mix_innodb_myisam.result
    1.4 05/12/20 23:04:53 guilhem@stripped +76 -76
    binlog position update

  mysql-test/r/binlog_row_insert_select.result
    1.3 05/12/20 23:04:53 guilhem@stripped +2 -2
    binlog position update

  mysql-test/r/binlog_row_ctype_ucs.result
    1.2 05/12/20 23:04:53 guilhem@stripped +2 -2
    binlog position update

  mysql-test/r/binlog_row_ctype_cp932.result
    1.3 05/12/20 23:04:53 guilhem@stripped +2 -2
    binlog position update

  mysql-test/mysql-test-run.sh
    1.284 05/12/20 23:04:52 guilhem@stripped +0 -2
    unneeded

  mysql-test/Makefile.am
    1.69 05/12/20 23:04:52 guilhem@stripped +0 -11
    mysql-test-run now doesn't use RBR by default if this is a RBR-enabled build (preparation for the push in 5.1-new).

  include/my_global.h
    1.117 05/12/20 23:04:52 guilhem@stripped +24 -0
    implementation of uint6korr and int6store

  include/config-win.h
    1.71 05/12/20 23:04:52 guilhem@stripped +12 -0
    implementation of uint6korr and int6store

  config/ac-macros/replication.m4
    1.5 05/12/20 23:04:52 guilhem@stripped +0 -5
    the AM_CONDITIONAL is not needed anymore as the change to mysql-test-run.sh is undone

  Makefile.am
    1.81 05/12/20 23:04:51 guilhem@stripped +36 -16
    "make test" now runs all tests in SBR and then all tests in ps-protocol in RBR (Monty's idea).
    Same for test-force, test-pl, test-force-pl.
    For the build team (when building releases) (Monty's idea) new targets which do the cartesian product,
    i.e. all tests in SBR, all tests in ps-protocol in SBR, all tests in RBR, all tests in ps-protocol in RBR;
    those new targets have "full" in their name.

# 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:	gbichot2.local
# Root:	/home/mysql_src/mysql-5.1-wl1012-v3

--- 1.80/Makefile.am	2005-12-13 16:10:47 +01:00
+++ 1.81/Makefile.am	2005-12-20 23:04:51 +01:00
@@ -109,32 +109,52 @@
 
 test:
 	cd mysql-test ; \
-	./mysql-test-run.pl --mysqld=--binlog-format=statement $(MYSQL_TEST_RUN_ARGS) && \
-	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=statement $(MYSQL_TEST_RUN_ARGS) &&\
-        ./mysql-test-run.pl --mysqld=--binlog-format=row --do-test=rpl $(MYSQL_TEST_RUN_ARGS) && \
-        ./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row --do-test=rpl $(MYSQL_TEST_RUN_ARGS)
+	./mysql-test-run --mysqld=--binlog-format=statement && \
+	./mysql-test-run --ps-protocol --mysqld=--binlog-format=row
+
+test-full:
+	cd mysql-test ; \
+	./mysql-test-run --mysqld=--binlog-format=statement && \
+	./mysql-test-run --ps-protocol --mysqld=--binlog-format=statement && \
+	./mysql-test-run --mysqld=--binlog-format=row && \
+	./mysql-test-run --ps-protocol --mysqld=--binlog-format=row
 
 test-force:
 	cd mysql-test ; \
-	./mysql-test-run --force --mysqld=--binlog-format=statement $(MYSQL_TEST_RUN_ARGS) ; \
-	./mysql-test-run --ps-protocol --force --mysqld=--binlog-format=statement $(MYSQL_TEST_RUN_ARGS) ; \
-        ./mysql-test-run --force --mysqld=--binlog-format=row --do-test=rpl $(MYSQL_TEST_RUN_ARGS) ; \
-        ./mysql-test-run --ps-protocol --force --mysqld=--binlog-format=statement --do-test=rpl $(MYSQL_TEST_RUN_ARGS) 
+	./mysql-test-run --force --mysqld=--binlog-format=statement && \
+	./mysql-test-run --ps-protocol --force --mysqld=--binlog-format=row
+
+test-force-full:
+	cd mysql-test ; \
+	./mysql-test-run --force --mysqld=--binlog-format=statement && \
+	./mysql-test-run --force --ps-protocol --mysqld=--binlog-format=statement && \
+	./mysql-test-run --force --mysqld=--binlog-format=row && \
+	./mysql-test-run --force --ps-protocol --mysqld=--binlog-format=row
 
 # We are testing a new Perl version of the test script
 test-pl:
 	cd mysql-test ; \
-	./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --mysqld=--binlog-format=statement && \
-	./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol --mysqld=--binlog-format=statement $(MYSQL_TEST_RUN_ARGS) && \
-        ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --mysqld=--binlog-format=row --do-test=rpl $(MYSQL_TEST_RUN_ARGS) && \
-        ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol --mysqld=--binlog-format=row --do-test=rpl $(MYSQL_TEST_RUN_ARGS)
+	./mysql-test-run.pl --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row
+
+test-full-pl:
+	cd mysql-test ; \
+	./mysql-test-run.pl --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --mysqld=--binlog-format=row && \
+	./mysql-test-run.pl --ps-protocol --mysqld=--binlog-format=row
 
 test-force-pl:
 	cd mysql-test ; \
-	./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --force --mysqld=--binlog-format=statement
-	./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol --force --mysqld=--binlog-format=statement
-        ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --force --mysqld=--binlog-format=row --do-test=rpl
-        ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol --force --mysqld=--binlog-format=statement --do-test=rpl 
+	./mysql-test-run.pl --force --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --ps-protocol --force --mysqld=--binlog-format=row
+
+test-force-full-pl:
+	cd mysql-test ; \
+	./mysql-test-run.pl --force --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --force --ps-protocol --mysqld=--binlog-format=statement && \
+	./mysql-test-run.pl --force --mysqld=--binlog-format=row && \
+	./mysql-test-run.pl --force --ps-protocol --mysqld=--binlog-format=row
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%

--- 1.70/include/config-win.h	2005-11-28 16:17:55 +01:00
+++ 1.71/include/config-win.h	2005-12-20 23:04:52 +01:00
@@ -265,6 +265,12 @@
 				    (((uint32) ((uchar) (A)[2])) << 16) +\
 				    (((uint32) ((uchar) (A)[3])) << 24)) +\
 				    (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A)	((ulonglong)(((uint32)    ((uchar) (A)[0]))          + \
+                                     (((uint32)    ((uchar) (A)[1])) << 8)   + \
+                                     (((uint32)    ((uchar) (A)[2])) << 16)  + \
+                                     (((uint32)    ((uchar) (A)[3])) << 24)) + \
+                         (((ulonglong) ((uchar) (A)[4])) << 32) +       \
+                         (((ulonglong) ((uchar) (A)[5])) << 40))
 #define uint8korr(A)	(*((ulonglong *) (A)))
 #define sint8korr(A)	(*((longlong *) (A)))
 #define int2store(T,A)	*((uint16*) (T))= (uint16) (A)
@@ -277,6 +283,12 @@
 			  *((T)+2)=(uchar) (((A) >> 16));\
 			  *((T)+3)=(uchar) (((A) >> 24)); \
 			  *((T)+4)=(uchar) (((A) >> 32)); }
+#define int6store(T,A)	{ *(T)    =(uchar)((A));          \
+			  *((T)+1)=(uchar) (((A) >> 8));  \
+			  *((T)+2)=(uchar) (((A) >> 16)); \
+			  *((T)+3)=(uchar) (((A) >> 24)); \
+			  *((T)+4)=(uchar) (((A) >> 32)); \
+			  *((T)+5)=(uchar) (((A) >> 40)); }
 #define int8store(T,A)	*((ulonglong *) (T))= (ulonglong) (A)
 
 #define doubleget(V,M)	do { *((long *) &V) = *((long*) M); \

--- 1.283/mysql-test/mysql-test-run.sh	2005-12-14 22:13:50 +01:00
+++ 1.284/mysql-test/mysql-test-run.sh	2005-12-20 23:04:52 +01:00
@@ -240,8 +240,6 @@
 FAILED_CASES=
 
 EXTRA_MASTER_OPT=""
-EXTRA_MASTER_MYSQLD_OPT=@EXTRA_MASTER_MYSQLD_OPT@
-EXTRA_SLAVE_MYSQLD_OPT=@EXTRA_SLAVE_MYSQLD_OPT@
 EXTRA_MYSQL_TEST_OPT=""
 EXTRA_MYSQLCHECK_OPT=""
 EXTRA_MYSQLDUMP_OPT=""

--- 1.181/sql/log.cc	2005-12-13 16:10:48 +01:00
+++ 1.182/sql/log.cc	2005-12-20 23:04:58 +01:00
@@ -1684,6 +1684,13 @@
       }
       else if (trans_log && my_b_tell(trans_log))
         file= trans_log;
+
+      /*
+        Note: as Mats suggested, for all the cases above where we write to
+        trans_log, it sounds unnecessary to lock LOCK_log. We should rather
+        test first if we want to write to trans_log, and if not, lock
+        LOCK_log. TODO.
+      */
     }
 #endif
     DBUG_PRINT("info",("event type=%d",event_info->get_type_code()));
@@ -2355,13 +2362,11 @@
   DBUG_ASSERT(table->s->table_map_id != ULONG_MAX);
   safe_mutex_assert_owner(&LOCK_log);
 
-  ulong const table_id= table->s->table_map_id;
-
   Table_map_log_event::flag_set const
     flags= Table_map_log_event::NO_FLAGS;
 
   Table_map_log_event
-    the_event(thd, table, table_id, is_transactional, flags);
+    the_event(thd, table, table->s->table_map_id, is_transactional, flags);
 
   if (the_event.write(file))
     DBUG_RETURN(1);

--- 1.204/sql/log_event.cc	2005-12-20 15:22:17 +01:00
+++ 1.205/sql/log_event.cc	2005-12-20 23:04:58 +01:00
@@ -2103,6 +2103,21 @@
       post_header_len[WRITE_ROWS_EVENT-1]=   ROWS_HEADER_LEN;
       post_header_len[UPDATE_ROWS_EVENT-1]=  ROWS_HEADER_LEN;
       post_header_len[DELETE_ROWS_EVENT-1]=  ROWS_HEADER_LEN;
+      /*
+        We here have the possibility to simulate a master of before we changed
+        the table map id to be stored in 6 bytes: when it was stored in 4
+        bytes (=> post_header_len was 6). This is used to test backward
+        compatibility.
+        This code can be removed after a few months (today is Dec 21st 2005),
+        when we know that the 4-byte masters are not deployed anymore (check
+        with Tomas Ulin first!), and the accompanying test (rpl_row_4_bytes)
+        too.
+      */
+      DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
+                      post_header_len[TABLE_MAP_EVENT-1]=
+                      post_header_len[WRITE_ROWS_EVENT-1]=
+                      post_header_len[UPDATE_ROWS_EVENT-1]=
+                      post_header_len[DELETE_ROWS_EVENT-1]= 6;);
       post_header_len[BEGIN_LOAD_QUERY_EVENT-1]= post_header_len[APPEND_BLOCK_EVENT-1];
       post_header_len[EXECUTE_LOAD_QUERY_EVENT-1]= EXECUTE_LOAD_QUERY_HEADER_LEN;
     }
@@ -5063,21 +5078,33 @@
 		      event_len, common_header_len,
 		      post_header_len));
 
-  char const* const post_begin= buf + common_header_len;
-  m_table_id= uint4korr(post_begin + RW_MAPID_OFFSET);
+  const char *post_start= buf + common_header_len;
+  post_start+= RW_MAPID_OFFSET;
+  if (post_header_len == 6)
+  {
+    /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */
+    m_table_id= uint4korr(post_start);
+    post_start+= 4;
+  }
+  else
+  {
+    m_table_id= uint6korr(post_start);
+    post_start+= RW_FLAGS_OFFSET;
+  }
+
   DBUG_ASSERT(m_table_id != ULONG_MAX);
 
-  m_flags= uint2korr(post_begin + RW_FLAGS_OFFSET);
+  m_flags= uint2korr(post_start);
 
-  byte const *const var_begin= post_begin + ROWS_HEADER_LEN;
-  byte const *const ptr_width= var_begin;
+  byte const *const var_start= buf + common_header_len + post_header_len;
+  byte const *const ptr_width= var_start;
   byte const *const ptr_after_width= my_vle_decode(&m_width, ptr_width);
 
   const uint byte_count= (m_width + 7) / 8;
-  const char* const ptr_rows_data= var_begin + byte_count + 1;
+  const char* const ptr_rows_data= var_start + byte_count + 1;
 
   my_size_t const data_size= event_len - (ptr_rows_data - buf);
-  DBUG_PRINT("info",("m_table_id=%d, m_flags=%d, m_width=%u, data_size=%lu",
+  DBUG_PRINT("info",("m_table_id=%lu, m_flags=%d, m_width=%u, data_size=%lu",
                      m_table_id, m_flags, m_width, data_size));
 
   m_rows_buf= my_malloc(data_size, MYF(MY_WME));
@@ -5516,7 +5543,13 @@
 {
   DBUG_ASSERT(m_table_id != ULONG_MAX);
   byte buf[ROWS_HEADER_LEN];	// No need to init the buffer
-  int4store(buf + RW_MAPID_OFFSET, m_table_id);
+  DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
+                  {
+                    int4store(buf + 0, m_table_id);
+                    int2store(buf + 4, m_flags);
+                    return (my_b_safe_write(file, buf, 6));
+                  });
+  int6store(buf + RW_MAPID_OFFSET, (ulonglong)m_table_id);
   int2store(buf + RW_FLAGS_OFFSET, m_flags);
   return (my_b_safe_write(file, buf, ROWS_HEADER_LEN));
 }
@@ -5588,6 +5621,7 @@
 
 
   m_data_size=  TABLE_MAP_HEADER_LEN;
+  DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master", m_data_size= 6;)
   m_data_size+= m_dblen + 2;	// Include length and terminating \0
   m_data_size+= m_tbllen + 2;	// Include length and terminating \0
   m_data_size+= 1 + m_colcnt;	// COLCNT and column types
@@ -5626,15 +5660,28 @@
   DBUG_DUMP("event buffer", buf, event_len);
 
   /* Read the post-header */
-  const char *const post_start= buf + common_header_len;
+  const char *post_start= buf + common_header_len;
+
+  post_start+= TM_MAPID_OFFSET;
+  if (post_header_len == 6)
+  {
+    /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */
+    m_table_id= uint4korr(post_start);
+    post_start+= 4;
+  }
+  else
+  {
+    DBUG_ASSERT(post_header_len == TABLE_MAP_HEADER_LEN);
+    m_table_id= uint6korr(post_start);
+    post_start+= TM_FLAGS_OFFSET;
+  }
 
-  m_table_id= uint4korr(post_start + TM_MAPID_OFFSET);
   DBUG_ASSERT(m_table_id != ULONG_MAX);
 
-  m_flags= uint2korr(post_start + TM_FLAGS_OFFSET);
+  m_flags= uint2korr(post_start);
 
   /* Read the variable part of the event */
-  const char *const vpart= post_start + post_header_len;
+  const char *const vpart= buf + common_header_len + post_header_len;
 
   /* Extract the length of the various parts from the buffer */
   byte const* const ptr_dblen= vpart + 0;
@@ -5935,7 +5982,13 @@
 {
   DBUG_ASSERT(m_table_id != ULONG_MAX);
   byte buf[TABLE_MAP_HEADER_LEN];
-  int4store(buf + TM_MAPID_OFFSET, m_table_id);
+  DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
+                  {
+                    int4store(buf + 0, m_table_id);
+                    int2store(buf + 4, m_flags);
+                    return (my_b_safe_write(file, buf, 6));
+                  });
+  int6store(buf + TM_MAPID_OFFSET, (ulonglong)m_table_id);
   int2store(buf + TM_FLAGS_OFFSET, m_flags);
   return (my_b_safe_write(file, buf, TABLE_MAP_HEADER_LEN));
 }
@@ -6034,7 +6087,7 @@
     inform the storage engine that it should use this behaviour.
   */
 
-  /* Tell the SE that we are using REPLACE semantics. */
+  /* Tell the storage engine that we are using REPLACE semantics. */
   thd->lex->duplicates= DUP_REPLACE;
 
   /*
@@ -6104,7 +6157,7 @@
   return 1;
 }
 
-// Anonymous namespace for template functions/classes
+/* Anonymous namespace for template functions/classes */
 namespace {
 
   /*

--- 1.148/sql/log_event.h	2005-12-20 15:22:17 +01:00
+++ 1.149/sql/log_event.h	2005-12-20 23:04:58 +01:00
@@ -206,8 +206,8 @@
 #define EXEC_LOAD_HEADER_LEN   4
 #define DELETE_FILE_HEADER_LEN 4
 #define FORMAT_DESCRIPTION_HEADER_LEN (START_V3_HEADER_LEN+1+LOG_EVENT_TYPES)
-#define ROWS_HEADER_LEN        6
-#define TABLE_MAP_HEADER_LEN   6
+#define ROWS_HEADER_LEN        8
+#define TABLE_MAP_HEADER_LEN   8
 #define EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN (4 + 4 + 4 + 1)
 #define EXECUTE_LOAD_QUERY_HEADER_LEN  (QUERY_HEADER_LEN + EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN)
 
@@ -316,11 +316,11 @@
 
 /* TM = "Table Map" */
 #define TM_MAPID_OFFSET    0
-#define TM_FLAGS_OFFSET    4
+#define TM_FLAGS_OFFSET    6
 
 /* RW = "RoWs" */
 #define RW_MAPID_OFFSET    0
-#define RW_FLAGS_OFFSET    4
+#define RW_FLAGS_OFFSET    6
 
 /* ELQ = "Execute Load Query" */
 #define ELQ_FILE_ID_OFFSET QUERY_HEADER_LEN
@@ -1812,8 +1812,11 @@
   /* Member functions to implement superclass interface */
   virtual int get_data_size()
   { 
-      return ROWS_HEADER_LEN + 1 + no_bytes_in_map(&m_cols) + 
-        (m_rows_cur - m_rows_buf); 
+    DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
+                    return 6 + 1 + no_bytes_in_map(&m_cols) + 
+                    (m_rows_cur - m_rows_buf);); 
+    return ROWS_HEADER_LEN + 1 + no_bytes_in_map(&m_cols) + 
+      (m_rows_cur - m_rows_buf); 
   }
 
   MY_BITMAP const *get_cols() const { return &m_cols; }

--- 1.22/mysql-test/t/rpl_stm_until.test	2005-12-13 16:10:48 +01:00
+++ 1.23/mysql-test/t/rpl_stm_until.test	2005-12-20 23:04:57 +01:00
@@ -44,7 +44,7 @@
 --replace_column 1 # 9 # 11 # 23 # 33 #
 show slave status;
 
-# try replicate all until second insert to t2;
+# try replicate all up to and not including the second insert to t2;
 start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
 sleep 2;
 wait_for_slave_to_stop;
--- New file ---
+++ mysql-test/r/rpl_row_4_bytes.result	05/12/20 23:04:58
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;
drop database if exists mysqltest1;
create database mysqltest1;
use mysqltest1;
CREATE TABLE t1 (a char(3));
CREATE TABLE t2 (a char(3));
insert into t1 values("ANN");
insert into t1 values("GUI");
insert into t2 values("LIL");
insert into t2 values("ABE");
insert into t2 values("ANG");
use mysqltest1;
select * from t1 order by a;
a
ANN
GUI
select * from t2 order by a;
a
ABE
ANG
LIL
DROP TABLE t1,t2;


--- 1.7/mysql-test/r/rpl_row_delayed_ins.result	2005-10-24 21:27:29 +02:00
+++ 1.8/mysql-test/r/rpl_row_delayed_ins.result	2005-12-20 23:04:54 +01:00
@@ -16,9 +16,9 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	4	Format_desc	1	102	Server ver: VERSION, Binlog ver: 4
 master-bin.000001	102	Query	1	222	use `test`; create table t1(a int not null primary key) engine=myisam
-master-bin.000001	222	Table_map	1	259	test.t1
-master-bin.000001	259	Write_rows	1	301	
-master-bin.000001	301	Query	1	376	use `test`; flush tables
+master-bin.000001	222	Table_map	1	261	test.t1
+master-bin.000001	261	Write_rows	1	305	
+master-bin.000001	305	Query	1	380	use `test`; flush tables
 select * from t1;
 a
 1
--- New file ---
+++ mysql-test/t/rpl_row_4_bytes-master.opt	05/12/20 23:05:02
--loose-debug=d,"old_row_based_repl_4_byte_map_id_master"

--- New file ---
+++ mysql-test/t/rpl_row_4_bytes.test	05/12/20 23:05:04
# This test is to make sure that slaves can read a binlog containining
# table map ids stored in 4 bytes, even though we now store them in 6
# bytes. This is for backward-compatibility.
# If the slave does not detect that the master stores the table map id
# in 4 bytes, slave will read 6 bytes, and so will read the 2 bytes of
# flags at the place where there actually is data, so the test should
# fail.

-- source include/have_binlog_format_row.inc
-- source include/have_debug.inc
-- source include/master-slave.inc

connection master;
--disable_warnings
drop database if exists mysqltest1;
create database mysqltest1;
--enable_warnings
use mysqltest1;
CREATE TABLE t1 (a char(3));
CREATE TABLE t2 (a char(3));
insert into t1 values("ANN");
insert into t1 values("GUI");
insert into t2 values("LIL");
insert into t2 values("ABE");
insert into t2 values("ANG");
sync_slave_with_master;
use mysqltest1;
select * from t1 order by a;
select * from t2 order by a;

connection master;
DROP TABLE t1,t2;
sync_slave_with_master;


--- 1.2/mysql-test/r/binlog_row_ctype_cp932.result	2005-10-27 21:32:44 +02:00
+++ 1.3/mysql-test/r/binlog_row_ctype_cp932.result	2005-12-20 23:04:53 +01:00
@@ -11323,8 +11323,8 @@
 SHOW BINLOG EVENTS FROM 102;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	189	use `test`; CREATE TABLE t1(f1 blob)
-master-bin.000001	189	Table_map	1	226	test.t1
-master-bin.000001	226	Write_rows	1	258	
+master-bin.000001	189	Table_map	1	228	test.t1
+master-bin.000001	228	Write_rows	1	262	
 SELECT HEX(f1) FROM t1;
 HEX(f1)
 8300

--- 1.1/mysql-test/r/binlog_row_ctype_ucs.result	2005-10-18 16:32:08 +02:00
+++ 1.2/mysql-test/r/binlog_row_ctype_ucs.result	2005-12-20 23:04:53 +01:00
@@ -5,8 +5,8 @@
 insert into t2 values (@v);
 show binlog events from 102;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	102	Table_map	1	139	test.t2
-master-bin.000001	139	Write_rows	1	227	
+master-bin.000001	102	Table_map	1	141	test.t2
+master-bin.000001	141	Write_rows	1	231	
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 ROLLBACK;

--- 1.2/mysql-test/r/binlog_row_insert_select.result	2005-10-24 20:04:53 +02:00
+++ 1.3/mysql-test/r/binlog_row_insert_select.result	2005-12-20 23:04:53 +01:00
@@ -8,8 +8,8 @@
 show binlog events;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	4	Format_desc	1	102	Server ver: VERSION, Binlog ver: 4
-master-bin.000001	102	Table_map	1	139	test.t1
-master-bin.000001	139	Write_rows	1	171	
+master-bin.000001	102	Table_map	1	141	test.t1
+master-bin.000001	141	Write_rows	1	175	
 select * from t1;
 a
 1

--- 1.3/mysql-test/r/binlog_row_mix_innodb_myisam.result	2005-12-14 16:45:00 +01:00
+++ 1.4/mysql-test/r/binlog_row_mix_innodb_myisam.result	2005-12-20 23:04:53 +01:00
@@ -10,10 +10,10 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t2
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t2
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 reset master;
@@ -27,10 +27,10 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t2
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Query	1	#	use `test`; ROLLBACK
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t2
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Query	1	#	use `test`; ROLLBACK
 delete from t1;
 delete from t2;
 reset master;
@@ -47,14 +47,14 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Query	1	#	use `test`; savepoint my_savepoint
-master-bin.000001	324	Table_map	1	#	test.t1
-master-bin.000001	361	Write_rows	1	#	
-master-bin.000001	393	Table_map	1	#	test.t2
-master-bin.000001	430	Write_rows	1	#	
-master-bin.000001	467	Query	1	#	use `test`; rollback to savepoint my_savepoint
-master-bin.000001	564	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Query	1	#	use `test`; savepoint my_savepoint
+master-bin.000001	328	Table_map	1	#	test.t1
+master-bin.000001	367	Write_rows	1	#	
+master-bin.000001	401	Table_map	1	#	test.t2
+master-bin.000001	440	Write_rows	1	#	
+master-bin.000001	479	Query	1	#	use `test`; rollback to savepoint my_savepoint
+master-bin.000001	576	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 reset master;
@@ -76,16 +76,16 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Query	1	#	use `test`; savepoint my_savepoint
-master-bin.000001	324	Table_map	1	#	test.t1
-master-bin.000001	361	Write_rows	1	#	
-master-bin.000001	393	Table_map	1	#	test.t2
-master-bin.000001	430	Write_rows	1	#	
-master-bin.000001	467	Query	1	#	use `test`; rollback to savepoint my_savepoint
-master-bin.000001	564	Table_map	1	#	test.t1
-master-bin.000001	601	Write_rows	1	#	
-master-bin.000001	633	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Query	1	#	use `test`; savepoint my_savepoint
+master-bin.000001	328	Table_map	1	#	test.t1
+master-bin.000001	367	Write_rows	1	#	
+master-bin.000001	401	Table_map	1	#	test.t2
+master-bin.000001	440	Write_rows	1	#	
+master-bin.000001	479	Query	1	#	use `test`; rollback to savepoint my_savepoint
+master-bin.000001	576	Table_map	1	#	test.t1
+master-bin.000001	615	Write_rows	1	#	
+master-bin.000001	649	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 reset master;
@@ -102,10 +102,10 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t2
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Query	1	#	use `test`; ROLLBACK
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t2
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Query	1	#	use `test`; ROLLBACK
 delete from t1;
 delete from t2;
 reset master;
@@ -114,10 +114,10 @@
 show binlog events from 102;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Table_map	1	#	test.t1
-master-bin.000001	139	Write_rows	1	#	
-master-bin.000001	171	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	198	Table_map	1	#	test.t2
-master-bin.000001	235	Write_rows	1	#	
+master-bin.000001	141	Write_rows	1	#	
+master-bin.000001	175	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	202	Table_map	1	#	test.t2
+master-bin.000001	241	Write_rows	1	#	
 delete from t1;
 delete from t2;
 reset master;
@@ -127,23 +127,23 @@
 show binlog events from 102;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Table_map	1	#	test.t1
-master-bin.000001	139	Write_rows	1	#	
-master-bin.000001	171	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	198	Table_map	1	#	test.t2
-master-bin.000001	235	Write_rows	1	#	
+master-bin.000001	141	Write_rows	1	#	
+master-bin.000001	175	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	202	Table_map	1	#	test.t2
+master-bin.000001	241	Write_rows	1	#	
 insert into t1 values(11);
 commit;
 show binlog events from 102;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Table_map	1	#	test.t1
-master-bin.000001	139	Write_rows	1	#	
-master-bin.000001	171	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	198	Table_map	1	#	test.t2
-master-bin.000001	235	Write_rows	1	#	
-master-bin.000001	267	Query	1	#	use `test`; BEGIN
-master-bin.000001	335	Table_map	1	#	test.t1
-master-bin.000001	372	Write_rows	1	#	
-master-bin.000001	404	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	141	Write_rows	1	#	
+master-bin.000001	175	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	202	Table_map	1	#	test.t2
+master-bin.000001	241	Write_rows	1	#	
+master-bin.000001	275	Query	1	#	use `test`; BEGIN
+master-bin.000001	343	Table_map	1	#	test.t1
+master-bin.000001	382	Write_rows	1	#	
+master-bin.000001	416	Xid	1	#	COMMIT /* xid= */
 alter table t2 engine=INNODB;
 delete from t1;
 delete from t2;
@@ -156,10 +156,10 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t2
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t2
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 reset master;
@@ -183,8 +183,8 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 reset master;
@@ -204,10 +204,10 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t1
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t1
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Xid	1	#	COMMIT /* xid= */
 delete from t1;
 delete from t2;
 alter table t2 type=MyISAM;
@@ -258,25 +258,25 @@
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	102	Query	1	#	use `test`; BEGIN
 master-bin.000001	170	Table_map	1	#	test.t1
-master-bin.000001	207	Write_rows	1	#	
-master-bin.000001	239	Table_map	1	#	test.t1
-master-bin.000001	276	Write_rows	1	#	
-master-bin.000001	308	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	335	Table_map	1	#	test.t1
-master-bin.000001	372	Delete_rows	1	#	
-master-bin.000001	409	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	436	Query	1	#	use `test`; alter table t2 type=MyISAM
-master-bin.000001	525	Table_map	1	#	test.t1
-master-bin.000001	562	Write_rows	1	#	
-master-bin.000001	594	Xid	1	#	COMMIT /* xid= */
-master-bin.000001	621	Table_map	1	#	test.t2
-master-bin.000001	658	Write_rows	1	#	
-master-bin.000001	690	Query	1	#	use `test`; drop table t1,t2
-master-bin.000001	769	Query	1	#	use `test`; create table t0 (n int)
-master-bin.000001	855	Table_map	1	#	test.t0
-master-bin.000001	892	Write_rows	1	#	
-master-bin.000001	924	Table_map	1	#	test.t0
-master-bin.000001	961	Write_rows	1	#	
-master-bin.000001	993	Query	1	#	use `test`; create table t2 (n int) engine=innodb
+master-bin.000001	209	Write_rows	1	#	
+master-bin.000001	243	Table_map	1	#	test.t1
+master-bin.000001	282	Write_rows	1	#	
+master-bin.000001	316	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	343	Table_map	1	#	test.t1
+master-bin.000001	382	Delete_rows	1	#	
+master-bin.000001	421	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	448	Query	1	#	use `test`; alter table t2 type=MyISAM
+master-bin.000001	537	Table_map	1	#	test.t1
+master-bin.000001	576	Write_rows	1	#	
+master-bin.000001	610	Xid	1	#	COMMIT /* xid= */
+master-bin.000001	637	Table_map	1	#	test.t2
+master-bin.000001	676	Write_rows	1	#	
+master-bin.000001	710	Query	1	#	use `test`; drop table t1,t2
+master-bin.000001	789	Query	1	#	use `test`; create table t0 (n int)
+master-bin.000001	875	Table_map	1	#	test.t0
+master-bin.000001	914	Write_rows	1	#	
+master-bin.000001	948	Table_map	1	#	test.t0
+master-bin.000001	987	Write_rows	1	#	
+master-bin.000001	1021	Query	1	#	use `test`; create table t2 (n int) engine=innodb
 do release_lock("lock1");
 drop table t0,t2;

--- 1.2/mysql-test/r/rpl_row_sp008.result	2005-10-22 18:20:38 +02:00
+++ 1.3/mysql-test/r/rpl_row_sp008.result	2005-12-20 23:04:57 +01:00
@@ -35,11 +35,11 @@
 master-bin.000001	102	Query	1	193	use `test`; DROP TABLE IF EXISTS test.t2
 master-bin.000001	193	Query	1	299	use `test`; CREATE TABLE test.t1 (a INT,PRIMARY KEY(a))
 master-bin.000001	299	Query	1	405	use `test`; CREATE TABLE test.t2 (a INT,PRIMARY KEY(a))
-master-bin.000001	405	Table_map	1	442	test.t1
-master-bin.000001	442	Write_rows	1	479	
-master-bin.000001	479	Table_map	1	534	mysql.proc
-master-bin.000001	534	Write_rows	1	715	
-master-bin.000001	715	Table_map	1	752	test.t2
-master-bin.000001	752	Write_rows	1	784	
+master-bin.000001	405	Table_map	1	444	test.t1
+master-bin.000001	444	Write_rows	1	483	
+master-bin.000001	483	Table_map	1	540	mysql.proc
+master-bin.000001	540	Write_rows	1	723	
+master-bin.000001	723	Table_map	1	762	test.t2
+master-bin.000001	762	Write_rows	1	796	
 DROP PROCEDURE IF EXISTS test.p1;
 DROP TABLE IF EXISTS test.t1;

--- 1.4/config/ac-macros/replication.m4	2005-12-14 16:44:59 +01:00
+++ 1.5/config/ac-macros/replication.m4	2005-12-20 23:04:52 +01:00
@@ -24,11 +24,6 @@
     [have_row_based=no]
     ;;
   esac
-# This AM_CONDITIONAL is not needed for the push into 5.1
-# as it only serves for a portion of mysql-test-run.sh, which
-# portion will not be pushed into 5.1 (it's a portion to do
-# the testsuite with RBR by default)
-  AM_CONDITIONAL([HAVE_ROW_BASED_REPLICATION], [ test "$have_row_based" = "yes" ])
 ])
 dnl ---------------------------------------------------------------------------
 dnl END OF MYSQL_CHECK_REPLICATION

--- 1.3/mysql-test/r/rpl_row_create_table.result	2005-12-16 21:05:06 +01:00
+++ 1.4/mysql-test/r/rpl_row_create_table.result	2005-12-20 23:04:53 +01:00
@@ -127,7 +127,7 @@
 NULL	6	12
 CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
 ERROR 23000: Duplicate entry '2' for key 1
-SHOW BINLOG EVENTS FROM 1252;
+SHOW BINLOG EVENTS FROM 1256;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 CREATE TABLE t7 (a INT, b INT UNIQUE);
 INSERT INTO t7 SELECT a,b FROM tt3;
@@ -137,11 +137,11 @@
 1	2
 2	4
 3	6
-SHOW BINLOG EVENTS FROM 1252;
+SHOW BINLOG EVENTS FROM 1256;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	1252	Query	1	1352	use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
-master-bin.000001	1352	Table_map	1	1390	test.t7
-master-bin.000001	1390	Write_rows	1	1444	
+master-bin.000001	1256	Query	1	1356	use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
+master-bin.000001	1356	Table_map	1	1396	test.t7
+master-bin.000001	1396	Write_rows	1	1452	
 SELECT * FROM t7 ORDER BY a,b;
 a	b
 1	2
@@ -154,10 +154,10 @@
 ROLLBACK;
 Warnings:
 Warning	1196	Some non-transactional changed tables couldn't be rolled back
-SHOW BINLOG EVENTS FROM 1444;
+SHOW BINLOG EVENTS FROM 1452;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	1444	Table_map	1	1482	test.t7
-master-bin.000001	1482	Write_rows	1	1536	
+master-bin.000001	1452	Table_map	1	1492	test.t7
+master-bin.000001	1492	Write_rows	1	1548	
 SELECT * FROM t7 ORDER BY a,b;
 a	b
 1	2
@@ -191,10 +191,10 @@
   `a` int(11) default NULL,
   `b` int(11) default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
-SHOW BINLOG EVENTS FROM 1536;
+SHOW BINLOG EVENTS FROM 1548;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	1536	Query	1	1622	use `test`; CREATE TABLE t8 LIKE t4
-master-bin.000001	1622	Query	1	1761	use `test`; CREATE TABLE `t9` (
+master-bin.000001	1548	Query	1	1634	use `test`; CREATE TABLE t8 LIKE t4
+master-bin.000001	1634	Query	1	1773	use `test`; CREATE TABLE `t9` (
   `a` int(11) default NULL,
   `b` int(11) default NULL
 )

--- 1.3/mysql-test/t/rpl_row_create_table.test	2005-12-16 21:05:06 +01:00
+++ 1.4/mysql-test/t/rpl_row_create_table.test	2005-12-20 23:04:57 +01:00
@@ -60,7 +60,7 @@
 --error 1062
 CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
 # Shouldn't be written to the binary log
-SHOW BINLOG EVENTS FROM 1252;
+SHOW BINLOG EVENTS FROM 1256;
 
 # Test that INSERT-SELECT works the same way as for SBR.
 CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -68,7 +68,7 @@
 INSERT INTO t7 SELECT a,b FROM tt3;
 SELECT * FROM t7 ORDER BY a,b;
 # Should be written to the binary log
-SHOW BINLOG EVENTS FROM 1252;
+SHOW BINLOG EVENTS FROM 1256;
 sync_slave_with_master;
 SELECT * FROM t7 ORDER BY a,b;
 
@@ -78,7 +78,7 @@
 BEGIN;
 INSERT INTO t7 SELECT a,b FROM tt4;
 ROLLBACK;
-SHOW BINLOG EVENTS FROM 1444;
+SHOW BINLOG EVENTS FROM 1452;
 SELECT * FROM t7 ORDER BY a,b;
 sync_slave_with_master;
 SELECT * FROM t7 ORDER BY a,b;
@@ -91,7 +91,7 @@
 --echo **** On Master ****
 --query_vertical SHOW CREATE TABLE t8
 --query_vertical SHOW CREATE TABLE t9
-SHOW BINLOG EVENTS FROM 1536;
+SHOW BINLOG EVENTS FROM 1548;
 sync_slave_with_master;
 --echo **** On Slave ****
 --query_vertical SHOW CREATE TABLE t8

--- 1.116/include/my_global.h	2005-12-13 16:10:47 +01:00
+++ 1.117/include/my_global.h	2005-12-20 23:04:52 +01:00
@@ -1127,6 +1127,12 @@
 				    (((uint32) ((uchar) (A)[2])) << 16) +\
 				    (((uint32) ((uchar) (A)[3])) << 24)) +\
 				    (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A)	((ulonglong)(((uint32)    ((uchar) (A)[0]))          + \
+                                     (((uint32)    ((uchar) (A)[1])) << 8)   + \
+                                     (((uint32)    ((uchar) (A)[2])) << 16)  + \
+                                     (((uint32)    ((uchar) (A)[3])) << 24)) + \
+                         (((ulonglong) ((uchar) (A)[4])) << 32) +       \
+                         (((ulonglong) ((uchar) (A)[5])) << 40))
 #define uint8korr(A)	(*((ulonglong *) (A)))
 #define sint8korr(A)	(*((longlong *) (A)))
 #define int2store(T,A)	*((uint16*) (T))= (uint16) (A)
@@ -1139,6 +1145,12 @@
                              *((T)+2)=(uchar) (((A) >> 16));\
                              *((T)+3)=(uchar) (((A) >> 24)); \
                              *((T)+4)=(uchar) (((A) >> 32)); } while(0)
+#define int6store(T,A)  do { *(T)=    (uchar)((A));          \
+                             *((T)+1)=(uchar) (((A) >> 8));  \
+                             *((T)+2)=(uchar) (((A) >> 16)); \
+                             *((T)+3)=(uchar) (((A) >> 24)); \
+                             *((T)+4)=(uchar) (((A) >> 32)); \
+                             *((T)+5)=(uchar) (((A) >> 40)); } while(0)
 #define int8store(T,A)	*((ulonglong *) (T))= (ulonglong) (A)
 
 typedef union {
@@ -1195,6 +1207,12 @@
 				    (((uint32) ((uchar) (A)[2])) << 16) +\
 				    (((uint32) ((uchar) (A)[3])) << 24)) +\
 				    (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A)	((ulonglong)(((uint32)    ((uchar) (A)[0]))          + \
+                                     (((uint32)    ((uchar) (A)[1])) << 8)   + \
+                                     (((uint32)    ((uchar) (A)[2])) << 16)  + \
+                                     (((uint32)    ((uchar) (A)[3])) << 24)) + \
+                         (((ulonglong) ((uchar) (A)[4])) << 32) +       \
+                         (((ulonglong) ((uchar) (A)[5])) << 40))
 #define uint8korr(A)	((ulonglong)(((uint32) ((uchar) (A)[0])) +\
 				    (((uint32) ((uchar) (A)[1])) << 8) +\
 				    (((uint32) ((uchar) (A)[2])) << 16) +\
@@ -1222,6 +1240,12 @@
                                   *(((char *)(T))+2)=(((A) >> 16));\
                                   *(((char *)(T))+3)=(((A) >> 24)); \
                                   *(((char *)(T))+4)=(((A) >> 32)); } while(0)
+#define int6store(T,A)       do { *((char *)(T))=((A));\
+                                  *(((char *)(T))+1)=(((A) >> 8));  \
+                                  *(((char *)(T))+2)=(((A) >> 16)); \
+                                  *(((char *)(T))+3)=(((A) >> 24)); \
+                                  *(((char *)(T))+4)=(((A) >> 32)); \
+                                  *(((char *)(T))+5)=(((A) >> 40)); } while(0)
 #define int8store(T,A)       do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
                                   int4store((T),def_temp); \
                                   int4store((T+4),def_temp2); } while(0)

--- 1.4/mysql-test/r/rpl_row_flsh_tbls.result	2005-10-13 20:51:52 +02:00
+++ 1.5/mysql-test/r/rpl_row_flsh_tbls.result	2005-12-20 23:04:56 +01:00
@@ -12,13 +12,13 @@
 insert into t4 select * from t3;
 rename table t1 to t5, t2 to t1;
 flush no_write_to_binlog tables;
-SHOW BINLOG EVENTS FROM 607 ;
+SHOW BINLOG EVENTS FROM 615 ;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	1	#	use `test`; rename table t1 to t5, t2 to t1
 select * from t3;
 a
 flush tables;
-SHOW BINLOG EVENTS FROM 607 ;
+SHOW BINLOG EVENTS FROM 615 ;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	1	#	use `test`; rename table t1 to t5, t2 to t1
 master-bin.000001	#	Query	1	#	use `test`; flush tables

--- 1.4/mysql-test/r/rpl_row_log.result	2005-10-14 21:38:40 +02:00
+++ 1.5/mysql-test/r/rpl_row_log.result	2005-12-20 23:04:56 +01:00
@@ -70,13 +70,13 @@
 master-bin.000002	#	Query	1	#	use `test`; drop table t1
 show binary logs;
 Log_name	File_size
-master-bin.000001	1298
-master-bin.000002	495
+master-bin.000001	1306
+master-bin.000002	499
 start slave;
 show binary logs;
 Log_name	File_size
-slave-bin.000001	1459
-slave-bin.000002	333
+slave-bin.000001	1467
+slave-bin.000002	337
 show binlog events in 'slave-bin.000001' from 4;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 slave-bin.000001	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
@@ -100,6 +100,6 @@
 slave-bin.000002	#	Query	1	#	use `test`; drop table t1
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	495	#	#	master-bin.000002	Yes	Yes				#			0		0	495	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	499	#	#	master-bin.000002	Yes	Yes				#			0		0	499	#	None		0	No						#
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log

--- 1.3/mysql-test/r/rpl_row_max_relay_size.result	2005-09-13 19:18:47 +02:00
+++ 1.4/mysql-test/r/rpl_row_max_relay_size.result	2005-12-20 23:04:56 +01:00
@@ -16,7 +16,7 @@
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	55464	#	#	master-bin.000001	Yes	Yes				#			0		0	55464	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	58664	#	#	master-bin.000001	Yes	Yes				#			0		0	58664	#	None		0	No						#
 stop slave;
 reset slave;
 set global max_relay_log_size=(5*4096);
@@ -26,7 +26,7 @@
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	55464	#	#	master-bin.000001	Yes	Yes				#			0		0	55464	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	58664	#	#	master-bin.000001	Yes	Yes				#			0		0	58664	#	None		0	No						#
 stop slave;
 reset slave;
 set global max_relay_log_size=0;
@@ -36,7 +36,7 @@
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	55464	#	#	master-bin.000001	Yes	Yes				#			0		0	55464	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	58664	#	#	master-bin.000001	Yes	Yes				#			0		0	58664	#	None		0	No						#
 stop slave;
 reset slave;
 flush logs;
@@ -49,12 +49,12 @@
 create table t1 (a int);
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	55550	#	#	master-bin.000001	Yes	Yes				#			0		0	55550	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	58750	#	#	master-bin.000001	Yes	Yes				#			0		0	58750	#	None		0	No						#
 flush logs;
 drop table t1;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	55626	#	#	master-bin.000001	Yes	Yes				#			0		0	55626	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	58826	#	#	master-bin.000001	Yes	Yes				#			0		0	58826	#	None		0	No						#
 flush logs;
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB

--- 1.2/mysql-test/r/rpl_row_until.result	2005-08-13 11:45:33 +02:00
+++ 1.3/mysql-test/r/rpl_row_until.result	2005-12-20 23:04:57 +01:00
@@ -12,7 +12,7 @@
 insert into t2 values (1),(2);
 insert into t2 values (3),(4);
 drop table t2;
-start slave until master_log_file='master-bin.000001', master_log_pos=307;
+start slave until master_log_file='master-bin.000001', master_log_pos=311;
 select * from t1;
 n
 1
@@ -21,7 +21,7 @@
 4
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	728	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	307	#	Master	master-bin.000001	307	No						#
+#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	740	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	311	#	Master	master-bin.000001	311	No						#
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
 select * from t1;
 n
@@ -31,21 +31,21 @@
 4
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	728	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	307	#	Master	master-no-such-bin.000001	291	No						#
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=652;
+#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	740	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	311	#	Master	master-no-such-bin.000001	291	No						#
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
 select * from t2;
 n
 1
 2
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	728	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	578	#	Relay	slave-relay-bin.000004	652	No						#
+#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	740	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	586	#	Relay	slave-relay-bin.000004	728	No						#
 start slave;
 stop slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=728;
+start slave until master_log_file='master-bin.000001', master_log_pos=740;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	728	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	728	#	Master	master-bin.000001	728	No						#
+#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	740	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	740	#	Master	master-bin.000001	740	No						#
 start slave until master_log_file='master-bin', master_log_pos=561;
 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
@@ -57,6 +57,6 @@
 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
 start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=728;
+start slave until master_log_file='master-bin.000001', master_log_pos=740;
 Warnings:
 Note	1254	Slave is already running

--- 1.4/mysql-test/t/rpl_row_flsh_tbls.test	2005-09-17 20:43:46 +02:00
+++ 1.5/mysql-test/t/rpl_row_flsh_tbls.test	2005-12-20 23:04:57 +01:00
@@ -1,6 +1,6 @@
 # depends on the binlog output
 -- source include/have_binlog_format_row.inc
 
-let $rename_event_pos= 607;
+let $rename_event_pos= 615;
 -- source extra/rpl_tests/rpl_flsh_tbls.test
 

--- 1.3/mysql-test/t/rpl_row_until.test	2005-12-05 18:52:20 +01:00
+++ 1.4/mysql-test/t/rpl_row_until.test	2005-12-20 23:04:57 +01:00
@@ -24,16 +24,14 @@
 drop table t2;
 
 # try to replicate all queries until drop of t1
-#show binlog events;
 connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=307;
+start slave until master_log_file='master-bin.000001', master_log_pos=311;
 sleep 2;
 wait_for_slave_to_stop;
 # here table should be still not deleted
 select * from t1;
-
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 23 # 33 #
+--replace_column 1 # 9 # 11 # 23 # 33 #
 show slave status;
 
 # this should fail right after start
@@ -43,16 +41,16 @@
 sleep 2;
 wait_for_slave_to_stop;
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 23 # 33 #
+--replace_column 1 # 9 # 11 # 23 # 33 #
 show slave status;
 
-# try replicate all up to and including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=652;
+# try replicate all up to and not including the second insert to t2;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
 sleep 2;
 wait_for_slave_to_stop;
 select * from t2;
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 9 # 23 # 33 #
+--replace_column 1 # 9 # 11 # 23 # 33 #
 show slave status;
 
 # clean up
@@ -60,11 +58,11 @@
 connection master;
 save_master_pos;
 connection slave;
-#sync_with_master;
+sync_with_master;
 stop slave;
 
 # this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=728;
+start slave until master_log_file='master-bin.000001', master_log_pos=740;
 sleep 2;
 wait_for_slave_to_stop;
 # here the sql slave thread should be stopped
@@ -85,4 +83,4 @@
 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
 # Warning should be given for second command
 start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=728;
+start slave until master_log_file='master-bin.000001', master_log_pos=740;

--- 1.68/mysql-test/Makefile.am	2005-12-13 16:10:47 +01:00
+++ 1.69/mysql-test/Makefile.am	2005-12-20 23:04:52 +01:00
@@ -20,15 +20,6 @@
 SUBDIRS = ndb
 DIST_SUBDIRS=ndb
 
-# This should not be pushed into the main 5.1
-if HAVE_ROW_BASED_REPLICATION
-EXTRA_MASTER_MYSQLD_OPT=\"--binlog-format=row\"
-EXTRA_SLAVE_MYSQLD_OPT=\"--binlog-format=row\"
-else
-EXTRA_MASTER_MYSQLD_OPT=\"\"
-EXTRA_SLAVE_MYSQLD_OPT=\"\"
-endif
-
 benchdir_root=		$(prefix)
 testdir =	        $(benchdir_root)/mysql-test
 EXTRA_SCRIPTS = 	mysql-test-run.sh mysql-test-run.pl install_test_db.sh valgrind.supp
@@ -144,8 +135,6 @@
 	  -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
 	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
 	  -e 's!@''USE_NDBCLUSTER''@!@TEST_NDBCLUSTER@!g' \
-	  -e 's!@''EXTRA_MASTER_MYSQLD_OPT''@!$(EXTRA_MASTER_MYSQLD_OPT)!g' \
-	  -e 's!@''EXTRA_SLAVE_MYSQLD_OPT''@!$(EXTRA_SLAVE_MYSQLD_OPT)!g' \
 	  $< > $@-t
 	@CHMOD@ +x $@-t
 	@MV@ $@-t $@
Thread
bk commit into 5.1 tree (guilhem:1.1968)guilhem20 Dec