List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:July 10 2007 9:58pm
Subject:Re: bk commit into 5.1 tree (Justin.He:1.2537) BUG#19259
View as plain text  
Justin, hello.

I am mostly okay with the fixes.

>
> ChangeSet@stripped, 2007-07-06 15:04:30+08:00, Justin.He@stripped +10 -0
>   Bug#19259, rpl_ndb_dd_partitions failed on Solaris
>   correct four bitmap_init() n_bits issues in log_events.cc
>   update some test cases' result:
>   binlog_multi_engine.test
>   ndb_binlog_multi.test
>   rpl_ndb_dd_partitions.test
>   rpl_ndb_log.test
>   rpl_truncate_7ndb.test
>   rpl_truncate_7ndb_2.test

Please provide problem description and solution sections in the
changeset comments.
As we know the problem is two-fold: in wrong initialization on master side
and in unnecessary extending m_cols bitmap on slave side.


>
>   mysql-test/r/binlog_multi_engine.result@stripped, 2007-07-06 15:04:15+08:00,
> Justin.He@stripped +0 -2
>     update result
>

Because of the 1st part, we have in some - e.g in the above one - pre-patch test results
extra
Write_rows_log_event.  Now the diffrences can be explained. Look at
lines of THD::binlog_prepare_pending_rows_event
 
  if (!pending
       ...
      !bitmap_cmp(pending->get_cols(), cols)) 



>   mysql-test/r/ndb_binlog_multi.result@stripped, 2007-07-06 15:04:15+08:00,
> Justin.He@stripped +0 -4
>     update result
>
>   mysql-test/r/rpl_ndb_dd_partitions.result@stripped, 2007-07-06 15:04:15+08:00,
> Justin.He@stripped +22 -22
>     update result
>
>   mysql-test/r/rpl_ndb_log.result@stripped, 2007-07-06 15:04:15+08:00,
> Justin.He@stripped +2 -5
>     update result
>
>   mysql-test/r/rpl_truncate_7ndb.result@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +22 -26
>     update result
>

>   mysql-test/r/rpl_truncate_7ndb_2.result@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +34 -34
>     update result

The change

-master-bin.000001	4	Format_desc	1	102	Server ver: SERVER_VERSION, Binlog ver: 4
+master-bin.000001	4	Format_desc	1	106	Server ver: SERVER_VERSION, Binlog ver

we discussed. It's okay as FormatDescription event matured for 4 bytes
since the last time the results had been recorded.

Another change is the same disappearing Write_rows_log_event
>
>   mysql-test/t/disabled.def@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +0 -1
>     resume this test case
>
>   mysql-test/t/rpl_ndb_dd_partitions-master.opt@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +1 -0
>     add --new=true passed to mysqld 
>
>   mysql-test/t/rpl_ndb_dd_partitions-master.opt@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +0 -0
>
>   mysql-test/t/rpl_ndb_dd_partitions-slave.opt@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +1 -0
>     add --new=true passed to mysqld
>
>   mysql-test/t/rpl_ndb_dd_partitions-slave.opt@stripped, 2007-07-06 15:04:16+08:00,
> Justin.He@stripped +0 -0
>
>   sql/log_event.cc@stripped, 2007-07-06 15:04:16+08:00, Justin.He@stripped
> +4 -4
>     initialize m_cols' n_bits with m_width instead of octal-round(m_width)
>     initialize m_cols_ai' n_bits with m_width instead of octal-round(m_width)
>
> diff -Nrup a/mysql-test/r/binlog_multi_engine.result
> b/mysql-test/r/binlog_multi_engine.result
> --- a/mysql-test/r/binlog_multi_engine.result	2007-06-28 06:49:43 +08:00
> +++ b/mysql-test/r/binlog_multi_engine.result	2007-07-06 15:04:15 +08:00
> @@ -57,7 +57,6 @@ master-bin.000001	#	Query	#	#	BEGIN
>  master-bin.000001	#	Table_map	#	#	table_id: # (test.t1n)
>  master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	#	Write_rows	#	#	table_id: #
> -master-bin.000001	#	Write_rows	#	#	table_id: #
>  master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
>  master-bin.000001	#	Query	#	#	COMMIT
>  master-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1n
> @@ -80,7 +79,6 @@ master-bin.000001	#	Write_rows	#	#	table
>  master-bin.000001	#	Query	#	#	BEGIN
>  master-bin.000001	#	Table_map	#	#	table_id: # (test.t1n)
>  master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)

