| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; |
| 4 |
connection node_2; |
| 5 |
START SLAVE; |
| 6 |
connection node_3; |
| 7 |
SET SESSION binlog_format='STATEMENT'; |
| 8 |
CREATE TABLE t1 ( |
| 9 |
i int(11) NOT NULL AUTO_INCREMENT, |
| 10 |
c char(32) DEFAULT 'dummy_text', |
| 11 |
PRIMARY KEY (i) |
| 12 |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 13 |
insert into t1(i) values(null); |
| 14 |
Warnings: |
| 15 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 16 |
select * from t1; |
| 17 |
i c |
| 18 |
1 dummy_text |
| 19 |
insert into t1(i) values(null), (null), (null); |
| 20 |
Warnings: |
| 21 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 22 |
select * from t1; |
| 23 |
i c |
| 24 |
1 dummy_text |
| 25 |
2 dummy_text |
| 26 |
3 dummy_text |
| 27 |
4 dummy_text |
| 28 |
SET SESSION auto_increment_increment=7; |
| 29 |
insert into t1(i) values(null), (null), (null); |
| 30 |
Warnings: |
| 31 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 32 |
SET SESSION auto_increment_offset=5; |
| 33 |
insert into t1(i) values(null), (null), (null); |
| 34 |
Warnings: |
| 35 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 36 |
select * from t1; |
| 37 |
i c |
| 38 |
1 dummy_text |
| 39 |
2 dummy_text |
| 40 |
3 dummy_text |
| 41 |
4 dummy_text |
| 42 |
8 dummy_text |
| 43 |
15 dummy_text |
| 44 |
22 dummy_text |
| 45 |
33 dummy_text |
| 46 |
40 dummy_text |
| 47 |
47 dummy_text |
| 48 |
show variables like 'binlog_format'; |
| 49 |
Variable_name Value |
| 50 |
binlog_format STATEMENT |
| 51 |
show variables like 'auto_increment_increment'; |
| 52 |
Variable_name Value |
| 53 |
auto_increment_increment 7 |
| 54 |
connection node_2; |
| 55 |
select * from t1; |
| 56 |
i c |
| 57 |
1 dummy_text |
| 58 |
2 dummy_text |
| 59 |
3 dummy_text |
| 60 |
4 dummy_text |
| 61 |
8 dummy_text |
| 62 |
15 dummy_text |
| 63 |
22 dummy_text |
| 64 |
33 dummy_text |
| 65 |
40 dummy_text |
| 66 |
47 dummy_text |
| 67 |
show variables like 'binlog_format'; |
| 68 |
Variable_name Value |
| 69 |
binlog_format ROW |
| 70 |
show variables like 'auto_increment_increment'; |
| 71 |
Variable_name Value |
| 72 |
auto_increment_increment 2 |
| 73 |
connection node_1; |
| 74 |
select * from t1; |
| 75 |
i c |
| 76 |
1 dummy_text |
| 77 |
2 dummy_text |
| 78 |
3 dummy_text |
| 79 |
4 dummy_text |
| 80 |
8 dummy_text |
| 81 |
15 dummy_text |
| 82 |
22 dummy_text |
| 83 |
33 dummy_text |
| 84 |
40 dummy_text |
| 85 |
47 dummy_text |
| 86 |
show variables like 'binlog_format'; |
| 87 |
Variable_name Value |
| 88 |
binlog_format ROW |
| 89 |
show variables like 'auto_increment_increment'; |
| 90 |
Variable_name Value |
| 91 |
auto_increment_increment 2 |
| 92 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format"); |
| 93 |
connection node_3; |
| 94 |
DROP TABLE t1; |
| 95 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format"); |
| 96 |
connection node_2; |
| 97 |
STOP SLAVE; |
| 98 |
RESET SLAVE ALL; |
| 99 |
connection node_3; |
| 100 |
RESET MASTER; |