Skip to content

Commit 1a1857a

Browse files
committed
BUG#20454797 WAIT_FOR_SLAVE_PARAM.INC IS NOT CHECKING FOR ERROR WHILE WAITING THE PARAMETER
Problem and analysis: The mtr include "wait_for_slave_param.inc" was not detecting errors. Instead, it would always trigger the timeout waiting for the parameter if an unexpected error stopped one of the slave threads. This misbehavior of the include generated timeout errors when other errors were the real cause of the issue in some test cases. Fix: Corrected the code in "wait_for_slave_param.inc" to detect the errors. Also, added a condition that checks for expected errors, so they can be safely ignored. Corrected the test cases that were misusing the mtr include "stop_slave.inc" to stop slaves when errors were present in either the connection or the applier thread. These tests now ignore the expected error.
1 parent 1156fa7 commit 1a1857a

20 files changed

+126
-48
lines changed

mysql-test/extra/rpl_tests/rpl_row_idempotency.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ select * from ti1 order by b /* must be (2),(3) */;
121121

122122
--echo *** slave must stop (Trying to delete a referenced foreing key)
123123
connection slave;
124+
--let $slave_sql_errno= convert_error(ER_ROW_IS_REFERENCED_2)
124125
source include/wait_for_slave_sql_to_stop.inc;
125126

126127
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -155,6 +156,7 @@ insert into ti2 set a=3, b=3 /* offending write event */;
155156

156157
--echo *** slave must stop (Trying to insert an invalid foreign key)
157158
connection slave;
159+
--let $slave_sql_errno= convert_error(ER_NO_REFERENCED_ROW_2)
158160
source include/wait_for_slave_sql_to_stop.inc;
159161

160162
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -194,6 +196,7 @@ insert into ti1 set b=1 /* offending write event */;
194196

195197
--echo *** slave must stop (Trying to insert a dupliacte key)
196198
connection slave;
199+
--let $slave_sql_errno= convert_error(ER_DUP_ENTRY)
197200
source include/wait_for_slave_sql_to_stop.inc;
198201

199202
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -229,6 +232,7 @@ DELETE FROM t1 WHERE a = -2;
229232

230233
--echo *** slave must stop (Key was not found)
231234
connection slave;
235+
--let $slave_sql_errno= convert_error(ER_KEY_NOT_FOUND)
232236
source include/wait_for_slave_sql_to_stop.inc;
233237

234238
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);

mysql-test/extra/rpl_tests/rpl_start_stop_slave.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ START SLAVE;
204204
--let $status_items= Last_IO_Errno, Last_IO_Error
205205
--source include/show_slave_status.inc
206206

207+
--let $slave_io_errno= convert_error(ER_MASTER_FATAL_ERROR_READING_BINLOG)
207208
--source include/stop_slave.inc
208209
RESET SLAVE;
209210

mysql-test/include/wait_for_slave_param.inc

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# --let $slave_param_value= No
1111
# [--let $slave_param_comparison= [ < | <= | >= | > | = | != ]]
1212
# [--let $slave_timeout= NUMBER]
13+
# [--let $slave_error_param= [Last_SQL_Errno | Last_IO_Errno]]
1314
# [--let $slave_error_param= [Slave_SQL_Errno | Slave_IO_Errno]]
1415
# [--let $rpl_debug= 1]
16+
# [--let $slave_io_errno= NUMBER [, NUMBER ...] [# comment]]
17+
# [--let $slave_sql_errno= NUMBER [, NUMBER ...] [# comment]]
1518
# --source include/wait_for_slave_param.inc
1619
#
1720
# Parameters:
@@ -33,13 +36,21 @@
3336
# setting $slave_timeout. The unit is one second.
3437
#
3538
# $slave_error_param
36-
# If set, this script will check if the column of the output from
37-
# SHOW SLAVE STATUS named $slave_error_param is nonzero. If it is,
38-
# this script will faile immediately. Typically, this should be set
39+
# If set, this script will check for errors in the column of the
40+
# output from SHOW SLAVE STATUS named $slave_error_param while
41+
# waiting for the parameter. Once finding an error that is not
42+
# expected (see $slave_io_errno and $slave_sql_errno parameters)
43+
# this script will fail immediately. Typically, this should be set
3944
# to Last_IO_Errno or Last_SQL_Errno.
4045
#
4146
# $rpl_debug
4247
# See include/rpl_init.inc
48+
#
49+
# $slave_io_errno
50+
# See include/wait_for_slave_io_error.inc
51+
#
52+
# $slave_sql_errno
53+
# See include/wait_for_slave_sql_error.inc
4354

4455

