List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:December 19 2007 3:02pm
Subject:bk commit into 6.0 tree (mats:1.2763) BUG#33055
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of mats. When mats 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-12-19 16:02:45+01:00, mats@stripped +5 -0
  BUG#33055 (Replication fails for UPDATE when using falcon Storage engine):
  
  Patch to fix some pushbuild failures.

  mysql-test/suite/bugs/r/rpl_bug33055.result@stripped, 2007-12-19 16:02:36+01:00, mats@stripped +60 -0
    New BitKeeper file ``mysql-test/suite/bugs/r/rpl_bug33055.result''

  mysql-test/suite/bugs/r/rpl_bug33055.result@stripped, 2007-12-19 16:02:36+01:00, mats@stripped +0 -0

  mysql-test/suite/bugs/t/rpl_bug33055.test@stripped, 2007-12-19 16:02:37+01:00, mats@stripped +44 -0
    New BitKeeper file ``mysql-test/suite/bugs/t/rpl_bug33055.test''

  mysql-test/suite/bugs/t/rpl_bug33055.test@stripped, 2007-12-19 16:02:37+01:00, mats@stripped +0 -0

  mysql-test/suite/rpl/t/disabled.def@stripped, 2007-12-19 16:02:36+01:00, mats@stripped +1 -0
    Disabling rpl_row_basic_7ndb.

  sql/log_event.cc@stripped, 2007-12-19 16:02:36+01:00, mats@stripped +12 -0
    Exiting early in do_add_row_data when length of row is zero.

  sql/rpl_record.cc@stripped, 2007-12-19 16:02:36+01:00, mats@stripped +5 -3
    Adding casts to debug printouts to avoid compiler warnings.
    Adding cast to signed value to avoid compiler warning when
    comparing with unsigned value. The signed value is always
    positive. 

