~ubuntu-branches/debian/squeeze/mysql-5.1/squeeze

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2014-01-14 10:40:30 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140114104030-44alii0hx3x3g41y
Tags: 5.1.73-1
* New upstream release
  http://dev.mysql.com/doc/relnotes/mysql/5.1/en/news-5-1-73.html
* Update patches
* Disable flaky test rpl.rpl_innodb_bug28430 breaking the build. It's  marked
  as experimental by upstream and the internet is full of reports about it's
  unrelialibity

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include/master-slave.inc
 
2
[connection master]
 
3
 
 
4
# BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends
 
5
#
 
6
# If a temporary table is created or dropped, the transaction should be
 
7
# regarded similarly that a non-transactional table is modified. So 
 
8
# STOP SLAVE should wait until the transaction has finished.
 
9
CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
 
10
CREATE TABLE t2(c1 INT) ENGINE=InnoDB;
 
11
SET DEBUG_SYNC= 'RESET';
 
12
include/stop_slave.inc
 
13
 
 
14
# Suspend the INSERT statement in current transaction on SQL thread.
 
15
# It guarantees that SQL thread is applying the transaction when
 
16
# STOP SLAVE command launchs.
 
17
SET GLOBAL debug= 'd,after_mysql_insert';
 
18
include/start_slave.inc
 
19
 
 
20
# CREATE TEMPORARY TABLE with InnoDB engine
 
21
# -----------------------------------------
 
22
 
 
23
[ On Master ]
 
24
BEGIN;
 
25
DELETE FROM t1;
 
26
CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB;
 
27
INSERT INTO t1 VALUES (1);
 
28
DROP TEMPORARY TABLE tt1;
 
29
COMMIT;
 
30
 
 
31
[ On Slave ]
 
32
STOP SLAVE SQL_THREAD;
 
33
 
 
34
[ On Slave1 ]
 
35
# To resume slave SQL thread
 
36
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
37
SET DEBUG_SYNC= 'RESET';
 
38
 
 
39
[ On Slave ]
 
40
include/wait_for_slave_sql_to_stop.inc
 
41
# Slave should stop after the transaction has committed.
 
42
# So t1 on master is same to t1 on slave.
 
43
include/diff_tables.inc [master:t1, slave:t1]
 
44
START SLAVE SQL_THREAD;
 
45
include/wait_for_slave_sql_to_start.inc
 
46
 
 
47
# CREATE TEMPORARY TABLE with MyISAM engine
 
48
# -----------------------------------------
 
49
 
 
50
[ On Master ]
 
51
BEGIN;
 
52
DELETE FROM t1;
 
53
CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = MyISAM;
 
54
INSERT INTO t1 VALUES (1);
 
55
DROP TEMPORARY TABLE tt1;
 
56
COMMIT;
 
57
 
 
58
[ On Slave ]
 
59
STOP SLAVE SQL_THREAD;
 
60
 
 
61
[ On Slave1 ]
 
62
# To resume slave SQL thread
 
63
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
64
SET DEBUG_SYNC= 'RESET';
 
65
 
 
66
[ On Slave ]
 
67
include/wait_for_slave_sql_to_stop.inc
 
68
# Slave should stop after the transaction has committed.
 
69
# So t1 on master is same to t1 on slave.
 
70
include/diff_tables.inc [master:t1, slave:t1]
 
71
START SLAVE SQL_THREAD;
 
72
include/wait_for_slave_sql_to_start.inc
 
73
 
 
74
# CREATE TEMPORARY TABLE ... SELECT with InnoDB engine
 
75
# ----------------------------------------------------
 
76
 
 
77
[ On Master ]
 
78
BEGIN;
 
79
DELETE FROM t1;
 
80
CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB
 
81
SELECT c1 FROM t2;
 
82
INSERT INTO t1 VALUES (1);
 
83
DROP TEMPORARY TABLE tt1;
 
84
COMMIT;
 
85
 
 
86
[ On Slave ]
 
87
STOP SLAVE SQL_THREAD;
 
88
 
 
89
[ On Slave1 ]
 
90
# To resume slave SQL thread
 
91
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
92
SET DEBUG_SYNC= 'RESET';
 
93
 
 
94
[ On Slave ]
 
95
include/wait_for_slave_sql_to_stop.inc
 
96
# Slave should stop after the transaction has committed.
 
97
# So t1 on master is same to t1 on slave.
 
98
include/diff_tables.inc [master:t1, slave:t1]
 
99
START SLAVE SQL_THREAD;
 
100
include/wait_for_slave_sql_to_start.inc
 
101
 
 
102
# CREATE TEMPORARY TABLE ... SELECT with MyISAM engine
 
103
# ----------------------------------------------------
 
104
 
 
105
[ On Master ]
 
106
BEGIN;
 
107
DELETE FROM t1;
 
108
CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = MyISAM
 
109
SELECT 1 AS c1;
 
110
INSERT INTO t1 VALUES (1);
 
111
DROP TEMPORARY TABLE tt1;
 
112
COMMIT;
 
113
 
 
114
[ On Slave ]
 
115
STOP SLAVE SQL_THREAD;
 
116
 
 
117
[ On Slave1 ]
 
118
# To resume slave SQL thread
 
119
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
120
SET DEBUG_SYNC= 'RESET';
 
121
 
 
122
[ On Slave ]
 
123
include/wait_for_slave_sql_to_stop.inc
 
124
# Slave should stop after the transaction has committed.
 
125
# So t1 on master is same to t1 on slave.
 
126
include/diff_tables.inc [master:t1, slave:t1]
 
127
START SLAVE SQL_THREAD;
 
128
include/wait_for_slave_sql_to_start.inc
 
129
# Test end
 
130
SET GLOBAL debug= '$debug_save';
 
131
include/restart_slave.inc
 
132
[connection master]
 
133
DROP TABLE t1, t2;
 
134
 
 
135
# Bug#58546 test rpl_packet timeout failure sporadically on PB
 
136
# ----------------------------------------------------------------------
 
137
# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
 
138
# possible that IO thread stopped after replicating part of a transaction
 
139
# which SQL thread was executing. SQL thread would be hung if the
 
140
# transaction could not be rolled back safely.
 
141
# It caused some sporadic failures on PB2.
 
142
#
 
143
# This test verifies that when 'STOP SLAVE' is issued by a user, IO
 
144
# thread will continue to fetch the rest events of the transaction which
 
145
# is being executed by SQL thread and is not able to be rolled back safely.
 
146
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
 
147
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
 
148
INSERT INTO t1 VALUES(1, 1);
 
149
[connection master]
 
150
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
 
151
[connection slave]
 
152
include/restart_slave.inc
 
153
BEGIN;
 
154
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
 
155
[connection master]
 
156
BEGIN;
 
157
INSERT INTO t1 VALUES(2, 2);
 
158
INSERT INTO t2 VALUES(1);
 
159
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
 
160
COMMIT;
 
161
[connection slave1]
 
162
STOP SLAVE;
 
163
[connection slave]
 
164
ROLLBACK;
 
165
[connection master]
 
166
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
167
SET DEBUG_SYNC= 'RESET';
 
168
[connection slave]
 
169
include/wait_for_slave_to_stop.inc
 
170
[connection slave1]
 
171
include/start_slave.inc
 
172
[connection master]
 
173
DROP TABLE t1, t2;
 
174
SET GLOBAL debug= $debug_save;
 
175
include/rpl_end.inc