List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:January 23 2009 7:22pm
Subject:bzr commit into mysql-6.0-bugteam branch (aelkin:2974) Bug#42311
View as plain text  
#At file:///home/andrei/MySQL/BZR/MERGE/mysql-6.0-bugteam/ based on revid:davi.arnaut@stripped

 2974 Andrei Elkin	2009-01-23 [merge]
      Bug #42311 load data infile replication 4.1 to 6.0 fails
      
      merging from 5.1-bt and disabling rpl_cross_version due to the aforementioned bug.
added:
  mysql-test/suite/rpl/r/rpl_cross_version.result
  mysql-test/suite/rpl/t/rpl_cross_version-master.opt
  mysql-test/suite/rpl/t/rpl_cross_version.test
modified:
  mysql-test/r/myisampack.result
  mysql-test/suite/rpl/t/disabled.def
  mysql-test/t/myisampack.test
  sql/log_event.cc

=== modified file 'mysql-test/r/myisampack.result'
--- a/mysql-test/r/myisampack.result	2008-12-17 13:23:21 +0000
+++ b/mysql-test/r/myisampack.result	2009-01-22 05:55:26 +0000
@@ -48,4 +48,9 @@ Table	Op	Msg_type	Msg_text
 test.t1	optimize	error	Table 'test.t1' is read only
 Warnings:
 Error	1036	Table 't1' is read only
+repair table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	error	Table 'test.t1' is read only
+Warnings:
+Error	1036	Table 't1' is read only
 drop table t1;

=== added file 'mysql-test/suite/rpl/r/rpl_cross_version.result'
--- a/mysql-test/suite/rpl/r/rpl_cross_version.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_cross_version.result	2009-01-23 17:15:27 +0000
@@ -0,0 +1,12 @@
+==== Initialize ====
+Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
+==== Test ====
+start slave sql_thread;
+==== a prove that the fake has been processed successfully ====
+SELECT COUNT(*) - 17920 as zero FROM t3;
+zero
+0
+==== Clean up ====
+stop slave sql_thread;
+Cleaning up after setup_fake_relay_log.inc
+drop table t1, t3;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2009-01-06 10:38:47 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2009-01-23 19:21:16 +0000
@@ -16,3 +16,4 @@ rpl_row_until              : BUG#41423 2
 rpl_ignore_table           : BUG#41424 2008-12-12 sven rpl_ignore_table fails, "could not execute write_rows event"
 rpl_binlog_corruption : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
 rpl_extraCol_falcon        : Bug#40930 2008-11-21 johnemb rpl.rpl_extraCol_falcon fails doing STOP SLAVE (on Windows PB2)
+rpl_cross_version	   : Bug #42311 2009-01-23 aelkin

=== added file 'mysql-test/suite/rpl/t/rpl_cross_version-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_cross_version-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_cross_version-master.opt	2009-01-22 14:55:14 +0000
@@ -0,0 +1 @@
+--replicate-same-server-id --relay-log=slave-relay-bin

=== added file 'mysql-test/suite/rpl/t/rpl_cross_version.test'
--- a/mysql-test/suite/rpl/t/rpl_cross_version.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_cross_version.test	2009-01-23 17:15:27 +0000
@@ -0,0 +1,36 @@
+# ==== Purpose ====
+#
+# Verify cross-version replication from an old master to the up-to-date slave
+#
+# ==== Implementation ====
+#
+# Feed to the slave server a binlog recorded on an old version master 
+# via setting up slave-to-slave replication. The latter is done by means of
+# the opt file and include/setup_fake_relay_log.inc.
+# The master's binlog is treated as a relay log that the SQL thread executes.
+#
+
+--source include/have_log_bin.inc
+
+#
+# Bug#31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
+#
+
+--echo ==== Initialize ====
+# the relay log contains create t1, t3 tables and load data infile
+--let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
+--source include/setup_fake_relay_log.inc
+
+--echo ==== Test ====
+start slave sql_thread;
+--let $slave_param = Exec_Master_Log_Pos
+# end_log_pos of the last event of the relay log
+--let $slave_param_value = 149436
+--source include/wait_for_slave_param.inc
+--echo ==== a prove that the fake has been processed successfully ====
+SELECT COUNT(*) - 17920 as zero FROM t3;
+
+--echo ==== Clean up ====
+stop slave sql_thread;
+--source include/cleanup_fake_relay_log.inc
+drop table t1, t3;

=== modified file 'mysql-test/t/myisampack.test'
--- a/mysql-test/t/myisampack.test	2008-12-17 13:23:21 +0000
+++ b/mysql-test/t/myisampack.test	2009-01-22 05:55:26 +0000
@@ -34,6 +34,8 @@ DROP TABLE t1;
 
 #
 # Bug#40949 Debug version of MySQL server crashes when run OPTIMIZE on compressed table.
+# expanded with testcase for
+# BUG#41574 - REPAIR TABLE: crashes for compressed tables
 #
 --disable_warnings
 drop table if exists t1;
@@ -55,4 +57,5 @@ insert into t1 select * from t1;
 flush tables;
 --exec $MYISAMPACK $MYSQLTEST_VARDIR/master-data/test/t1
 optimize table t1;
+repair table t1;
 drop table t1;

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2009-01-14 10:05:29 +0000
+++ b/sql/log_event.cc	2009-01-23 19:21:16 +0000
@@ -5962,8 +5962,15 @@ void Create_file_log_event::pack_info(Pr
 #endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
 
 
-/*
+/**
   Create_file_log_event::do_apply_event()
+  Constructor for Create_file_log_event to intantiate an event
+  from the relay log on the slave.
+
+  @retval
+    0           Success
+  @retval
+    1           Failure
 */
 
 #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
@@ -6032,7 +6039,7 @@ err:
   if (fd >= 0)
     my_close(fd, MYF(0));
   thd_proc_info(thd, 0);
-  return error == 0;
+  return error != 0;
 }
 #endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
 

Thread
bzr commit into mysql-6.0-bugteam branch (aelkin:2974) Bug#42311Andrei Elkin23 Jan