Skip to content

Commit a7d186a

Browse files
committed
MDEV-32168: slave_error_param condition is never checked from the wait_for_slave_param.inc
- Reviewer: <knielsen@knielsen-hq.org> <brandon.nesterenko@mariadb.com> <andrei.elkin@mariadb.com>
1 parent d4be70a commit a7d186a

File tree

50 files changed

+142
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+142
-71
lines changed

mysql-test/include/wait_for_slave_io_error.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ let $_wfsie_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
5959

6060
if ($slave_io_errno == '') {
6161
--echo !!!ERROR IN TEST: you must set \$slave_io_errno before you source
62-
--echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsie_errno',
62+
--echo !!!wait_for_slave_io_error.inc. The error we got this time was '$_wfsie_errno',
6363
--echo !!!so you probably want to add the following line to your test case:
6464
--echo !!! --let \$slave_io_errno= $_wfsie_errno
6565
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc

mysql-test/include/wait_for_slave_param.inc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ if (!$_slave_timeout)
5656
}
5757
}
5858

59-
if ($slave_error_param == '')
60-
{
61-
--let $slave_error_param= 1
62-
}
63-
6459
let $_slave_param_comparison= $slave_param_comparison;
6560
if (!$_slave_param_comparison)
6661
{
@@ -90,7 +85,7 @@ while ($_slave_continue)
9085
--let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1)
9186

9287
# Check if an error condition is reached.
93-
if (!$slave_error_param)
88+
if ($slave_error_param)
9489
{
9590
--let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1)
9691
if ($_show_slave_status_error_value)

mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_coords.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ start slave;
136136
SHOW TABLES;
137137

138138
--disable_connect_log
139+
# IO thread is stopped, stop SQL thread only
140+
--let $rpl_only_running_threads= 1
139141
--source include/stop_slave.inc
140142
--enable_connect_log
141143
reset slave;

mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ if (`SELECT strcmp("$gsp","")`)
132132
SHOW TABLES;
133133

134134
--disable_connect_log
135+
# IO thread is stopped, wait for SQL thread to be stopped
136+
--let $rpl_only_running_threads= 1
135137
--source include/stop_slave.inc
136138
--enable_connect_log
137139
reset slave;

mysql-test/suite/binlog_encryption/rpl_parallel.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,6 @@ connection con2;
897897
SET debug_sync='RESET';
898898
connection server_2;
899899
include/wait_for_slave_sql_error.inc [errno=1062]
900-
include/wait_for_slave_sql_to_stop.inc
901900
SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
902901
a b
903902
110 1

mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ connection server_2;
3535
connection con_temp2;
3636
COMMIT;
3737
connection server_2;
38+
include/wait_for_slave_sql_error.inc [errno=1062]
3839
include/stop_slave.inc
3940
include/assert.inc [table t1 should have zero rows where a>32]
4041
SELECT * FROM t1 WHERE a>32;

mysql-test/suite/multi_source/gtid_slave_pos.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ set default_master_connection = 'slave1';
9797
STOP SLAVE;
9898
include/wait_for_slave_to_stop.inc
9999
set default_master_connection = 'slave2';
100+
include/wait_for_slave_sql_error.inc [errno=1942]
100101
STOP SLAVE;
101-
include/wait_for_slave_to_stop.inc
102+
include/stop_slave.inc
102103
set default_master_connection = 'slave1';
103104
START SLAVE;
104105
include/wait_for_slave_to_start.inc

mysql-test/suite/multi_source/gtid_slave_pos.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ set default_master_connection = 'slave1';
118118
STOP SLAVE;
119119
--source include/wait_for_slave_to_stop.inc
120120
set default_master_connection = 'slave2';
121+
--let $slave_sql_errno= 1942
122+
--source include/wait_for_slave_sql_error.inc
121123
STOP SLAVE;
122-
--source include/wait_for_slave_to_stop.inc
124+
--let $rpl_only_running_threads= 1
125+
--source include/stop_slave.inc
123126
set default_master_connection = 'slave1';
124127
START SLAVE;
125128
--source include/wait_for_slave_to_start.inc

mysql-test/suite/rpl/include/mdev-31448_conservative.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ insert into t1 values (3);
5050
commit;
5151

5252
--connection slave
53-
--let $slave_timeout=1032
54-
--source include/wait_for_slave_sql_to_stop.inc
53+
--let $slave_sql_errno=1032
54+
--source include/wait_for_slave_sql_error.inc
5555

5656
update t1 set a=1 where a=2;
5757
set @@global.slave_parallel_threads = @save.slave_parallel_threads;

mysql-test/suite/rpl/include/mdev-31448_optimistic.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ drop table t2;
7575
commit;
7676

7777
--connection slave
78-
--let $slave_timeout=1032
79-
--source include/wait_for_slave_sql_to_stop.inc
78+
--let $slave_sql_errno=1032
79+
--source include/wait_for_slave_sql_error.inc
8080

8181
update t1 set a=1 where a=2;
8282
set @@global.slave_parallel_threads = @save.slave_parallel_threads;

0 commit comments

Comments
 (0)