Bug#19259 rpl_ndb_dd_partitions failed on Solaris

Actually, this testcase will fail generally on all testing platforms.
The bugs come from the inconsistent bitmap between rpl master and slave.

In log_event.cc, the n_bits of m_cols and m_cols_ai are intialized with octal-ceiling 
m_width, in fact, their n_bits should be equal to m_width.
Wrong n_bits will cause bitmap_bits_set() get incorrect value in unpack_row()
in rpl_record.cc, 
then an assertion in unpack_row() will fail and crash sql thread.
  DBUG_ASSERT(null_ptr == row_data + master_null_byte_count);

Meanwhile, because of binlog_prepare_pending_rows_event() changed with correct
m_cols, some results of specific testcases should be updated:
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

In addition, to ensure rows replication correct between master and slave after the patch, 
two 'select * from t1' are added in extra/rpl_tests/rpl_log.test, and some testcases include 
rpl_log.test, therefore, the results of these testcases should be updated likewise:
rpl_stm_log.test
rpl_row_log.test
rpl_ndb_log.test
rpl_row_log_innodb.test

Totally, results of nine testcases are updated.
parent 52fd5447
......@@ -41,6 +41,7 @@ typedef struct st_bitmap
#ifdef __cplusplus
extern "C" {
#endif
extern void create_last_word_mask(MY_BITMAP *map);
extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
my_bool thread_safe);
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
......
......@@ -70,6 +70,10 @@ eval create table t3 (a int)ENGINE=$engine_type;
# Sync slave and force it to start on another binary log
#show rows of t1 on master
connection master;
select * from t1 order by 1 asc;
save_master_pos;
connection slave;
# Note that the above 'slave start' will cause a 3rd rotate event (a fake one)
......@@ -79,6 +83,8 @@ start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%';
--source include/wait_slave_status.inc
sync_with_master;
#check t1 on slave to ensure whether it's identical with on master
select * from t1 order by 1 asc;
flush logs;
stop slave;
connection master;
......
......@@ -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
......@@ -81,7 +80,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
RESET MASTER;
......
......@@ -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
......@@ -74,7 +71,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
master-bin1.000001 # Query 102 # use `test`; drop table t1
......
This diff is collapsed.
......@@ -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;
......@@ -47,11 +46,153 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
flush logs;
create table t3 (a int)ENGINE=NDB;
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
flush logs;
stop slave;
create table t2 (n int)ENGINE=NDB;
......@@ -71,7 +212,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 +228,12 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
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 +251,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
......
......@@ -38,11 +38,153 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
flush logs;
create table t3 (a int)ENGINE=MyISAM;
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
flush logs;
stop slave;
create table t2 (n int)ENGINE=MyISAM;
......
......@@ -40,11 +40,153 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
flush logs;
create table t3 (a int)ENGINE=InnoDB;
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
flush logs;
stop slave;
create table t2 (n int)ENGINE=InnoDB;
......
......@@ -38,11 +38,153 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
flush logs;
create table t3 (a int)ENGINE=MyISAM;
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
abasement
abasements
abases
abash
abashed
abashes
abashing
abasing
abate
abated
abatement
abatements
abater
abates
abating
Abba
abbe
abbey
abbeys
abbot
abbots
Abbott
abbreviate
abbreviated
abbreviates
abbreviating
abbreviation
abbreviations
Abby
abdomen
abdomens
abdominal
abduct
abducted
abduction
abductions
abductor
abductors
abducts
Abe
abed
Abel
Abelian
Abelson
Aberdeen
Abernathy
aberrant
aberration
flush logs;
stop slave;
create table t2 (n int)ENGINE=MyISAM;
......
......@@ -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
......@@ -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
......@@ -28,7 +28,6 @@ partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when up
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
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
......
......@@ -5653,12 +5653,15 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
/* 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 */
if (likely(cols != NULL))
{
memcpy(m_cols.bitmap, cols->bitmap, no_bytes_in_map(cols));
create_last_word_mask(&m_cols);
}
}
else
{
......@@ -5711,11 +5714,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
/* 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));
memcpy(m_cols.bitmap, ptr_after_width, (m_width + 7) / 8);
create_last_word_mask(&m_cols);
ptr_after_width+= (m_width + 7) / 8;
DBUG_DUMP("m_cols", (uchar*) m_cols.bitmap, no_bytes_in_map(&m_cols));
}
......@@ -5735,11 +5739,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
/* 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));
memcpy(m_cols_ai.bitmap, ptr_after_width, (m_width + 7) / 8);
create_last_word_mask(&m_cols_ai);
ptr_after_width+= (m_width + 7) / 8;
DBUG_DUMP("m_cols_ai", (uchar*) m_cols_ai.bitmap,
no_bytes_in_map(&m_cols_ai));
......@@ -7685,12 +7690,15 @@ void Update_rows_log_event::init(MY_BITMAP const *cols)
/* 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 */
if (likely(cols != NULL))
{
memcpy(m_cols_ai.bitmap, cols->bitmap, no_bytes_in_map(cols));
create_last_word_mask(&m_cols_ai);
}
}
}
#endif /* !defined(MYSQL_CLIENT) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment