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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_stop_slave.test

  • 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:
54
54
 
55
55
--echo # Test end
56
56
SET GLOBAL debug= '$debug_save';
57
 
 
58
 
connection master;
59
 
DROP TABLE t1, t2;
60
 
source include/master-slave-end.inc;
 
57
source include/restart_slave_sql.inc;
 
58
 
 
59
--source include/rpl_connection_master.inc
 
60
DROP TABLE t1, t2;
 
61
 
 
62
--echo
 
63
--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
 
64
--echo # ----------------------------------------------------------------------
 
65
--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
 
66
--echo # possible that IO thread stopped after replicating part of a transaction
 
67
--echo # which SQL thread was executing. SQL thread would be hung if the
 
68
--echo # transaction could not be rolled back safely.
 
69
--echo # It caused some sporadic failures on PB2.
 
70
--echo #
 
71
--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
 
72
--echo # thread will continue to fetch the rest events of the transaction which
 
73
--echo # is being executed by SQL thread and is not able to be rolled back safely.
 
74
 
 
75
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
 
76
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
 
77
INSERT INTO t1 VALUES(1, 1);
 
78
 
 
79
sync_slave_with_master;
 
80
 
 
81
--source include/rpl_connection_master.inc
 
82
 
 
83
let $debug_save= `SELECT @@GLOBAL.debug`;
 
84
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
 
85
 
 
86
--source include/rpl_connection_slave.inc
 
87
source include/restart_slave_sql.inc;
 
88
 
 
89
BEGIN;
 
90
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
 
91
 
 
92
--source include/rpl_connection_master.inc
 
93
BEGIN;
 
94
INSERT INTO t1 VALUES(2, 2);
 
95
INSERT INTO t2 VALUES(1);
 
96
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
 
97
COMMIT;
 
98
 
 
99
--source include/rpl_connection_slave1.inc
 
100
let $show_statement= SHOW PROCESSLIST;
 
101
let $field= Info;
 
102
let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
 
103
source include/wait_show_condition.inc;
 
104
 
 
105
send STOP SLAVE;
 
106
 
 
107
--source include/rpl_connection_slave.inc
 
108
ROLLBACK;
 
109
 
 
110
--source include/rpl_connection_master.inc
 
111
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
 
112
SET DEBUG_SYNC= 'RESET';
 
113
 
 
114
--source include/rpl_connection_slave.inc
 
115
source include/wait_for_slave_to_stop.inc;
 
116
 
 
117
--source include/rpl_connection_slave1.inc
 
118
reap;
 
119
source include/start_slave.inc;
 
120
 
 
121
--source include/rpl_connection_master.inc
 
122
DROP TABLE t1, t2;
 
123
SET GLOBAL debug= $debug_save;
 
124
--source include/rpl_end.inc