4556
--let $include_filename= wait_for_slave_param.inc [$slave_param]
@@ -57,9 +68,16 @@ if (!$_slave_timeout)
5768
let $_slave_timeout= `select $default_timeout * $sleep_freq`;
5869
}
5970

60-
if ($slave_error_param == '')
71+
if ($slave_error_param)
6172
{
62-
--let $slave_error_param= 1
73+
if ($slave_error_param != "Last_SQL_Errno")
74+
{
75+
if ($slave_error_param != "Last_IO_Errno")
76+
{
77+
--echo *** slave_error_param = $slave_error_param
78+
--die slave_error_param must be null, Last_SQL_Errno or Last_IO_Errno
79+
}
80+
}
6381
}
6482

6583
let $_slave_param_comparison= $slave_param_comparison;
@@ -82,16 +100,41 @@ if ($_slave_check_configured == 'No such row')
82100
--die SHOW SLAVE STATUS returned empty result set. Slave not configured.
83101
}
84102

103+
104+
# Strip away comments on $slave_io_errno and $slave_sql_errno parameters
105+
--let $_slave_io_errno= `SELECT IF(LOCATE('#', '$slave_io_errno') != 0, SUBSTR('$slave_io_errno', 1, LOCATE('#', '$slave_io_errno') - 1), '$slave_io_errno')`
106+
--let $_slave_sql_errno= `SELECT IF(LOCATE('#', '$slave_sql_errno') != 0, SUBSTR('$slave_sql_errno', 1, LOCATE('#', '$slave_sql_errno') - 1), '$slave_sql_errno')`
107+
85108
--let $_slave_timeout_counter= `select $_slave_timeout * $sleep_freq`
86109
--let $_slave_continue= 1
87110
while ($_slave_continue)
88111
{
89112
--let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1)
90113

