2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
## case #1 - last_null_bit_pos==0 in record_compare without X bit
9
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
12
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
14
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
15
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
16
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
17
UPDATE t1 SET c5 = 'a';
18
Comparing tables master:test.t1 and slave:test.t1
20
## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
21
## (1 column less and no varchar)
23
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
26
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
28
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
29
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
30
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
31
UPDATE t1 SET c5 = 'a';
32
Comparing tables master:test.t1 and slave:test.t1
34
## case #2 - X bit is wrongly set.
36
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
39
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
41
CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1;
42
INSERT INTO t1(c1) VALUES (10);
43
INSERT INTO t1(c1) VALUES (NULL);
45
Comparing tables master:test.t1 and slave:test.t1
47
## coverage purposes - Field_bits
48
## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
50
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
53
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
55
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
56
INSERT INTO t1(c1,c2) VALUES (10, b'1');
57
INSERT INTO t1(c1,c2) VALUES (NULL, b'1');
59
Comparing tables master:test.t1 and slave:test.t1