List:Commits« Previous MessageNext Message »
From:Luis Soares Date:June 1 2010 10:42am
Subject:bzr commit into mysql-5.1-rpl-wl5092 branch (luis.soares:3191)
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/bugfixing/53643%2B53889/mysql-5.1-rpl-wl5092/ based on revid:luis.soares@stripped

 3191 Luis Soares	2010-06-01 [merge]
      BUG 53643: Automerged bundle from bug report.

    added:
      mysql-test/suite/rpl/r/rpl_row_img_misc.result
      mysql-test/suite/rpl/t/rpl_row_img_misc.test
    modified:
      sql/log_event.cc
=== added file 'mysql-test/suite/rpl/r/rpl_row_img_misc.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_misc.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_misc.result	2010-05-14 15:15:09 +0000
@@ -0,0 +1,18 @@
+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 t0 ( col1 INT NOT NULL, col2 INT ) ENGINE=InnoDB;
+INSERT INTO t0 (col1,col2) VALUES (4,7),(4,8);
+CREATE TABLE t1 (col3 DECIMAL(35,0) DEFAULT NULL, 
+col1 INT NOT NULL, 
+col2 INT NOT NULL DEFAULT '0', 
+PRIMARY KEY (col1)) 
+ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+SET SESSION BINLOG_ROW_IMAGE = minimal;
+REPLACE INTO t1 ( col1,col2) SELECT col1,col2 FROM t0;
+Comparing tables master:test.t0 and slave:test.t0
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t0, t1;

=== added file 'mysql-test/suite/rpl/t/rpl_row_img_misc.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_misc.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_img_misc.test	2010-05-14 15:15:09 +0000
@@ -0,0 +1,38 @@
+-- source include/master-slave.inc
+-- source include/have_binlog_format_row.inc
+-- source include/have_innodb.inc
+
+#
+#  BUG#53643: assert in Field_new_decimal::store_value on slave server
+#
+
+CREATE TABLE t0 ( col1 INT NOT NULL, col2 INT ) ENGINE=InnoDB;
+INSERT INTO t0 (col1,col2) VALUES (4,7),(4,8);
+
+-- sync_slave_with_master
+-- connection master
+
+CREATE TABLE t1 (col3 DECIMAL(35,0) DEFAULT NULL, 
+                 col1 INT NOT NULL, 
+                 col2 INT NOT NULL DEFAULT '0', 
+                 PRIMARY KEY (col1)) 
+  ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+
+SET SESSION BINLOG_ROW_IMAGE = minimal;
+
+# This statement would lead to an assert on slave
+REPLACE INTO t1 ( col1,col2) SELECT col1,col2 FROM t0;
+
+-- sync_slave_with_master
+-- connection master
+
+-- let $diff_table_1=master:test.t0
+-- let $diff_table_2=slave:test.t0
+-- source include/diff_tables.inc
+
+-- let $diff_table_1=master:test.t1
+-- let $diff_table_2=slave:test.t1
+-- source include/diff_tables.inc
+
+DROP TABLE t0, t1;
+-- sync_slave_with_master

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-05-10 23:33:42 +0000
+++ b/sql/log_event.cc	2010-06-01 10:42:09 +0000
@@ -7633,9 +7633,17 @@ int Rows_log_event::do_apply_event(Relay
     DBUG_PRINT_BITSET("debug", "Setting table's write_set from: %s", &m_cols);
     
     bitmap_set_all(table->read_set);
+    if (get_type_code() == DELETE_ROWS_EVENT)
+        bitmap_intersect(table->read_set,&m_cols);
+
     bitmap_set_all(table->write_set);
     if (!get_flags(COMPLETE_ROWS_F))
-      bitmap_intersect(table->write_set,&m_cols);
+    {
+      if (get_type_code() == UPDATE_ROWS_EVENT)
+        bitmap_intersect(table->write_set,&m_cols_ai);
+      else /* WRITE ROWS EVENTS store the bitmap in m_cols instead of m_cols_ai */
+        bitmap_intersect(table->write_set,&m_cols);
+    }
 
     this->slave_exec_mode= slave_exec_mode_options; // fix the mode
 


Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20100601104209-8t3feubv43sv26lc.bundle
Thread
bzr commit into mysql-5.1-rpl-wl5092 branch (luis.soares:3191)Luis Soares1 Jun