diff -Nrup a/mysql-test/suite/bugs/r/rpl_bug33055.result b/mysql-test/suite/bugs/r/rpl_bug33055.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/bugs/r/rpl_bug33055.result	2007-12-19 16:02:36 +01:00
@@ -0,0 +1,60 @@
+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;
+**** On Master **** 
+CREATE DATABASE tpcb;
+USE tpcb;
+SET BINLOG_FORMAT = 'ROW';
+CREATE TABLE account (id INT, bid INT, balance DECIMAL(10,2), 
+filler CHAR(255), PRIMARY KEY(id)) ENGINE=falcon;
+SHOW CREATE TABLE account;
+Table	Create Table
+account	CREATE TABLE `account` (
+  `id` int(11) NOT NULL DEFAULT '0',
+  `bid` int(11) DEFAULT NULL,
+  `balance` decimal(10,2) DEFAULT NULL,
+  `filler` char(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=Falcon DEFAULT CHARSET=latin1
+INSERT INTO account VALUES (1, 2, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (2, 5, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (3, 2, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (4, 2, 1.2, "FRESH ACCOUNT");
+SELECT * FROM account;
+id	bid	balance	filler
+1	2	1.20	FRESH ACCOUNT
+2	5	1.20	FRESH ACCOUNT
+3	2	1.20	FRESH ACCOUNT
+4	2	1.20	FRESH ACCOUNT
+**** On Slave **** 
+USE tpcb;
+SELECT * FROM account;
+id	bid	balance	filler
+1	2	1.20	FRESH ACCOUNT
+2	5	1.20	FRESH ACCOUNT
+3	2	1.20	FRESH ACCOUNT
+4	2	1.20	FRESH ACCOUNT
+**** On Master **** 
+UPDATE account SET balance = 3.5 WHERE id = 3;
+UPDATE account SET filler = 'Updated' WHERE id = 2;
+UPDATE account SET balance = 9.2, bid = 21, 
+filler = 'Updated' WHERE id = 4;
+SELECT * FROM account;
+id	bid	balance	filler
+1	2	1.20	FRESH ACCOUNT
+2	5	1.20	Updated
+3	2	3.50	FRESH ACCOUNT
+4	21	9.20	Updated
+**** On Slave **** 
+SELECT * FROM account;
+id	bid	balance	filler
+1	2	1.20	FRESH ACCOUNT
+2	5	1.20	Updated
+3	2	3.50	FRESH ACCOUNT
+4	21	9.20	Updated
+**** On Master **** 
+DROP DATABASE tpcb;
+**** On Slave **** 
diff -Nrup a/mysql-test/suite/bugs/t/rpl_bug33055.test b/mysql-test/suite/bugs/t/rpl_bug33055.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/bugs/t/rpl_bug33055.test	2007-12-19 16:02:37 +01:00
@@ -0,0 +1,44 @@
+source include/master-slave.inc;
+
+--echo **** On Master **** 
+
+CREATE DATABASE tpcb;
+USE tpcb;
+
+SET BINLOG_FORMAT = 'ROW';
+
+CREATE TABLE account (id INT, bid INT, balance DECIMAL(10,2), 
+             filler BLOB, PRIMARY KEY(id)) ENGINE=falcon;
+
+SHOW CREATE TABLE account;
+
+INSERT INTO account VALUES (1, 2, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (2, 5, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (3, 2, 1.2, "FRESH ACCOUNT");
+INSERT INTO account VALUES (4, 2, 1.2, "FRESH ACCOUNT");
+
+SELECT * FROM account;
+
+--echo **** On Slave **** 
+sync_slave_with_master;
+USE tpcb;
+SELECT * FROM account;
+
+--echo **** On Master **** 
+connection master;
+UPDATE account SET balance = 3.5 WHERE id = 3;
+UPDATE account SET filler = 'Updated' WHERE id = 2;
+UPDATE account SET balance = 9.2, bid = 21, 
+                   filler = 'Updated' WHERE id = 4;
+
+SELECT * FROM account;
+
+--echo **** On Slave **** 
+sync_slave_with_master;
+SELECT * FROM account;
+
+--echo **** On Master **** 
+connection master;
+DROP DATABASE tpcb;
+--echo **** On Slave **** 
+sync_slave_with_master;
diff -Nrup a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
--- a/mysql-test/suite/rpl/t/disabled.def	2007-11-28 11:09:26 +01:00
+++ b/mysql-test/suite/rpl/t/disabled.def	2007-12-19 16:02:36 +01:00
@@ -28,3 +28,4 @@ rpl_row_sp002_innodb       : Bug#32673 r
 rpl_ssl                    : Bug#32217 rpl_ssl fails with different number of records on master and slave
 rpl_row_until              : Bug#28772 rpl_row_until fails in pushbuild
 rpl_log_pos                : Bug#8693 Test 'rpl_log_pos' fails sometimes
+rpl_row_basic_7ndb         : BUG#33360 2007-12-19 mats rpl_ndb_idempotent fails due to null field for table on slave side
diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc	2007-12-19 12:25:03 +01:00
+++ b/sql/log_event.cc	2007-12-19 16:02:36 +01:00
@@ -6113,6 +6113,18 @@ int Rows_log_event::do_add_row_data(ucha
   DBUG_ENTER("Rows_log_event::do_add_row_data");
   DBUG_PRINT("enter", ("row_data: 0x%lx  length: %lu", (ulong) row_data,
                        (ulong) length));
+
+  /*
+    If length is zero, there is nothing to write, so we just
+    return. Note that this is not an optimization, since calling
+    realloc() with size 0 means free().
+   */
+  if (length == 0)
+  {
+    m_row_count++;
+    DBUG_RETURN(0);
+  }
+
   /*
     Don't print debug messages when running valgrind since they can
     trigger false warnings.
diff -Nrup a/sql/rpl_record.cc b/sql/rpl_record.cc
--- a/sql/rpl_record.cc	2007-12-18 18:26:45 +01:00
+++ b/sql/rpl_record.cc	2007-12-19 16:02:36 +01:00
@@ -217,8 +217,10 @@ unpack_row(Relay_log_info const *rli,
   {
     Field *const f= *field_ptr;
 
-    DBUG_PRINT("debug", ("field: %s; null mask: 0x%x; null bits: 0x%lx; row start: %p; null bytes: %d",
-                         f->field_name, null_mask, (ulong) null_bits, pack_ptr, master_null_byte_count));
+    DBUG_PRINT("debug", ("field: %s; null mask: 0x%x; null bits: 0x%lx;"
+                         " row start: %p; null bytes: %ld",
+                         f->field_name, null_mask, (ulong) null_bits,
+                         pack_ptr, (ulong) master_null_byte_count));
 
     /*
       No need to bother about columns that does not exist: they have
@@ -375,7 +377,7 @@ int prepare_record(const Slave_reporting
         error = ER_NO_DEFAULT_FOR_FIELD;
       }
     }
-    else if (field_ptr - table->field >= cols->n_bits ||
+    else if ((uint) (field_ptr - table->field) >= cols->n_bits ||
              !bitmap_is_set(cols, field_ptr - table->field))
     {
       DBUG_PRINT("debug", ("Set default; field: %s", f->field_name));
Thread
bk commit into 6.0 tree (mats:1.2763) BUG#33055Mats Kindahl19 Dec