Skip to content

Commit 5edf55b

Browse files
sjaakolaNirbhay Choubey
authored andcommitted
Refs: MW-248
- fixed the test case and extended with autoinc modification is master side
1 parent df96eb5 commit 5edf55b

File tree

2 files changed

+43
-15
lines changed

2 files changed

+43
-15
lines changed

mysql-test/suite/galera/r/galera_as_slave_autoinc.result

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,67 @@ i c
1818
2 dummy_text
1919
3 dummy_text
2020
4 dummy_text
21+
SET SESSION auto_increment_increment=7;
22+
insert into t1(i) values(null), (null), (null);
23+
SET SESSION auto_increment_offset=5;
24+
insert into t1(i) values(null), (null), (null);
25+
select * from t1;
26+
i c
27+
1 dummy_text
28+
2 dummy_text
29+
3 dummy_text
30+
4 dummy_text
31+
8 dummy_text
32+
15 dummy_text
33+
22 dummy_text
34+
33 dummy_text
35+
40 dummy_text
36+
47 dummy_text
2137
show variables like 'binlog_format';
2238
Variable_name Value
2339
binlog_format STATEMENT
2440
show variables like '%auto_increment%';
2541
Variable_name Value
26-
auto_increment_increment 1
27-
auto_increment_offset 1
42+
auto_increment_increment 7
43+
auto_increment_offset 5
2844
wsrep_auto_increment_control ON
2945
select * from t1;
3046
i c
3147
1 dummy_text
3248
2 dummy_text
3349
3 dummy_text
3450
4 dummy_text
51+
8 dummy_text
52+
15 dummy_text
53+
22 dummy_text
54+
33 dummy_text
55+
40 dummy_text
56+
47 dummy_text
3557
show variables like 'binlog_format';
3658
Variable_name Value
3759
binlog_format ROW
38-
show variables like '%auto_increment%';
60+
show variables like 'auto_increment_increment';
3961
Variable_name Value
4062
auto_increment_increment 2
41-
auto_increment_offset 1
42-
wsrep_auto_increment_control ON
4363
select * from t1;
4464
i c
4565
1 dummy_text
4666
2 dummy_text
4767
3 dummy_text
4868
4 dummy_text
69+
8 dummy_text
70+
15 dummy_text
71+
22 dummy_text
72+
33 dummy_text
73+
40 dummy_text
74+
47 dummy_text
4975
show variables like 'binlog_format';
5076
Variable_name Value
5177
binlog_format ROW
52-
show variables like '%auto_increment%';
78+
show variables like 'auto_increment_increment';
5379
Variable_name Value
5480
auto_increment_increment 2
55-
auto_increment_offset 2
56-
wsrep_auto_increment_control ON
5781
DROP TABLE t1;
5882
STOP SLAVE;
5983
RESET SLAVE ALL;
60-
SET GLOBAL binlog_format='ROW';
6184
RESET MASTER;

mysql-test/suite/galera/t/galera_as_slave_autoinc.test

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,35 @@ insert into t1(i) values(null), (null), (null);
4040

4141
select * from t1;
4242

43+
SET SESSION auto_increment_increment=7;
44+
insert into t1(i) values(null), (null), (null);
45+
46+
SET SESSION auto_increment_offset=5;
47+
insert into t1(i) values(null), (null), (null);
48+
49+
select * from t1;
50+
4351
show variables like 'binlog_format';
4452
show variables like '%auto_increment%';
4553

4654
--connection node_2
4755
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
4856
--source include/wait_condition.inc
4957

50-
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
58+
--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
5159
--source include/wait_condition.inc
5260

5361
select * from t1;
5462

5563
show variables like 'binlog_format';
56-
show variables like '%auto_increment%';
64+
show variables like 'auto_increment_increment';
5765

5866
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
5967

6068
select * from t1;
6169

6270
show variables like 'binlog_format';
63-
show variables like '%auto_increment%';
71+
show variables like 'auto_increment_increment';
6472

6573
--connection node_1
6674
DROP TABLE t1;
@@ -73,7 +81,4 @@ STOP SLAVE;
7381
RESET SLAVE ALL;
7482

7583
--connection node_1
76-
77-
SET GLOBAL binlog_format='ROW';
78-
7984
RESET MASTER;

0 commit comments

Comments
 (0)