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