diff options
author | Luis Soares <luis.soares@sun.com> | 2010-01-14 14:26:51 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2010-01-14 14:26:51 +0000 |
commit | 32aa612819ff756b284e639de50627b3d6d7fa0d (patch) | |
tree | 25296daae2e9e3ca0934be7ae31ad6714485dc93 /mysql-test/suite/rpl/r | |
parent | 5ae7b3c99634609b2890253590ccf82c5fb4f085 (diff) | |
download | mariadb-git-32aa612819ff756b284e639de50627b3d6d7fa0d.tar.gz |
Fix for BUG#49481 and BUG#49482.
BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete:
cant find record
BUG#49482: RBR: Replication may break on deletes when MyISAM tables +
char field are used
When using MyISAM tables, despite the fact that the null bit is
set for some fields, their old value is still in the row. This
can cause the comparison of records to fail when the slave is
doing an index or range scan.
We fix this by avoiding memcmp for MyISAM tables when comparing
records. Additionally, when comparing field by field, we first
check if both fields are not null and if so, then we compare
them. If just one field is null we return failure immediately. If
both fields are null, we move on to the next field.
Diffstat (limited to 'mysql-test/suite/rpl/r')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_myisam_null_values.result | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_myisam_null_values.result b/mysql-test/suite/rpl/r/rpl_myisam_null_values.result new file mode 100644 index 00000000000..574528a8d79 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_myisam_null_values.result @@ -0,0 +1,24 @@ +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; +CREATE TABLE t1 (c1 BIT, c2 INT); +INSERT INTO `t1` VALUES ( 1, 1 ); +UPDATE t1 SET c1=NULL where c2=1; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 WHERE c2=1 LIMIT 1; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +CREATE TABLE t1 (c1 CHAR); +INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; +SELECT * FROM t1; +c1 +w +# should trigger switch to row due to LIMIT +UPDATE t1 SET c1=NULL WHERE c1='w' LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DELETE FROM t1 LIMIT 2; +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; |