> -master-bin.000001	#	Write_rows	#	#	table_id: #

The row event disappeares because after correcting master side
Write_rows_log_event's m_col bitmap initialization this event has the
same m_cols as the preceeding one and thereafter they got glued into
one bigger size event. This is the correct behaviour now. And that
must have been asked before why do we had more that one
Write_rows_log_event for the query like in  binlog_multi_engine.test

   INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);

To be extra safe I suggest for you to extend one of the tests where
extra Write_rows_log_event:s disappear with reading from binlog file
and selecting or selecting from the slave side to prove that we
binlogged correctly.

>  master-bin.000001	#	Write_rows	#	#	table_id: #
>  master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
>  master-bin.000001	#	Query	#	#	COMMIT
> diff -Nrup a/mysql-test/r/ndb_binlog_multi.result
> b/mysql-test/r/ndb_binlog_multi.result
> --- a/mysql-test/r/ndb_binlog_multi.result	2007-04-18 22:02:18 +08:00
> +++ b/mysql-test/r/ndb_binlog_multi.result	2007-07-06 15:04:15 +08:00
> @@ -13,7 +13,6 @@ master-bin1.000001	#	Query	102	#	BEGIN
>  master-bin1.000001	#	Table_map	102	#	table_id: # (test.t2)
>  master-bin1.000001	#	Table_map	102	#	table_id: # (mysql.ndb_apply_status)
>  master-bin1.000001	#	Write_rows	102	#	table_id: #
> -master-bin1.000001	#	Write_rows	102	#	table_id: #
>  master-bin1.000001	#	Write_rows	102	#	table_id: # flags: STMT_END_F
>  master-bin1.000001	#	Query	102	#	COMMIT
>  select * from t2 order by a;
> @@ -36,7 +35,6 @@ master-bin.000001	#	Query	1	#	BEGIN
>  master-bin.000001	#	Table_map	1	#	table_id: # (test.t2)
>  master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	#	Write_rows	1	#	table_id: #
> -master-bin.000001	#	Write_rows	1	#	table_id: #
>  master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
>  master-bin.000001	#	Query	1	#	COMMIT
>  master-bin.000001	#	Query	1	#	use `test`; DROP TABLE t2
> @@ -55,7 +53,6 @@ master-bin1.000001	#	Query	102	#	BEGIN
>  master-bin1.000001	#	Table_map	102	#	table_id: # (test.t1)
>  master-bin1.000001	#	Table_map	102	#	table_id: # (mysql.ndb_apply_status)
>  master-bin1.000001	#	Write_rows	102	#	table_id: #
> -master-bin1.000001	#	Write_rows	102	#	table_id: #
>  master-bin1.000001	#	Write_rows	102	#	table_id: # flags: STMT_END_F
>  master-bin1.000001	#	Query	102	#	COMMIT
>  SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM 
> @@ -73,7 +70,6 @@ master-bin1.000001	#	Query	102	#	use `te
>  master-bin1.000001	#	Query	102	#	BEGIN
>  master-bin1.000001	#	Table_map	102	#	table_id: # (test.t1)
>  master-bin1.000001	#	Table_map	102	#	table_id: # (mysql.ndb_apply_status)
> -master-bin1.000001	#	Write_rows	102	#	table_id: #
>  master-bin1.000001	#	Write_rows	102	#	table_id: #
>  master-bin1.000001	#	Write_rows	102	#	table_id: # flags: STMT_END_F
>  master-bin1.000001	#	Query	102	#	COMMIT



I can not explain diffrences in rpl_ndb_dd_partitions results except . Please
do that in your answer.


