2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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;
13
t1 CREATE TABLE `t1` (
16
) ENGINE=InnoDB DEFAULT CHARSET=latin1
19
t2 CREATE TABLE `t2` (
20
`a` int(11) DEFAULT NULL
21
) ENGINE=InnoDB DEFAULT CHARSET=latin1
24
t3 CREATE TABLE `t3` (
27
) ENGINE=InnoDB DEFAULT CHARSET=latin1
28
SHOW VARIABLES LIKE 'slave_transaction_retries';
30
slave_transaction_retries 2
31
include/stop_slave.inc
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);
40
SELECT * FROM t1 FOR UPDATE;
43
SELECT COUNT(*) FROM t2;
57
Master_Port MASTER_PORT
59
Master_Log_File master-bin.000001
63
Relay_Master_Log_File master-bin.000001
69
Replicate_Ignore_Table #
70
Replicate_Wild_Do_Table
71
Replicate_Wild_Ignore_Table
86
Seconds_Behind_Master #
87
Master_SSL_Verify_Server_Cert No
93
*** Test lock wait timeout ***
94
include/stop_slave.inc
96
CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
98
SELECT * FROM t1 FOR UPDATE;
102
SELECT COUNT(*) FROM t2;
106
include/start_slave.inc
117
Master_Host 127.0.0.1
119
Master_Port MASTER_PORT
121
Master_Log_File master-bin.000001
122
Read_Master_Log_Pos #
125
Relay_Master_Log_File master-bin.000001
127
Slave_SQL_Running Yes
131
Replicate_Ignore_Table #
132
Replicate_Wild_Do_Table
133
Replicate_Wild_Ignore_Table
137
Exec_Master_Log_Pos #
142
Master_SSL_Allowed No
148
Seconds_Behind_Master #
149
Master_SSL_Verify_Server_Cert No
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
160
CHANGE MASTER TO MASTER_LOG_POS=440;
162
SELECT * FROM t1 FOR UPDATE;
167
SELECT COUNT(*) FROM t2;
171
include/start_slave.inc
184
Master_Host 127.0.0.1
186
Master_Port MASTER_PORT
188
Master_Log_File master-bin.000001
189
Read_Master_Log_Pos #
192
Relay_Master_Log_File master-bin.000001
194
Slave_SQL_Running Yes
198
Replicate_Ignore_Table #
199
Replicate_Wild_Do_Table
200
Replicate_Wild_Ignore_Table
204
Exec_Master_Log_Pos #
209
Master_SSL_Allowed No
215
Seconds_Behind_Master #
216
Master_SSL_Verify_Server_Cert No
224
SET global max_relay_log_size= @my_max_relay_log_size;