mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
54 lines
2.1 KiB
Plaintext
54 lines
2.1 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
## coverage purposes - Field_bits
|
|
## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
|
|
include/rpl_reset.inc
|
|
connection master;
|
|
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
INSERT INTO t1(c1,c2) VALUES (10, b'1');
|
|
INSERT INTO t1(c1,c2) VALUES (NULL, b'1');
|
|
UPDATE t1 SET c1= 0;
|
|
connection slave;
|
|
include/diff_tables.inc [master:t1, slave:t1]
|
|
connection master;
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
## case #1 - last_null_bit_pos==0 in record_compare without X bit
|
|
include/rpl_reset.inc
|
|
connection master;
|
|
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;
|
|
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
|
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
|
UPDATE IGNORE t1 SET c5 = 'a';
|
|
connection slave;
|
|
include/diff_tables.inc [master:t1, slave:t1]
|
|
connection master;
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
|
|
## (1 column less and no varchar)
|
|
include/rpl_reset.inc
|
|
connection master;
|
|
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;
|
|
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
|
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
|
UPDATE IGNORE t1 SET c5 = 'a';
|
|
connection slave;
|
|
include/diff_tables.inc [master:t1, slave:t1]
|
|
connection master;
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
## case #2 - X bit is wrongly set.
|
|
include/rpl_reset.inc
|
|
connection master;
|
|
CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1;
|
|
INSERT INTO t1(c1) VALUES (10);
|
|
INSERT INTO t1(c1) VALUES (NULL);
|
|
UPDATE t1 SET c1= 0;
|
|
connection slave;
|
|
include/diff_tables.inc [master:t1, slave:t1]
|
|
connection master;
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
include/rpl_end.inc
|