> diff -Nrup a/mysql-test/r/rpl_ndb_dd_partitions.result
> b/mysql-test/r/rpl_ndb_dd_partitions.result
> --- a/mysql-test/r/rpl_ndb_dd_partitions.result	2006-06-28 00:43:57 +08:00
> +++ b/mysql-test/r/rpl_ndb_dd_partitions.result	2007-07-06 15:04:15 +08:00
> @@ -52,7 +52,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1
> VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE =
> ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES
> LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE =
> ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE =
> ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES
> LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE =
> ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES
> LESS THAN MAXVALUE ENGINE = ndbcluster) */
>  --- Show table on slave --
>  SHOW CREATE TABLE t1;
>  Table	Create Table
> @@ -66,7 +66,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1
> VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE =
> ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES
> LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE =
> ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE =
> ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES
> LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE =
> ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES
> LESS THAN MAXVALUE ENGINE = ndbcluster) */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -122,7 +122,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION
> p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946)
> ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION
> p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005)
> ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE =
> ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES
> LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE =
> ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES
> LESS THAN MAXVALUE ENGINE = ndbcluster) */
>  --- Make sure that our tables on slave are still same engine ---
>  --- and that the alter statements replicated correctly ---
>  SHOW CREATE TABLE t1;
> @@ -137,7 +137,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION
> p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946)
> ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION
> p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005)
> ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE =
> ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES
> LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE =
> ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES
> LESS THAN MAXVALUE ENGINE = ndbcluster) */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -207,7 +207,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0
> VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
> PARTITION p2 VALUES IN (412) ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
> PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE =
> ndbcluster) */
>  --- Show table on slave ---
>  SHOW CREATE TABLE t1;
>  Table	Create Table
> @@ -221,7 +221,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0
> VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
> PARTITION p2 VALUES IN (412) ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
> PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE =
> ndbcluster) */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -277,7 +277,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0
> VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
> PARTITION p2 VALUES IN (412) ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
> PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE =
> ndbcluster) */
>  --- Make sure that our tables on slave are still same engine ---
>  --- and that the alter statements replicated correctly ---
>  SHOW CREATE TABLE t1;
> @@ -292,7 +292,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0
> VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
> PARTITION p2 VALUES IN (412) ENGINE = ndbcluster)
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
> PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE =
> ndbcluster) */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -359,7 +359,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> HASH ( YEAR(t)) PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4  */
>  SHOW CREATE TABLE t1;
>  Table	Create Table
>  t1	CREATE TABLE `t1` (
> @@ -372,7 +372,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> HASH ( YEAR(t)) PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4  */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -397,11 +397,11 @@ UPDATE t1 SET b1 = 0, t="2006-02-22" WHE
>  --- Check the update on master --- 
>  SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
>  id	hex(b1)	vc	bc	d	f	total	y	t
> -412	1	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
> +412	0	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
>  --- Check Update on slave ---
>  SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
>  id	hex(b1)	vc	bc	d	f	total	y	t
> -412	1	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
> +412	0	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
>  --- Remove a record from t1 on master ---
>  DELETE FROM t1 WHERE id = 42;
>  --- Show current count on master for t1 ---
> @@ -428,7 +428,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4
> 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4  */
>  --- Make sure that our tables on slave are still same engine ---
>  --- and that the alter statements replicated correctly ---
>  SHOW CREATE TABLE t1;
> @@ -443,7 +443,7 @@ t1	CREATE TABLE `t1` (
>    `total` bigint(20) unsigned DEFAULT NULL,
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4
> 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4  */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -468,11 +468,11 @@ UPDATE t1 SET b1 = 0, t="2006-02-22" WHE
>  --- Check the update on master --- 
>  SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
>  id	hex(b1)	vc	bc	d	f	total	y	t
> -412	1	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
> +412	0	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
>  --- Check Update on slave ---
>  SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
>  id	hex(b1)	vc	bc	d	f	total	y	t
> -412	1	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
> +412	0	Testing MySQL databases is a cool 	Must make it bug free for the
> customer	654321.4321	15.21	0	1965	2006-02-22
>  --- Remove a record from t1 on master ---
>  DELETE FROM t1 WHERE id = 42;
>  --- Show current count on master for t1 ---
> @@ -511,7 +511,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`)
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Show that tables on slave ---
>  SHOW CREATE TABLE t1;
>  Table	Create Table
> @@ -526,7 +526,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`)
> -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY
> KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -583,7 +583,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`,`total`)
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Make sure that our tables on slave are still right type ---
>  --- and that the alter statements replicated correctly ---
>  SHOW CREATE TABLE t1;
> @@ -599,7 +599,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`,`total`)
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> @@ -656,7 +656,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`,`total`)
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Make sure that our tables on slave are still same engine ---
>  --- and that the alter statements replicated correctly ---
>  SHOW CREATE TABLE t1;
> @@ -672,7 +672,7 @@ t1	CREATE TABLE `t1` (
>    `y` year(4) DEFAULT NULL,
>    `t` date DEFAULT NULL,
>    PRIMARY KEY (`id`,`total`)
> -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 
> +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
> /*!50100 PARTITION BY KEY () PARTITIONS 4  */
>  --- Perform basic operation on master ---
>  --- and ensure replicated correctly ---
>  "--- Insert into t1 --" as "";
> diff -Nrup a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result
> --- a/mysql-test/r/rpl_ndb_log.result	2007-06-12 04:15:20 +08:00
> +++ b/mysql-test/r/rpl_ndb_log.result	2007-07-06 15:04:15 +08:00
> @@ -32,7 +32,6 @@ master-bin.000001	#	Query	1	#	BEGIN
>  master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
>  master-bin.000001	#	Table_map	1	#	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	#	Write_rows	1	#	table_id: #
> -master-bin.000001	#	Write_rows	1	#	table_id: #
>  master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
>  master-bin.000001	#	Query	1	#	COMMIT
>  show binlog events from 106 limit 1;
> @@ -71,7 +70,6 @@ master-bin.000001	#	Query	#	#	BEGIN
>  master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
>  master-bin.000001	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	#	Write_rows	#	#	table_id: #
> -master-bin.000001	#	Write_rows	#	#	table_id: #
>  master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
>  master-bin.000001	#	Query	#	#	COMMIT
>  master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
> @@ -88,12 +86,12 @@ master-bin.000002	#	Write_rows	1	#	table
>  master-bin.000002	#	Query	1	#	COMMIT
>  show binary logs;
>  Log_name	File_size
> -master-bin.000001	1775
> +master-bin.000001	1746
>  master-bin.000002	617
>  start slave;
>  show binary logs;
>  Log_name	File_size
> -slave-bin.000001	1870
> +slave-bin.000001	1841
>  slave-bin.000002	202
>  show binlog events in 'slave-bin.000001' from 4;
>  Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> @@ -111,7 +109,6 @@ slave-bin.000001	#	Query	2	#	BEGIN
>  slave-bin.000001	#	Table_map	2	#	table_id: # (test.t1)
>  slave-bin.000001	#	Table_map	2	#	table_id: # (mysql.ndb_apply_status)
>  slave-bin.000001	#	Write_rows	2	#	table_id: #
> -slave-bin.000001	#	Write_rows	1	#	table_id: #
>  slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
>  slave-bin.000001	#	Query	2	#	COMMIT
>  slave-bin.000001	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=NDB
> diff -Nrup a/mysql-test/r/rpl_truncate_7ndb.result
> b/mysql-test/r/rpl_truncate_7ndb.result
> --- a/mysql-test/r/rpl_truncate_7ndb.result	2007-03-30 10:44:45 +08:00
> +++ b/mysql-test/r/rpl_truncate_7ndb.result	2007-07-06 15:04:16 +08:00
> @@ -35,11 +35,10 @@ master-bin.000001	223	Query	1	287	BEGIN
>  master-bin.000001	287	Table_map	1	40	table_id: # (test.t1)
>  master-bin.000001	327	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	385	Write_rows	1	157	table_id: #
> -master-bin.000001	444	Write_rows	1	195	table_id: #
> -master-bin.000001	482	Write_rows	1	233	table_id: # flags: STMT_END_F
> -master-bin.000001	520	Query	1	585	COMMIT
> -master-bin.000001	585	Query	1	665	use `test`; TRUNCATE TABLE t1
> -master-bin.000001	665	Query	1	741	use `test`; DROP TABLE t1
> +master-bin.000001	444	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	491	Query	1	556	COMMIT
> +master-bin.000001	556	Query	1	636	use `test`; TRUNCATE TABLE t1
> +master-bin.000001	636	Query	1	712	use `test`; DROP TABLE t1
>  **** On Master ****
>  CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
>  INSERT INTO t1 VALUES (1,1), (2,2);
> @@ -72,24 +71,21 @@ master-bin.000001	223	Query	1	287	BEGIN
>  master-bin.000001	287	Table_map	1	40	table_id: # (test.t1)
>  master-bin.000001	327	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
>  master-bin.000001	385	Write_rows	1	157	table_id: #
> -master-bin.000001	444	Write_rows	1	195	table_id: #
> -master-bin.000001	482	Write_rows	1	233	table_id: # flags: STMT_END_F
> -master-bin.000001	520	Query	1	585	COMMIT
> -master-bin.000001	585	Query	1	665	use `test`; TRUNCATE TABLE t1
> -master-bin.000001	665	Query	1	741	use `test`; DROP TABLE t1
> -master-bin.000001	741	Query	1	858	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> -master-bin.000001	858	Query	1	922	BEGIN
> -master-bin.000001	922	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	962	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> -master-bin.000001	1020	Write_rows	1	157	table_id: #
> -master-bin.000001	1079	Write_rows	1	195	table_id: #
> -master-bin.000001	1117	Write_rows	1	233	table_id: # flags: STMT_END_F
> -master-bin.000001	1155	Query	1	1220	COMMIT
> -master-bin.000001	1220	Query	1	1284	BEGIN
> -master-bin.000001	1284	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	1324	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> -master-bin.000001	1382	Write_rows	1	157	table_id: #
> -master-bin.000001	1441	Delete_rows	1	191	table_id: #
> -master-bin.000001	1475	Delete_rows	1	225	table_id: # flags: STMT_END_F
> -master-bin.000001	1509	Query	1	1574	COMMIT
> -master-bin.000001	1574	Query	1	1650	use `test`; DROP TABLE t1
> +master-bin.000001	444	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	491	Query	1	556	COMMIT
> +master-bin.000001	556	Query	1	636	use `test`; TRUNCATE TABLE t1
> +master-bin.000001	636	Query	1	712	use `test`; DROP TABLE t1
> +master-bin.000001	712	Query	1	829	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> +master-bin.000001	829	Query	1	893	BEGIN
> +master-bin.000001	893	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	933	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	991	Write_rows	1	157	table_id: #
> +master-bin.000001	1050	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	1097	Query	1	1162	COMMIT
> +master-bin.000001	1162	Query	1	1226	BEGIN
> +master-bin.000001	1226	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	1266	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	1324	Write_rows	1	157	table_id: #
> +master-bin.000001	1383	Delete_rows	1	196	table_id: # flags: STMT_END_F
> +master-bin.000001	1422	Query	1	1487	COMMIT
> +master-bin.000001	1487	Query	1	1563	use `test`; DROP TABLE t1
> diff -Nrup a/mysql-test/r/rpl_truncate_7ndb_2.result
> b/mysql-test/r/rpl_truncate_7ndb_2.result
> --- a/mysql-test/r/rpl_truncate_7ndb_2.result	2006-11-22 04:32:50 +08:00
> +++ b/mysql-test/r/rpl_truncate_7ndb_2.result	2007-07-06 15:04:16 +08:00
> @@ -29,16 +29,16 @@ a	b
>  DROP TABLE t1;
>  SHOW BINLOG EVENTS;
>  Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	4	Format_desc	1	102	Server ver: SERVER_VERSION, Binlog ver: 4
> -master-bin.000001	102	Query	1	219	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> -master-bin.000001	219	Query	1	283	BEGIN
> -master-bin.000001	283	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	323	Table_map	1	93	table_id: # (mysql.apply_status)
> -master-bin.000001	376	Write_rows	1	135	table_id: #
> -master-bin.000001	418	Write_rows	1	182	table_id: # flags: STMT_END_F
> -master-bin.000001	465	Query	1	530	COMMIT
> -master-bin.000001	530	Query	1	610	use `test`; TRUNCATE TABLE t1
> -master-bin.000001	610	Query	1	686	use `test`; DROP TABLE t1
> +master-bin.000001	4	Format_desc	1	106	Server ver: SERVER_VERSION, Binlog ver: 4
> +master-bin.000001	106	Query	1	223	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> +master-bin.000001	223	Query	1	287	BEGIN
> +master-bin.000001	287	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	327	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	385	Write_rows	1	157	table_id: #
> +master-bin.000001	444	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	491	Query	1	556	COMMIT
> +master-bin.000001	556	Query	1	636	use `test`; TRUNCATE TABLE t1
> +master-bin.000001	636	Query	1	712	use `test`; DROP TABLE t1
>  **** On Master ****
>  CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
>  INSERT INTO t1 VALUES (1,1), (2,2);
> @@ -65,27 +65,27 @@ a	b
>  DROP TABLE t1;
>  SHOW BINLOG EVENTS;
>  Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	4	Format_desc	1	102	Server ver: SERVER_VERSION, Binlog ver: 4
> -master-bin.000001	102	Query	1	219	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> -master-bin.000001	219	Query	1	283	BEGIN
> -master-bin.000001	283	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	323	Table_map	1	93	table_id: # (mysql.apply_status)
> -master-bin.000001	376	Write_rows	1	135	table_id: #
> -master-bin.000001	418	Write_rows	1	182	table_id: # flags: STMT_END_F
> -master-bin.000001	465	Query	1	530	COMMIT
> -master-bin.000001	530	Query	1	610	use `test`; TRUNCATE TABLE t1
> -master-bin.000001	610	Query	1	686	use `test`; DROP TABLE t1
> -master-bin.000001	686	Query	1	803	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> -master-bin.000001	803	Query	1	867	BEGIN
> -master-bin.000001	867	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	907	Table_map	1	93	table_id: # (mysql.apply_status)
> -master-bin.000001	960	Write_rows	1	135	table_id: #
> -master-bin.000001	1002	Write_rows	1	182	table_id: # flags: STMT_END_F
> -master-bin.000001	1049	Query	1	1114	COMMIT
> -master-bin.000001	1114	Query	1	1178	BEGIN
> -master-bin.000001	1178	Table_map	1	40	table_id: # (test.t1)
> -master-bin.000001	1218	Table_map	1	93	table_id: # (mysql.apply_status)
> -master-bin.000001	1271	Write_rows	1	135	table_id: #
> -master-bin.000001	1313	Delete_rows	1	174	table_id: # flags: STMT_END_F
> -master-bin.000001	1352	Query	1	1417	COMMIT
> -master-bin.000001	1417	Query	1	1493	use `test`; DROP TABLE t1
> +master-bin.000001	4	Format_desc	1	106	Server ver: SERVER_VERSION, Binlog ver: 4
> +master-bin.000001	106	Query	1	223	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> +master-bin.000001	223	Query	1	287	BEGIN
> +master-bin.000001	287	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	327	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	385	Write_rows	1	157	table_id: #
> +master-bin.000001	444	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	491	Query	1	556	COMMIT
> +master-bin.000001	556	Query	1	636	use `test`; TRUNCATE TABLE t1
> +master-bin.000001	636	Query	1	712	use `test`; DROP TABLE t1
> +master-bin.000001	712	Query	1	829	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b
> LONG) ENGINE=NDB
> +master-bin.000001	829	Query	1	893	BEGIN
> +master-bin.000001	893	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	933	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	991	Write_rows	1	157	table_id: #
> +master-bin.000001	1050	Write_rows	1	204	table_id: # flags: STMT_END_F
> +master-bin.000001	1097	Query	1	1162	COMMIT
> +master-bin.000001	1162	Query	1	1226	BEGIN
> +master-bin.000001	1226	Table_map	1	40	table_id: # (test.t1)
> +master-bin.000001	1266	Table_map	1	98	table_id: # (mysql.ndb_apply_status)
> +master-bin.000001	1324	Write_rows	1	157	table_id: #
> +master-bin.000001	1383	Delete_rows	1	196	table_id: # flags: STMT_END_F
> +master-bin.000001	1422	Query	1	1487	COMMIT
> +master-bin.000001	1487	Query	1	1563	use `test`; DROP TABLE t1


> diff -Nrup a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
> --- a/mysql-test/t/disabled.def	2007-07-04 20:06:21 +08:00
> +++ b/mysql-test/t/disabled.def	2007-07-06 15:04:16 +08:00
> @@ -28,7 +28,6 @@ partition_03ndb          : BUG#16385 200
>  rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it
> stopped
>  rpl_ndb_2innodb          : BUG#19227 2006-04-20 pekka pk delete apparently not
> replicated
>  rpl_ndb_2myisam          : BUG#19227 Seems to pass currently
> -rpl_ndb_dd_partitions    : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on
> s/AMD

This is really nice to have the guard soldier back to its duty :)

>  rpl_ddl                  : BUG#26418 2007-03-01 mleich Slave out of sync after
> CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
>  rpl_ndb_innodb2ndb       : Bug #19710  Cluster replication to partition table fails
> on DELETE FROM statement
>  rpl_ndb_myisam2ndb       : Bug #19710  Cluster replication to partition table fails
> on DELETE FROM statement


> diff -Nrup a/mysql-test/t/rpl_ndb_dd_partitions-master.opt
> b/mysql-test/t/rpl_ndb_dd_partitions-master.opt
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/mysql-test/t/rpl_ndb_dd_partitions-master.opt	2007-07-06 15:04:16 +08:00
> @@ -0,0 +1 @@
> +--new=true
> diff -Nrup a/mysql-test/t/rpl_ndb_dd_partitions-slave.opt
> b/mysql-test/t/rpl_ndb_dd_partitions-slave.opt
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/mysql-test/t/rpl_ndb_dd_partitions-slave.opt	2007-07-06 15:04:16 +08:00
> @@ -0,0 +1 @@
> +--new=true
> diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
> --- a/sql/log_event.cc	2007-06-28 21:07:53 +08:00
> +++ b/sql/log_event.cc	2007-07-06 15:04:16 +08:00
> @@ -5653,7 +5653,7 @@ Rows_log_event::Rows_log_event(THD *thd_
>    /* if bitmap_init fails, catched in is_valid() */
>    if (likely(!bitmap_init(&m_cols,
>                            m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
> -                          (m_width + 7) & ~7UL,
> +                          m_width,
>                            false)))
>    {
>      /* Cols can be zero if this is a dummy binrows event */
> @@ -5711,7 +5711,7 @@ Rows_log_event::Rows_log_event(const cha
>    /* if bitmap_init fails, catched in is_valid() */
>    if (likely(!bitmap_init(&m_cols,
>                            m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
> -                          (m_width + 7) & ~7UL,
> +                          m_width,
>                            false)))
>    {
>      DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
> @@ -5735,7 +5735,7 @@ Rows_log_event::Rows_log_event(const cha
>      /* if bitmap_init fails, catched in is_valid() */
>      if (likely(!bitmap_init(&m_cols_ai,
>                              m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai :
> NULL,
> -                            (m_width + 7) & ~7UL,
> +                            m_width,
>                              false)))
>      {
>        DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
> @@ -7685,7 +7685,7 @@ void Update_rows_log_event::init(MY_BITM
>    /* if bitmap_init fails, catched in is_valid() */
>    if (likely(!bitmap_init(&m_cols_ai,
>                            m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai : NULL,
> -                          (m_width + 7) & ~7UL,
> +                          m_width,
>                            false)))
>    {
>      /* Cols can be zero if this is a dummy binrows event */


I continue urging you to correct the trailing part of m_cols bitmap
after memcpy to it. Please implement that Mikael's suggestion
2007-07-04 13:31:59 <mikael> andrei: if you change (m_width + 7) & ~7UL to
m_width don't forget to call create_last_word_mask after using a memcpy of the bitmap
bits to ensure the trailing bits are ok

Although it does not hurt now we are better to play safe.



Best regards,

Andrei

Thread
bk commit into 5.1 tree (Justin.He:1.2537) BUG#19259justin.he6 Jul
  • Re: bk commit into 5.1 tree (Justin.He:1.2537) BUG#19259Andrei Elkin10 Jul