~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*** Set up circular ring by schema A->B->C->D->A *** 
2
 
stop slave;
3
 
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
4
 
reset master;
5
 
reset slave;
6
 
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
 
start slave;
8
 
STOP SLAVE;
9
 
RESET SLAVE;
10
 
RESET MASTER;
11
 
STOP SLAVE;
12
 
RESET SLAVE;
13
 
SET auto_increment_increment = 4;
14
 
SET auto_increment_offset = 1;
15
 
RESET MASTER;
16
 
RESET SLAVE;
17
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE';
18
 
SET auto_increment_increment = 4;
19
 
SET auto_increment_offset = 2;
20
 
RESET MASTER;
21
 
STOP SLAVE;
22
 
RESET SLAVE;
23
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE';
24
 
SET auto_increment_increment = 4;
25
 
SET auto_increment_offset = 3;
26
 
RESET MASTER;
27
 
STOP SLAVE;
28
 
RESET SLAVE;
29
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE';
30
 
SET auto_increment_increment = 4;
31
 
SET auto_increment_offset = 4;
32
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE';
33
 
SHOW VARIABLES LIKE 'auto_increment_%';
34
 
Variable_name   Value
35
 
auto_increment_increment        4
36
 
auto_increment_offset   1
37
 
SHOW VARIABLES LIKE 'auto_increment_%';
38
 
Variable_name   Value
39
 
auto_increment_increment        4
40
 
auto_increment_offset   2
41
 
SHOW VARIABLES LIKE 'auto_increment_%';
42
 
Variable_name   Value
43
 
auto_increment_increment        4
44
 
auto_increment_offset   3
45
 
SHOW VARIABLES LIKE 'auto_increment_%';
46
 
Variable_name   Value
47
 
auto_increment_increment        4
48
 
auto_increment_offset   4
49
 
1
50
 
START SLAVE;
51
 
START SLAVE;
52
 
START SLAVE;
53
 
START SLAVE;
 
1
*** Set up circular replication on four servers *** 
 
2
include/rpl_init.inc [topology=1->2->3->4->1]
54
3
 
55
4
*** Preparing data ***
56
5
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
57
6
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
 
7
include/rpl_sync.inc
58
8
 
59
9
*** Testing schema A->B->C->D->A ***
60
10
 
62
12
INSERT INTO t1(b,c) VALUES('B',1);
63
13
INSERT INTO t1(b,c) VALUES('C',1);
64
14
INSERT INTO t1(b,c) VALUES('D',1);
 
15
include/rpl_sync.inc
65
16
SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
66
17
Master A        a       b
67
18
Master A        1       A
95
46
include/start_slave.inc
96
47
INSERT INTO t1 VALUES(6,'C',2);
97
48
INSERT INTO t1(b,c) VALUES('B',2);
 
49
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
 
50
include/wait_for_slave_sql_error.inc [errno=1062]
98
51
INSERT INTO t1(b,c) VALUES('A',2);
99
52
INSERT INTO t1(b,c) VALUES('D',2);
100
53
 
116
69
Master D        8       D
117
70
 
118
71
* Reconfigure replication to schema A->B->D->A *
119
 
STOP SLAVE;
120
 
STOP SLAVE;
121
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
 
72
include/stop_slave_io.inc
 
73
include/stop_slave.inc
 
74
include/rpl_change_topology.inc [new topology=1->2->4->1,2->3]
122
75
include/start_slave.inc
123
76
 
124
77
* Check data inserted before failure *
145
98
INSERT INTO t1(b,c) VALUES('A',3);
146
99
INSERT INTO t1(b,c) VALUES('B',3);
147
100
INSERT INTO t1(b,c) VALUES('D',3);
 
101
include/rpl_sync.inc
148
102
SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
149
103
Master A        a       b
150
104
Master A        9       A
168
122
* Remove wrong event from C and restore B->C->D *
169
123
include/stop_slave.inc
170
124
DELETE FROM t1 WHERE a = 6;
171
 
START SLAVE;
 
125
include/start_slave.inc
172
126
RESET MASTER;
173
127
RESET SLAVE;
174
 
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
175
 
START SLAVE;
 
128
include/rpl_change_topology.inc [new topology=1->2->3->4->1]
 
129
include/start_slave.inc
 
130
include/rpl_sync.inc
176
131
 
177
132
* Check data inserted before restoring schema A->B->C->D->A *
178
133
SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
213
168
INSERT INTO t1(b,c) VALUES('B',4);
214
169
INSERT INTO t1(b,c) VALUES('C',4);
215
170
INSERT INTO t1(b,c) VALUES('D',4);
 
171
include/rpl_sync.inc
216
172
SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
217
173
Master A        a       b
218
174
Master A        13      A
241
197
* Transactions with commits *
242
198
BEGIN;
243
199
BEGIN;
 
200
include/rpl_sync.inc
244
201
SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
245
202
Master A        b       COUNT(*)
246
203
Master A        A       100
269
226
* Transactions with rollbacks *
270
227
BEGIN;
271
228
BEGIN;
 
229
include/rpl_sync.inc
272
230
SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
273
231
Master A        b       COUNT(*)
274
232
Master A        B       100
288
246
 
289
247
*** Clean up ***
290
248
DROP TABLE t1,t2;
291
 
STOP SLAVE;
292
 
RESET SLAVE;
293
 
STOP SLAVE;
294
 
RESET SLAVE;
295
 
STOP SLAVE;
296
 
RESET SLAVE;
297
 
STOP SLAVE;
298
 
RESET SLAVE;
 
249
include/rpl_end.inc