Commit a0e0166b authored by unknown's avatar unknown
Browse files

BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT

           field does not work

Fix to prevent MyISAM from reading data from NULL BLOB.
Fix to make record comparison independent of values of unused bits in
record.
Updating binlog positions in tests.


mysql-test/extra/rpl_tests/rpl_multi_query.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Binlog position change
mysql-test/include/show_binlog_events.inc:
  Binlog position change
mysql-test/r/binlog_stm_binlog.result:
  Result change
mysql-test/r/binlog_stm_ctype_ucs.result:
  Result change
mysql-test/r/binlog_stm_insert_select.result:
  Result change
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Result change
mysql-test/r/ctype_cp932_binlog_stm.result:
  Result change
mysql-test/r/ndb_binlog_multi.result:
  Result change
mysql-test/r/rpl_known_bugs_detection.result:
  Result change
mysql-test/r/rpl_loaddata.result:
  Result change
mysql-test/r/rpl_loaddata_s.result:
  Result change
mysql-test/r/rpl_ndb_charset.result:
  Result change
mysql-test/r/rpl_ndb_extraCol.result:
  Result change
mysql-test/r/rpl_ndb_log.result:
  Result change
mysql-test/r/rpl_ndb_multi.result:
  Result change
mysql-test/r/rpl_rbr_to_sbr.result:
  Result change
mysql-test/r/rpl_rotate_logs.result:
  Result change
mysql-test/r/rpl_sp.result:
  Result change
mysql-test/r/rpl_stm_charset.result:
  Result change
mysql-test/r/rpl_stm_flsh_tbls.result:
  Result change
mysql-test/r/rpl_stm_log.result:
  Result change
mysql-test/r/rpl_stm_max_relay_size.result:
  Result change
mysql-test/r/rpl_stm_multi_query.result:
  Result change
mysql-test/r/rpl_stm_reset_slave.result:
  Result change
mysql-test/r/rpl_stm_until.result:
  Result change
mysql-test/r/rpl_truncate_7ndb.result:
  Result change
mysql-test/r/user_var-binlog.result:
  Result change
mysql-test/t/binlog_stm_mix_innodb_myisam.test:
  Binlog position change
mysql-test/t/ctype_cp932_binlog_stm.test:
  Binlog position change
mysql-test/t/mysqlbinlog.test:
  Binlog position change
mysql-test/t/mysqlbinlog2.test:
  Binlog position change
mysql-test/t/rpl_sp.test:
  Binlog position change
mysql-test/t/rpl_stm_flsh_tbls.test:
  Binlog position change
sql/log_event.cc:
  Emptying the record entirely since it appears MyISAM reads blob column
  data even when they are NULL.
  
  Adding code to set unused bits of the records before doing a comparison,
  and restoring the original values after. Setting the unused bits is necessary
  since NDB does not set them correctly, and resetting them afterwards is needed
  because MyISAM compares the record with the one located when updating
  or deleting it.
mysql-test/r/rpl_row_basic_11bugs-master.opt:
  New BitKeeper file ``mysql-test/r/rpl_row_basic_11bugs-master.opt''
mysql-test/r/rpl_row_basic_11bugs-slave.opt:
  New BitKeeper file ``mysql-test/r/rpl_row_basic_11bugs-slave.opt''
parent c75e3d7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,6 +25,6 @@ select * from mysqltest.t1;
connection master;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 105;
drop database mysqltest;
sync_slave_with_master;
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ drop database mysqltest2;
drop database mysqltest3;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 105;
sync_slave_with_master;

# Check that we can change global.collation_server (since 5.0.3)
+1 −1
Original line number Diff line number Diff line
--let $binlog_start=102
--let $binlog_start=105
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
+10 −10
Original line number Diff line number Diff line
@@ -4,11 +4,11 @@ insert into t1 values (1,2);
commit;
show binlog events;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: #, Binlog ver: #
master-bin.000001	102	Query	1	209	use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001	209	Query	1	277	use `test`; BEGIN
master-bin.000001	277	Query	1	90	use `test`; insert into t1 values (1,2)
master-bin.000001	367	Xid	1	394	COMMIT /* XID */
master-bin.000001	4	Format_desc	1	105	Server ver: #, Binlog ver: #
master-bin.000001	105	Query	1	212	use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001	212	Query	1	280	use `test`; BEGIN
master-bin.000001	280	Query	1	90	use `test`; insert into t1 values (1,2)
master-bin.000001	370	Xid	1	397	COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
@@ -20,7 +20,7 @@ commit;
begin;
insert t2 values (5);
commit;
show binlog events from 102;
show binlog events from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int) engine=innodb
master-bin.000001	#	Query	1	#	use `test`; create table t2 (a int) engine=innodb
@@ -36,7 +36,7 @@ create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (n int) engine=innodb
master-bin.000001	#	Query	1	#	use `test`; BEGIN
@@ -142,7 +142,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(1 + 4)
master-bin.000001	#	Xid	1	#	COMMIT /* xid= */
master-bin.000001	#	Rotate	1	#	master-bin.000002;pos=4
show binlog events in 'master-bin.000002' from 102;
show binlog events in 'master-bin.000002' from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Query	1	#	use `test`; drop table t1
reset master;
@@ -164,7 +164,7 @@ INSERT INTO user SET host='localhost', user='@#@', password=password('Just a tes
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
show binlog events from 102;
show binlog events from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001	#	Intvar	1	#	INSERT_ID=127
@@ -183,7 +183,7 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
show binlog events from 102;
show binlog events from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	1	#	use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001	#	Intvar	1	#	INSERT_ID=127
+3 −3
Original line number Diff line number Diff line
@@ -3,10 +3,10 @@ create table t2 (c char(30)) charset=ucs2;
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
show binlog events from 102;
show binlog events from 105;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	102	User var	1	142	@`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001	142	Query	1	231	use `test`; insert into t2 values (@v)
master-bin.000001	105	User var	1	145	@`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001	145	Query	1	234	use `test`; insert into t2 values (@v)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
Loading