~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_idempotency.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
 
stop slave;
2
 
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3
 
reset master;
4
 
reset slave;
5
 
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6
 
start slave;
7
 
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
8
 
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
9
 
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 
1
include/master-slave.inc
 
2
[connection master]
 
3
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
 
4
call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
 
5
call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 
6
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
10
7
SET @old_slave_exec_mode= @@global.slave_exec_mode;
11
8
CREATE TABLE t1 (a INT PRIMARY KEY);
12
9
CREATE TABLE t2 (a INT);
32
29
a
33
30
-3
34
31
-1
35
 
Last_SQL_Error
36
 
0
37
 
INSERT IGNORE INTO t1 VALUES (-2);
38
 
INSERT IGNORE INTO t1 VALUES (-2);
39
 
SELECT * FROM t1 ORDER BY a;
40
 
a
41
 
-3
42
 
-2
43
 
-1
44
 
SELECT * FROM t1 ORDER BY a;
45
 
a
46
 
-3
47
 
-2
48
 
-1
49
 
Last_SQL_Error
50
 
0
51
 
UPDATE t1 SET a = 1 WHERE a = -1;
52
 
UPDATE t2 SET a = 1 WHERE a = -1;
53
 
UPDATE t1 SET a = 1 WHERE a = -1;
54
 
UPDATE t2 SET a = 1 WHERE a = -1;
55
 
SELECT * FROM t1 ORDER BY a;
56
 
a
57
 
-3
58
 
-2
59
 
1
60
 
SELECT * FROM t2 ORDER BY a;
61
 
a
62
 
-3
63
 
1
64
 
SELECT * FROM t1 ORDER BY a;
65
 
a
66
 
-3
67
 
-2
68
 
1
69
 
SELECT * FROM t2 ORDER BY a;
70
 
a
71
 
-3
72
 
1
73
 
Last_SQL_Error
74
 
0
 
32
include/check_slave_no_error.inc
 
33
INSERT IGNORE INTO t1 VALUES (-2);
 
34
INSERT IGNORE INTO t1 VALUES (-2);
 
35
SELECT * FROM t1 ORDER BY a;
 
36
a
 
37
-3
 
38
-2
 
39
-1
 
40
SELECT * FROM t1 ORDER BY a;
 
41
a
 
42
-3
 
43
-2
 
44
-1
 
45
include/check_slave_no_error.inc
 
46
UPDATE t1 SET a = 1 WHERE a = -1;
 
47
UPDATE t2 SET a = 1 WHERE a = -1;
 
48
UPDATE t1 SET a = 1 WHERE a = -1;
 
49
UPDATE t2 SET a = 1 WHERE a = -1;
 
50
SELECT * FROM t1 ORDER BY a;
 
51
a
 
52
-3
 
53
-2
 
54
1
 
55
SELECT * FROM t2 ORDER BY a;
 
56
a
 
57
-3
 
58
1
 
59
SELECT * FROM t1 ORDER BY a;
 
60
a
 
61
-3
 
62
-2
 
63
1
 
64
SELECT * FROM t2 ORDER BY a;
 
65
a
 
66
-3
 
67
1
 
68
include/check_slave_no_error.inc
75
69
DROP TABLE t1, t2;
76
70
select @@global.slave_exec_mode /* must be IDEMPOTENT */;
77
71
@@global.slave_exec_mode
143
137
2
144
138
3
145
139
*** slave must stop (Trying to delete a referenced foreing key)
146
 
Last_SQL_Error
147
 
1451
 
140
include/wait_for_slave_sql_error.inc [errno=1451]
148
141
select * from ti1 order by b /* must be (1),(2),(3) - not deleted */;
149
142
b
150
143
1
161
154
delete from ti1 where b=3;
162
155
insert into ti2 set a=3, b=3 /* offending write event */;
163
156
*** slave must stop (Trying to insert an invalid foreign key)
164
 
Last_SQL_Error
165
 
1452
 
157
include/wait_for_slave_sql_error.inc [errno=1452]
166
158
select * from ti2 order by b /* must be (2,2) */;
167
159
a       b
168
160
2       2
181
173
insert into ti1 set b=1;
182
174
insert into ti1 set b=1 /* offending write event */;
183
175
*** slave must stop (Trying to insert a dupliacte key)
184
 
Last_SQL_Error
185
 
1062
 
176
include/wait_for_slave_sql_error.inc [errno=1062]
186
177
set foreign_key_checks= 0;
187
178
delete from ti1 where b=1;
188
179
set foreign_key_checks= 1;
197
188
DELETE FROM t2 WHERE a = -2;
198
189
DELETE FROM t1 WHERE a = -2;
199
190
*** slave must stop (Key was not found)
200
 
Last_SQL_Error
201
 
1032
 
191
include/wait_for_slave_sql_error.inc [errno=1032]
202
192
set global slave_exec_mode='IDEMPOTENT';
203
193
start slave sql_thread;
204
194
set global slave_exec_mode='STRICT';
205
195
DELETE FROM t2 WHERE a = -2;
206
196
*** slave must stop (Key was not found)
207
 
Last_SQL_Error
208
 
1032
209
 
set global slave_exec_mode='IDEMPOTENT';
210
 
start slave sql_thread;
211
 
set global slave_exec_mode='STRICT';
212
 
UPDATE t1 SET a = 1 WHERE a = -1;
213
 
UPDATE t2 SET a = 1 WHERE a = -1;
214
 
UPDATE t1 SET a = 1 WHERE a = -1;
215
 
*** slave must stop (Key was not found)
216
 
Last_SQL_Error
217
 
1032
218
 
set global slave_exec_mode='IDEMPOTENT';
219
 
start slave sql_thread;
220
 
set global slave_exec_mode='STRICT';
221
 
UPDATE t2 SET a = 1 WHERE a = -1;
222
 
*** slave must stop (Key was not found)
223
 
Last_SQL_Error
224
 
1032
 
197
include/wait_for_slave_sql_error.inc [errno=1032]
 
198
set global slave_exec_mode='IDEMPOTENT';
 
199
start slave sql_thread;
 
200
set global slave_exec_mode='STRICT';
 
201
UPDATE t1 SET a = 1 WHERE a = -1;
 
202
UPDATE t2 SET a = 1 WHERE a = -1;
 
203
UPDATE t1 SET a = 1 WHERE a = -1;
 
204
*** slave must stop (Key was not found)
 
205
include/wait_for_slave_sql_error.inc [errno=1032]
 
206
set global slave_exec_mode='IDEMPOTENT';
 
207
start slave sql_thread;
 
208
set global slave_exec_mode='STRICT';
 
209
UPDATE t2 SET a = 1 WHERE a = -1;
 
210
*** slave must stop (Key was not found)
 
211
include/wait_for_slave_sql_error.inc [errno=1032]
225
212
set global slave_exec_mode='IDEMPOTENT';
226
213
start slave sql_thread;
227
214
SET @@global.slave_exec_mode= @old_slave_exec_mode;
228
215
set @@session.binlog_format= @save_binlog_format;
229
216
drop table t1,t2,ti2,ti1;
 
217
include/rpl_end.inc
230
218
*** end of tests