91114
# Check if an error condition is reached.
92-
if (!$slave_error_param)
115+
if ($slave_error_param)
93116
{
94117
--let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1)
118+
119+
# Check if the error condition was expected
120+
if ($_show_slave_status_error_value)
121+
{
122+
--let $_expected_error=
123+
if ($slave_error_param == "Last_IO_Errno")
124+
{
125+
--let $_expected_error=`SELECT FIND_IN_SET('$_show_slave_status_error_value','$_slave_io_errno')`
126+
}
127+
if ($slave_error_param == "Last_SQL_Errno")
128+
{
129+
--let $_expected_error=`SELECT FIND_IN_SET('$_show_slave_status_error_value','$_slave_sql_errno')`
130+
}
131+
# If the error is an expected error, just ignore it
132+
if ($_expected_error)
133+
{
134+
--let $_show_slave_status_error_value=
135+
}
136+
}
137+
95138
if ($_show_slave_status_error_value)
96139
{
97140
--echo **** ERROR: $slave_error_param = '$_show_slave_status_error_value' while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****

mysql-test/include/wait_for_slave_sql_to_start.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let $slave_param_value= Yes;
2828
# *before* it clears Last_SQL_Errno. So we have to allow errors in
2929
# the SQL thread here.
3030

31-
#--let $slave_error_param= Last_SQL_Errno
31+
--let $slave_error_param=
3232
source include/wait_for_slave_param.inc;
3333
#--let $slave_error_param=
3434

mysql-test/suite/rpl/r/rpl_connection.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
1111
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
1212
START SLAVE;
1313
include/wait_for_slave_io_error.inc [errno=1045, 1593]
14-
include/stop_slave.inc
14+
include/stop_slave_sql.inc
1515
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
1616
Warnings:
1717
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.

mysql-test/suite/rpl/r/rpl_heartbeat_basic.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ INSERT INTO t1 VALUES (1, 'on master', NULL);
281281
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
282282
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
283283
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
284-
include/stop_slave.inc
284+
include/stop_slave_io.inc
285285
DELETE FROM t1;
286286
include/start_slave.inc
287287
include/sync_slave_sql_with_master.inc

mysql-test/suite/rpl/r/rpl_master_connection.result

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,29 +233,39 @@ include/wait_for_slave_io_error.inc [errno=1593]
233233
include/stop_slave.inc
234234
TRUNCATE mysql.general_log;
235235
START SLAVE USER='root' PASSWORD='secret';
236-
include/stop_slave.inc
236+
include/wait_for_slave_io_error.inc [errno=1045]
237+
include/stop_slave_sql.inc
237238
START SLAVE USER = 'root' PASSWORD = '<secret>';
238-
include/stop_slave.inc
239+
include/wait_for_slave_io_error.inc [errno=1045]
240+
include/stop_slave_sql.inc
239241
TRUNCATE mysql.general_log;
240242
START SLAVE IO_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
241-
include/stop_slave.inc
243+
include/wait_for_slave_io_error.inc [errno=1045]
244+
include/stop_slave_sql.inc
242245
START SLAVE IO_THREAD USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
243-
include/stop_slave.inc
246+
include/wait_for_slave_io_error.inc [errno=1045]
247+
include/stop_slave_sql.inc
244248
TRUNCATE mysql.general_log;
245249
START SLAVE IO_THREAD, SQL_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
246-
include/stop_slave.inc
250+
include/wait_for_slave_io_error.inc [errno=1045]
251+
include/stop_slave_sql.inc
247252
START SLAVE IO_THREAD, SQL_THREAD USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
248-
include/stop_slave.inc
253+
include/wait_for_slave_io_error.inc [errno=1045]
254+
include/stop_slave_sql.inc
249255
TRUNCATE mysql.general_log;
250256
START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE='dummy-log.000001', MASTER_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
251-
include/stop_slave.inc
257+
include/wait_for_slave_io_error.inc [errno=1045]
258+
include/stop_slave_sql.inc
252259
START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE = 'dummy-log.000001', MASTER_LOG_POS = 116 USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
253-
include/stop_slave.inc
260+
include/wait_for_slave_io_error.inc [errno=1045]
261+
include/stop_slave_sql.inc
254262
TRUNCATE mysql.general_log;
255263
START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE='dummy-log.000001', RELAY_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
256-
include/stop_slave.inc
264+
include/wait_for_slave_io_error.inc [errno=1045]
265+
include/stop_slave_sql.inc
257266
START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE = 'dummy-log.000001', RELAY_LOG_POS = 116 USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
258-
include/stop_slave.inc
267+
include/wait_for_slave_io_error.inc [errno=1045]
268+
include/stop_slave_sql.inc
259269
SET GLOBAL log_output= @old_log_output;
260270
TRUNCATE mysql.general_log;
261271
include/start_slave.inc

mysql-test/suite/rpl/r/rpl_row_corruption.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
1616
include/start_slave.inc
1717
UPDATE t1_11753004, t2_11753004 SET t1_11753004.c1=3, t2_11753004.c1=4 WHERE t1_11753004.c1=1 OR t2_11753004.c1=2;
1818
include/wait_for_slave_sql_error.inc [errno=1593 ]
19-
include/stop_slave.inc
19+
include/stop_slave_io.inc
2020
SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";
2121
include/start_slave.inc
2222
include/rpl_reset.inc

mysql-test/suite/rpl/r/rpl_ssl1.result

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ Warnings:
1313
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
1414
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
1515
start slave;
16-
insert into t1 values (1);
17-
select * from t1;
18-
t
19-
stop slave;
20-
include/wait_for_slave_to_stop.inc
16+
include/wait_for_slave_io_error.inc [errno=1045]
17+
include/stop_slave_sql.inc
2118
change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem';
2219
start slave;
2320
include/wait_for_slave_to_start.inc
21+
insert into t1 values (1);
2422
include/sync_slave_sql_with_master.inc
2523
select * from t1;
2624
t

mysql-test/suite/rpl/t/rpl_change_master_dbug.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ START SLAVE io_thread;
2424
# the error with the err_count exported in the retries field, we should
2525
# get 3 retries (one per second) when the IO thread gives up, ie,
2626
# when it stops.
27+
--let $slave_io_errno= 2005
2728
-- source include/wait_for_slave_io_to_stop.inc
2829
-- let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
2930
if (!`SELECT "$error" LIKE "%retries: 3"`)

mysql-test/suite/rpl/t/rpl_connection.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= '';
1717
START SLAVE;
1818
--let $slave_io_errno= 1045, 1593
1919
--source include/wait_for_slave_io_error.inc
20-
--source include/stop_slave.inc
20+
--source include/stop_slave_sql.inc
2121

2222
--replace_column 2 ####
2323
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';

mysql-test/suite/rpl/t/rpl_heartbeat_basic.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ sleep 2;
389389
let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
390390
let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
391391
--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
392-
--source include/stop_slave.inc
392+
--source include/stop_slave_io.inc
393393
DELETE FROM t1;
394394
--source include/start_slave.inc
395395
--connection master

mysql-test/suite/rpl/t/rpl_master_connection.test

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,55 +319,76 @@ START SLAVE PASSWORD='secret';
319319
--let $slave_io_errno=1593
320320
--source include/wait_for_slave_io_error.inc
321321

322+
--let $slave_io_errno= convert_error(ER_SLAVE_FATAL_ERROR)
322323
--source include/stop_slave.inc
323324
TRUNCATE mysql.general_log;
324325
START SLAVE USER='root' PASSWORD='secret';
325326
--let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
326327
# execute it to see if the rewrite generated a (syntatically) valid command
327-
--source include/stop_slave.inc
328+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
329+
--source include/wait_for_slave_io_error.inc
330+
--source include/stop_slave_sql.inc
328331
--eval $rewritten
329332

330-
--source include/stop_slave.inc
333+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
334+
--source include/wait_for_slave_io_error.inc
335+
--source include/stop_slave_sql.inc
331336
TRUNCATE mysql.general_log;
332337
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
333338
--eval START SLAVE IO_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
334339
--let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
335340
# execute it to see if the rewrite generated a (syntatically) valid command
336-
--source include/stop_slave.inc
341+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
342+
--source include/wait_for_slave_io_error.inc
343+
--source include/stop_slave_sql.inc
337344
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
338345
--eval $rewritten
339346

340-
--source include/stop_slave.inc
347+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
348+
--source include/wait_for_slave_io_error.inc
349+
--source include/stop_slave_sql.inc
341350
TRUNCATE mysql.general_log;
342351
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
343352
--eval START SLAVE IO_THREAD, SQL_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
344353
--let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
345354
# execute it to see if the rewrite generated a (syntatically) valid command
346-
--source include/stop_slave.inc
355+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
356+
--source include/wait_for_slave_io_error.inc
357+
--source include/stop_slave_sql.inc
347358
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
348359
--eval $rewritten
349360

350-
--source include/stop_slave.inc
361+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
362+
--source include/wait_for_slave_io_error.inc
363+
--source include/stop_slave_sql.inc
351364
TRUNCATE mysql.general_log;
352365
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
353366
--eval START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE='dummy-log.000001', MASTER_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
354367
--let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
355368
# execute it to see if the rewrite generated a (syntatically) valid command
356-
--source include/stop_slave.inc
369+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
370+
--source include/wait_for_slave_io_error.inc
371+
--source include/stop_slave_sql.inc
357372
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
358373
--eval $rewritten
359374

360-
--source include/stop_slave.inc
375+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
376+
--source include/wait_for_slave_io_error.inc
377+
--source include/stop_slave_sql.inc
361378
TRUNCATE mysql.general_log;
362379
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
363380
--eval START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE='dummy-log.000001', RELAY_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
364381
--let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
365382
# execute it to see if the rewrite generated a (syntatically) valid command
366-
--source include/stop_slave.inc
383+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
384+
--source include/wait_for_slave_io_error.inc
385+
--source include/stop_slave_sql.inc
367386
--replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
368387
--eval $rewritten
369388

370-
--source include/stop_slave.inc
389+
--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
390+
--source include/wait_for_slave_io_error.inc
391+
--source include/stop_slave_sql.inc
371392

372393
--enable_warnings
373394

mysql-test/suite/rpl/t/rpl_parallel_start_stop.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ let $count= 0;
4343
let $table= worker_proc_list;
4444
source include/wait_until_rows_count.inc;
4545

46+
--let $slave_sql_errno= convert_error(ER_MTS_INCONSISTENT_DATA)
4647
source include/wait_for_slave_sql_to_stop.inc;
4748

4849
#
@@ -109,6 +110,7 @@ let $count= 0;
109110
let $table= worker_proc_list;
110111
source include/wait_until_rows_count.inc;
111112

113+
--let $slave_sql_errno= convert_error(ER_DUP_ENTRY)
112114
source include/wait_for_slave_sql_to_stop.inc;
113115
delete from t1 where a=3;
114116

mysql-test/suite/rpl/t/rpl_rotate_row_trans.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ while ($restarts)
7272
}
7373

7474
--echo # Stop the SQL thread (it should be in the middle of the transaction/group)
75+
--let $slave_sql_errno= convert_error(ER_MTS_INCONSISTENT_DATA)
7576
--source include/stop_slave_sql.inc
7677

7778
--echo # Remove the debug point and restart the both threads

mysql-test/suite/rpl/t/rpl_row_corruption.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
4040
# wait for error 1593 (ER_SLAVE_FATAL_ERROR)
4141
--let $slave_sql_errno=1593
4242
--source include/wait_for_slave_sql_error.inc
43-
--source include/stop_slave.inc
43+
--source include/stop_slave_io.inc
4444

4545
# clean up
4646
SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";

mysql-test/suite/rpl/t/rpl_slave_grp_exec.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code:
6666
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
6767

6868
# in MTS case error is either of two:
69-
#--let $slave_sql_errno= 1146,1593
69+
--let $slave_sql_errno= 1146,1593
7070
# whereas in the single-threaded case:
7171
# 1146 = ER_NO_SUCH_TABLE
7272
#--let $slave_sql_errno= 1146

0 commit comments

Comments
 (0)