~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

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
*** Prepare tables and data ***
 
8
CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb;
 
9
CREATE TABLE t2 (a INT) ENGINE=innodb;
 
10
CREATE TABLE t3 (a INT NOT NULL, KEY(a)) ENGINE=innodb;
 
11
SHOW CREATE TABLE t1;
 
12
Table   Create Table
 
13
t1      CREATE TABLE `t1` (
 
14
  `a` int(11) NOT NULL,
 
15
  KEY `a` (`a`)
 
16
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
17
SHOW CREATE TABLE t2;
 
18
Table   Create Table
 
19
t2      CREATE TABLE `t2` (
 
20
  `a` int(11) DEFAULT NULL
 
21
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
22
SHOW CREATE TABLE t3;
 
23
Table   Create Table
 
24
t3      CREATE TABLE `t3` (
 
25
  `a` int(11) NOT NULL,
 
26
  KEY `a` (`a`)
 
27
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
28
SHOW VARIABLES LIKE 'slave_transaction_retries';
 
29
Variable_name   Value
 
30
slave_transaction_retries       2
 
31
include/stop_slave.inc
 
32
BEGIN;
 
33
INSERT INTO t1 VALUES (1);
 
34
INSERT INTO t2 VALUES (2), (2), (2), (2), (2), (2), (2), (2), (2), (2);
 
35
INSERT INTO t3 VALUES (3);
 
36
COMMIT;
 
37
 
 
38
*** Test deadlock ***
 
39
BEGIN;
 
40
SELECT * FROM t1 FOR UPDATE;
 
41
a
 
42
START SLAVE;
 
43
SELECT COUNT(*) FROM t2;
 
44
COUNT(*)
 
45
0
 
46
COMMIT;
 
47
SELECT * FROM t1;
 
48
a
 
49
1
 
50
SELECT * FROM t3;
 
51
a
 
52
3
 
53
SHOW SLAVE STATUS;
 
54
Slave_IO_State  #
 
55
Master_Host     127.0.0.1
 
56
Master_User     root
 
57
Master_Port     MASTER_PORT
 
58
Connect_Retry   1
 
59
Master_Log_File master-bin.000001
 
60
Read_Master_Log_Pos     #
 
61
Relay_Log_File  #
 
62
Relay_Log_Pos   #
 
63
Relay_Master_Log_File   master-bin.000001
 
64
Slave_IO_Running        Yes
 
65
Slave_SQL_Running       Yes
 
66
Replicate_Do_DB 
 
67
Replicate_Ignore_DB     
 
68
Replicate_Do_Table      
 
69
Replicate_Ignore_Table  #
 
70
Replicate_Wild_Do_Table 
 
71
Replicate_Wild_Ignore_Table     
 
72
Last_Errno      0
 
73
Last_Error      
 
74
Skip_Counter    0
 
75
Exec_Master_Log_Pos     #
 
76
Relay_Log_Space #
 
77
Until_Condition None
 
78
Until_Log_File  
 
79
Until_Log_Pos   0
 
80
Master_SSL_Allowed      No
 
81
Master_SSL_CA_File      
 
82
Master_SSL_CA_Path      
 
83
Master_SSL_Cert 
 
84
Master_SSL_Cipher       
 
85
Master_SSL_Key  
 
86
Seconds_Behind_Master   #
 
87
Master_SSL_Verify_Server_Cert   No
 
88
Last_IO_Errno   #
 
89
Last_IO_Error   #
 
90
Last_SQL_Errno  0
 
91
Last_SQL_Error  
 
92
 
 
93
*** Test lock wait timeout ***
 
94
include/stop_slave.inc
 
95
DELETE FROM t2;
 
96
CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
 
97
BEGIN;
 
98
SELECT * FROM t1 FOR UPDATE;
 
99
a
 
100
1
 
101
START SLAVE;
 
102
SELECT COUNT(*) FROM t2;
 
103
COUNT(*)
 
104
0
 
105
COMMIT;
 
106
include/start_slave.inc
 
107
SELECT * FROM t1;
 
108
a
 
109
1
 
110
1
 
111
SELECT * FROM t3;
 
112
a
 
113
3
 
114
3
 
115
SHOW SLAVE STATUS;
 
116
Slave_IO_State  #
 
117
Master_Host     127.0.0.1
 
118
Master_User     root
 
119
Master_Port     MASTER_PORT
 
120
Connect_Retry   1
 
121
Master_Log_File master-bin.000001
 
122
Read_Master_Log_Pos     #
 
123
Relay_Log_File  #
 
124
Relay_Log_Pos   #
 
125
Relay_Master_Log_File   master-bin.000001
 
126
Slave_IO_Running        Yes
 
127
Slave_SQL_Running       Yes
 
128
Replicate_Do_DB 
 
129
Replicate_Ignore_DB     
 
130
Replicate_Do_Table      
 
131
Replicate_Ignore_Table  #
 
132
Replicate_Wild_Do_Table 
 
133
Replicate_Wild_Ignore_Table     
 
134
Last_Errno      0
 
135
Last_Error      
 
136
Skip_Counter    0
 
137
Exec_Master_Log_Pos     #
 
138
Relay_Log_Space #
 
139
Until_Condition None
 
140
Until_Log_File  
 
141
Until_Log_Pos   0
 
142
Master_SSL_Allowed      No
 
143
Master_SSL_CA_File      
 
144
Master_SSL_CA_Path      
 
145
Master_SSL_Cert 
 
146
Master_SSL_Cipher       
 
147
Master_SSL_Key  
 
148
Seconds_Behind_Master   #
 
149
Master_SSL_Verify_Server_Cert   No
 
150
Last_IO_Errno   #
 
151
Last_IO_Error   #
 
152
Last_SQL_Errno  0
 
153
Last_SQL_Error  
 
154
 
 
155
*** Test lock wait timeout and purged relay logs ***
 
156
SET @my_max_relay_log_size= @@global.max_relay_log_size;
 
157
SET global max_relay_log_size=0;
 
158
include/stop_slave.inc
 
159
DELETE FROM t2;
 
160
CHANGE MASTER TO MASTER_LOG_POS=440;
 
161
BEGIN;
 
162
SELECT * FROM t1 FOR UPDATE;
 
163
a
 
164
1
 
165
1
 
166
START SLAVE;
 
167
SELECT COUNT(*) FROM t2;
 
168
COUNT(*)
 
169
0
 
170
COMMIT;
 
171
include/start_slave.inc
 
172
SELECT * FROM t1;
 
173
a
 
174
1
 
175
1
 
176
1
 
177
SELECT * FROM t3;
 
178
a
 
179
3
 
180
3
 
181
3
 
182
SHOW SLAVE STATUS;
 
183
Slave_IO_State  #
 
184
Master_Host     127.0.0.1
 
185
Master_User     root
 
186
Master_Port     MASTER_PORT
 
187
Connect_Retry   1
 
188
Master_Log_File master-bin.000001
 
189
Read_Master_Log_Pos     #
 
190
Relay_Log_File  #
 
191
Relay_Log_Pos   #
 
192
Relay_Master_Log_File   master-bin.000001
 
193
Slave_IO_Running        Yes
 
194
Slave_SQL_Running       Yes
 
195
Replicate_Do_DB 
 
196
Replicate_Ignore_DB     
 
197
Replicate_Do_Table      
 
198
Replicate_Ignore_Table  #
 
199
Replicate_Wild_Do_Table 
 
200
Replicate_Wild_Ignore_Table     
 
201
Last_Errno      0
 
202
Last_Error      
 
203
Skip_Counter    0
 
204
Exec_Master_Log_Pos     #
 
205
Relay_Log_Space #
 
206
Until_Condition None
 
207
Until_Log_File  
 
208
Until_Log_Pos   0
 
209
Master_SSL_Allowed      No
 
210
Master_SSL_CA_File      
 
211
Master_SSL_CA_Path      
 
212
Master_SSL_Cert 
 
213
Master_SSL_Cipher       
 
214
Master_SSL_Key  
 
215
Seconds_Behind_Master   #
 
216
Master_SSL_Verify_Server_Cert   No
 
217
Last_IO_Errno   #
 
218
Last_IO_Error   #
 
219
Last_SQL_Errno  0
 
220
Last_SQL_Error  
 
221
 
 
222
*** Clean up ***
 
223
DROP TABLE t1,t2,t3;
 
224
SET global max_relay_log_size= @my_max_relay_log_size;
 
225
End of 5.1 tests