diff options
author | unknown <Justin.He/justin.he@dev3-240.dev.cn.tlan> | 2007-07-12 15:19:29 +0800 |
---|---|---|
committer | unknown <Justin.He/justin.he@dev3-240.dev.cn.tlan> | 2007-07-12 15:19:29 +0800 |
commit | b9c18aead4c151a555325462c20121d8c8a654a3 (patch) | |
tree | 46a43974289f674370a9d2b8c3a21e06819190b6 /include/my_bitmap.h | |
parent | e21310b1ef9e13a57d44b5dd1b2a13437ce33d0e (diff) | |
download | mariadb-git-b9c18aead4c151a555325462c20121d8c8a654a3.tar.gz |
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.
include/my_bitmap.h:
add declaration for create_last_word_mask(), since we need to use it in log_event.cc
mysql-test/extra/rpl_tests/rpl_log.test:
add 'select * from t1' both on master and slave to ensure the replication consistent after patched
mysql-test/r/binlog_multi_engine.result:
update result
the following is commented by Andrei,
The differences can be explained.
Look at
lines of THD::binlog_prepare_pending_rows_event
if (!pending)
...
!bitmap_cmp(pending->get_cols(), cols))
The row event disappears because after correcting master side Write_rows_log_event's m_col bitmap initialization,
this event has the same m_cols as the preceding one and thereafter they got glued into one bigger size event.
This is the correct behaviour now.
mysql-test/r/ndb_binlog_multi.result:
update result
same reason with binlog_multi_engine for Write_rows_log_event
mysql-test/r/rpl_ndb_dd_partitions.result:
update result,
reasons:
1. tablespace description format changed
2. hex(b1) from 1 to 0 because there is a update sentence in include/rpl_multi_engine3.inc
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
mysql-test/r/rpl_ndb_log.result:
update result
Write_rows event disapper for same reason with binlog_multi_engine ;
In addition, because add new select in extra/rpl_testsrpl_log.test,
corresponding new results are accompanying.
mysql-test/r/rpl_row_log.result:
because add new select in extra/rpl_testsrpl_log.test,
corresponding new results are accompanying.
mysql-test/r/rpl_row_log_innodb.result:
because add new select in extra/rpl_testsrpl_log.test,
corresponding new results are accompanying.
mysql-test/r/rpl_stm_log.result:
because add new select in extra/rpl_testsrpl_log.test,
corresponding new results are accompanying.
mysql-test/r/rpl_truncate_7ndb.result:
update result
same reason with binlog_multi_engine for Write_rows_log_event
mysql-test/r/rpl_truncate_7ndb_2.result:
update result
same reason with binlog_multi_engine for Write_rows_log_event
And for 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
It's okay as FormatDescription event matured for 4 bytes since the last time the results had been recorded.
mysql-test/t/disabled.def:
resume this test case
sql/log_event.cc:
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);
after memcpy(), call create_last_word_mask() to clear extra bits in bitmap to ensure safety
mysql-test/t/rpl_ndb_dd_partitions-master.opt:
add --new=true passed to mysqld
mysql-test/t/rpl_ndb_dd_partitions-slave.opt:
add --new=true passed to mysqld
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r-- | include/my_bitmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 488c41ffb22..b2a24f98149 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -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); |