Skip to content

Commit 86993c5

Browse files
committed
Bug#35327006 Stabilize the weekly runs [noclose]
Prevent rpl.rpl_deprecations from running with transaction_write_set_extraction OFF or replica_parallel_type=LOGICAL_CLOCK as this generates extra deprecation warnings that make the test fail. Introduce a skip file that tests if one or more options are specified on the MTR command line and use this to replace the sequence of different have_*.inc invocations in the test. Change-Id: I7a5fff8d0b80d4fcf531cf6d25996b2a1ac564c6
1 parent b95ca91 commit 86993c5

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

mysql-test/include/excludenoskip.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ have_statement_timeout.inc
142142
# --bootstrap=--init-file=std_data/explicit_undo_32.sql
143143
have_innodb_default_undo_tablespaces.inc
144144

145+
# 4.9 General utility to skip if a specific command line option is used.
146+
# The usage is described in the .inc file.
147+
skip_by_command_line_option.inc
148+
145149
# 5.0 Different protocols
146150
# Reason for inclusion: Tests should run only with supported protocols and
147151
# skip on others.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ==== Purpose ====
2+
#
3+
# Skip a test if a given option was passed on the command line.
4+
#
5+
# ==== Usage ====
6+
#
7+
# --let $variable_names = NAME1[, NAME2 ...]
8+
# --source include/skip_by_command_line.inc
9+
#
10+
# Parameters:
11+
#
12+
# $variable_names
13+
# Comma-separated list of single-quoted variable names. If any of
14+
# those global variables were initialized from the command line, the
15+
# test will be skipped.
16+
#
17+
18+
if ($variable_names == '') {
19+
--die !!! ERROR IN TEST: set $variable_names
20+
}
21+
if (`SELECT COUNT(*) > 0 FROM performance_schema.variables_info WHERE VARIABLE_NAME IN ($variable_names) AND VARIABLE_SOURCE IN ('COMMAND_LINE')`) {
22+
--let $failing_variables = `SELECT GROUP_CONCAT(VARIABLE_NAME) FROM performance_schema.variables_info WHERE VARIABLE_NAME IN ($variable_names) AND VARIABLE_SOURCE IN ('COMMAND_LINE')`
23+
--skip Skipped because the following are set on the command line: $failing_variables
24+
}

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
--source include/master-slave.inc
22

3-
# no need to run multiple times
3+
# Each deprecated option specified on the command line, produces an
4+
# extra warning during server restart. So when the test executes with
5+
# extra options, it causes a failure of the the test assertion that
6+
# checks warnings after a server restart. mtr can't help passing
7+
# binlog_format, so allow that (but run only in row format to avoid
8+
# unnecessary repetition). The other options are not passed by
9+
# default, so skip the test if they are set on the command line while
10+
# invoking mtr.
411
--source include/have_binlog_format_row.inc
5-
--source include/have_slave_repository_type_table.inc
6-
--source include/only_mts_replica_parallel_workers.inc
7-
--source include/only_replica_preserve_commit_order.inc
8-
--source include/only_mts_replica_parallel_type_logical_clock.inc
9-
--source include/have_default_replica_transaction_retries.inc
10-
--source include/have_default_slave_rows_search_algorithms.inc
12+
let $variable_names = 'master_info_repository', 'relay_log_info_repository', 'replica_parallel_workers', 'replica_preserve_commit_order',
13+
'replica_parallel_type', 'replica_transaction_retries', 'slave_rows_search_algorithms','transaction_write_set_extraction';
14+
--source include/skip_by_command_line_option.inc
1115

1216
#####################################################################
1317
# WL#12926: Deprecate --log_bin_use_v1_row_events #

0 commit comments

Comments
 (0)