Skip to content

Commit 18ed817

Browse files
author
Slawomir Maludzinski
committed
WL#14854: Remove disconnect-slave-event-count and abort-slave-event-count
Change-Id: I9a9bf05333c307d2836266e1af1dcb1656b4bc14
1 parent 9dbddaa commit 18ed817

10 files changed

+5
-95
lines changed

mysql-test/r/mysqld--help-notwin.result

-10
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ The following options may be given as the first argument:
88
Also read groups with concat(group, suffix)
99
--login-path=# Read this path from the login file.
1010

11-
--abort-slave-event-count=#
12-
Option used by mysql-test for debugging and testing of
13-
replication.This option is deprecated and will be removed
14-
in a future version.
1511
--activate-all-roles-on-login
1612
Automatically set all granted roles as active after the
1713
user has authenticated successfully.
@@ -339,10 +335,6 @@ The following options may be given as the first argument:
339335
support execution time error(s) instead of connection
340336
error
341337
(Defaults to on; use --skip-disconnect-on-expired-password to disable.)
342-
--disconnect-slave-event-count=#
343-
Option used by mysql-test for debugging and testing of
344-
replication.This option is deprecated and will be removed
345-
in a future version.
346338
--div-precision-increment=#
347339
Precision of the result of '/' operator will be increased
348340
on that value
@@ -1660,7 +1652,6 @@ The following options may be given as the first argument:
16601652
(Defaults to on; use --skip-xa-detach-on-prepare to disable.)
16611653

16621654
Variables (--variable-name=value)
1663-
abort-slave-event-count 0
16641655
activate-all-roles-on-login FALSE
16651656
admin-address (No default value)
16661657
admin-port 33062
@@ -1741,7 +1732,6 @@ delayed-insert-timeout 300
17411732
delayed-queue-size 1000
17421733
disabled-storage-engines
17431734
disconnect-on-expired-password TRUE
1744-
disconnect-slave-event-count 0
17451735
div-precision-increment 4
17461736
end-markers-in-json FALSE
17471737
enforce-gtid-consistency FALSE

mysql-test/r/mysqld--help-win.result

-10
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ The following options may be given as the first argument:
88
Also read groups with concat(group, suffix)
99
--login-path=# Read this path from the login file.
1010

11-
--abort-slave-event-count=#
12-
Option used by mysql-test for debugging and testing of
13-
replication.This option is deprecated and will be removed
14-
in a future version.
1511
--activate-all-roles-on-login
1612
Automatically set all granted roles as active after the
1713
user has authenticated successfully.
@@ -338,10 +334,6 @@ The following options may be given as the first argument:
338334
support execution time error(s) instead of connection
339335
error
340336
(Defaults to on; use --skip-disconnect-on-expired-password to disable.)
341-
--disconnect-slave-event-count=#
342-
Option used by mysql-test for debugging and testing of
343-
replication.This option is deprecated and will be removed
344-
in a future version.
345337
--div-precision-increment=#
346338
Precision of the result of '/' operator will be increased
347339
on that value
@@ -1671,7 +1663,6 @@ The following options may be given as the first argument:
16711663
(Defaults to on; use --skip-xa-detach-on-prepare to disable.)
16721664

16731665
Variables (--variable-name=value)
1674-
abort-slave-event-count 0
16751666
activate-all-roles-on-login FALSE
16761667
admin-address (No default value)
16771668
admin-port 33062
@@ -1751,7 +1742,6 @@ delayed-insert-timeout 300
17511742
delayed-queue-size 1000
17521743
disabled-storage-engines
17531744
disconnect-on-expired-password TRUE
1754-
disconnect-slave-event-count 0
17551745
div-precision-increment 4
17561746
end-markers-in-json FALSE
17571747
enforce-gtid-consistency FALSE

mysql-test/suite/engines/funcs/t/rpl000010-slave.opt

-1
This file was deleted.

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

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ The syntax '--relay-log-info-repository' is deprecated and will be removed in a
9898
The syntax '--relay-log-info-file' is deprecated and will be removed in a future release.
9999
The syntax '--slave-rows-search-algorithms' is deprecated and will be removed in a future release.
100100
The syntax '--transaction-write-set-extraction' is deprecated and will be removed in a future release.
101-
The syntax '--disconnect-slave-event-count' is deprecated and will be removed in a future release.
102-
The syntax '--abort-slave-event-count' is deprecated and will be removed in a future release.
103101
The syntax '--replica-parallel-type' is deprecated and will be removed in a future release.
104102
The syntax '--replica-parallel-workers=0' is deprecated and will be removed in a future release. Please use '--replica-parallel-workers=1' instead.
105103
The syntax '--binlog-transaction-dependency-tracking' is deprecated and will be removed in a future release.

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

+3-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ let $variable_names = 'master_info_repository', 'relay_log_info_repository', 're
1818
# WL#12926: Deprecate --log_bin_use_v1_row_events #
1919
# WL#11031: Deprecate --relay-log-info-file and --master-info-file #
2020
# WL#12892: Deprecate --slave_rows_search_algorithms #
21-
# WL#13958: Deprecate relay_log_info_repository #
22-
# WL#14526: Deprecate disconnect-slave-event-count #
23-
# and abort-slave-event-count #
24-
# WL#13968: Deprecate sync_relay_log_info #
21+
# WL#13958 : Deprecate relay_log_info_repository #
22+
# WL#13968 : Deprecate sync_relay_log_info #
2523
# WL#13964: Deprecate binlog_transaction_dependency_tracking #
2624
#####################################################################
2725

@@ -100,7 +98,7 @@ The syntax 'log_slave_updates' is deprecated and will be removed in a future rel
10098

10199
while($i > 0) {
102100
if ($i == 2) {
103-
--let $rpl_server_parameters = --binlog_format=ROW --sync-relay-log-info=10005 --master-info-repository=TABLE --master-info-file=$mi_file --log-bin-use-v1-row-events --skip-replica-start --relay-log-info-repository=FILE --relay-log-info-file=$rli_file --slave-rows-search-algorithms=INDEX_SCAN,HASH_SCAN --transaction-write-set-extraction=XXHASH64 --disconnect-slave-event-count=2 --abort-slave-event-count=1 --replica-parallel-type=LOGICAL_CLOCK --replica-parallel-workers=0 --binlog-transaction-dependency-tracking=WRITESET_SESSION
101+
--let $rpl_server_parameters = --binlog_format=ROW --sync-relay-log-info=10005 --master-info-repository=TABLE --master-info-file=$mi_file --log-bin-use-v1-row-events --skip-replica-start --relay-log-info-repository=FILE --relay-log-info-file=$rli_file --slave-rows-search-algorithms=INDEX_SCAN,HASH_SCAN --transaction-write-set-extraction=XXHASH64 --replica-parallel-type=LOGICAL_CLOCK --replica-parallel-workers=0 --binlog-transaction-dependency-tracking=WRITESET_SESSION
104102
}
105103

106104
if ($i == 1)
@@ -162,8 +160,6 @@ while($i > 0) {
162160
The syntax '--relay-log-info-file' is deprecated and will be removed in a future release.
163161
The syntax '--slave-rows-search-algorithms' is deprecated and will be removed in a future release.
164162
The syntax '--transaction-write-set-extraction' is deprecated and will be removed in a future release.
165-
The syntax '--disconnect-slave-event-count' is deprecated and will be removed in a future release.
166-
The syntax '--abort-slave-event-count' is deprecated and will be removed in a future release.
167163
The syntax '--replica-parallel-type' is deprecated and will be removed in a future release.
168164
The syntax '--replica-parallel-workers=0' is deprecated and will be removed in a future release. Please use '--replica-parallel-workers=1' instead.
169165
The syntax '--binlog-transaction-dependency-tracking' is deprecated and will be removed in a future release.

sql/mysqld.cc

+1-19
Original file line numberDiff line numberDiff line change
@@ -10691,11 +10691,6 @@ struct my_option my_long_early_options[] = {
1069110691
*/
1069210692

1069310693
struct my_option my_long_options[] = {
10694-
{"abort-slave-event-count", OPT_ABORT_SLAVE_EVENT_COUNT,
10695-
"Option used by mysql-test for debugging and testing of replication."
10696-
"This option is deprecated and will be removed in a future version. ",
10697-
&abort_slave_event_count, &abort_slave_event_count, nullptr, GET_INT,
10698-
REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
1069910694
{"allow-suspicious-udfs", 0,
1070010695
"Allows use of UDFs consisting of only one symbol xxx() "
1070110696
"without corresponding xxx_init() or xxx_deinit(). That also means "
@@ -10762,14 +10757,8 @@ struct my_option my_long_options[] = {
1076210757
{"default-time-zone", 0, "Set the default time zone.", &default_tz_name,
1076310758
&default_tz_name, nullptr, GET_STR, REQUIRED_ARG, 0, 0, 0, nullptr, 0,
1076410759
nullptr},
10765-
{"disconnect-slave-event-count", OPT_DISCONNECT_SLAVE_EVENT_COUNT,
10766-
"Option used by mysql-test for debugging and testing of replication."
10767-
"This option is deprecated and will be removed in a future version.",
10768-
&disconnect_slave_event_count, &disconnect_slave_event_count, nullptr,
10769-
GET_INT, REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
1077010760
{"exit-info", 'T', "Used for debugging. Use at your own risk.", nullptr,
1077110761
nullptr, nullptr, GET_LONG, OPT_ARG, 0, 0, 0, nullptr, 0, nullptr},
10772-
1077310762
{"external-locking", 0,
1077410763
"Use system (external) locking (disabled by "
1077510764
"default). With this option enabled you can run myisamchk to test "
@@ -12688,13 +12677,6 @@ bool mysqld_get_one_option(int optid,
1268812677
push_deprecated_warn_no_replacement(nullptr,
1268912678
"--transaction-write-set-extraction");
1269012679
break;
12691-
case OPT_DISCONNECT_SLAVE_EVENT_COUNT:
12692-
push_deprecated_warn_no_replacement(nullptr,
12693-
"--disconnect-slave-event-count");
12694-
break;
12695-
case OPT_ABORT_SLAVE_EVENT_COUNT:
12696-
push_deprecated_warn_no_replacement(nullptr, "--abort-slave-event-count");
12697-
break;
1269812680
case OPT_REPLICA_PARALLEL_TYPE:
1269912681
push_deprecated_warn_no_replacement(nullptr, "--replica-parallel-type");
1270012682
break;
@@ -12914,7 +12896,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr) {
1291412896
turn_bit_on;
1291512897

1291612898
// Synchronize @@global.autocommit metadata on --autocommit
12917-
my_option *opt = &my_long_options[3];
12899+
my_option *opt = &my_long_options[2];
1291812900
assert(strcmp(opt->name, "autocommit") == 0);
1291912901
assert(opt->arg_source != nullptr);
1292012902
Sys_autocommit_ptr->set_source_name(opt->arg_source->m_path_name);

sql/options_mysqld.h

-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ enum options_mysqld {
126126
OPT_USE_ADMIN_SSL,
127127
OPT_TRANSACTION_WRITE_SET_EXTRACTION,
128128
OPT_SHOW_SLAVE_AUTH_INFO_DEPRECATED,
129-
OPT_DISCONNECT_SLAVE_EVENT_COUNT,
130-
OPT_ABORT_SLAVE_EVENT_COUNT,
131129
OPT_REPLICA_PARALLEL_TYPE,
132130
OPT_SSL_SESSION_CACHE_TIMEOUT,
133131
OPT_REPLICA_PARALLEL_WORKERS,

sql/rpl_info.h

-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ class Rpl_info : public Slave_reporting_capability {
8181
std::atomic<uint> slave_running;
8282
std::atomic<ulong> slave_run_id;
8383

84-
#ifndef NDEBUG
85-
int events_until_exit;
86-
#endif
87-
8884
/**
8985
Sets the persistency component/handler.
9086

sql/rpl_replica.cc

+1-37
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,7 @@ const ulong mts_worker_underrun_level = 10;
230230
/*
231231
When slave thread exits, we need to remember the temporary tables so we
232232
can re-use them on slave start.
233-
234-
TODO: move the vars below under Master_info
235233
*/
236-
237-
int disconnect_slave_event_count = 0, abort_slave_event_count = 0;
238-
239234
static thread_local Master_info *RPL_MASTER_INFO = nullptr;
240235

241236
/**
@@ -4262,14 +4257,6 @@ static ulong read_event(MYSQL *mysql, MYSQL_RPL *rpl, Master_info *mi,
42624257
DBUG_TRACE;
42634258

42644259
*suppress_warnings = false;
4265-
/*
4266-
my_real_read() will time us out
4267-
We check if we were told to die, and if not, try reading again
4268-
*/
4269-
#ifndef NDEBUG
4270-
if (disconnect_slave_event_count && !(mi->events_until_exit--))
4271-
return packet_error;
4272-
#endif
42734260

42744261
if (mysql_binlog_fetch(mysql, rpl)) {
42754262
uint err{mysql_errno(mysql)};
@@ -4904,12 +4891,7 @@ static int exec_relay_log_event(THD *thd, Relay_log_info *rli,
49044891
*/
49054892
mysql_mutex_lock(&rli->data_lock);
49064893

4907-
Log_event *ev = nullptr;
4908-
#ifndef NDEBUG
4909-
if (!abort_slave_event_count || rli->events_until_exit--)
4910-
#endif
4911-
ev = in;
4912-
4894+
Log_event *ev = in;
49134895
Log_event **ptr_ev = nullptr;
49144896
RLI_current_event_raii rli_c_ev(rli, ev);
49154897

@@ -5349,10 +5331,6 @@ extern "C" void *handle_slave_io(void *arg) {
53495331
/* Inform waiting threads that slave has started */
53505332
mi->slave_run_id++;
53515333

5352-
#ifndef NDEBUG
5353-
mi->events_until_exit = disconnect_slave_event_count;
5354-
#endif
5355-
53565334
thd = new THD; // note that constructor of THD uses DBUG_ !
53575335
THD_CHECK_SENTRY(thd);
53585336
mi->info_thd = thd;
@@ -7000,9 +6978,6 @@ extern "C" void *handle_slave_sql(void *arg) {
70006978
mysql_mutex_lock(&rli->run_lock);
70016979
assert(!rli->slave_running);
70026980
errmsg = nullptr;
7003-
#ifndef NDEBUG
7004-
rli->events_until_exit = abort_slave_event_count;
7005-
#endif
70066981

70076982
thd = new THD; // note that constructor of THD uses DBUG_ !
70086983
thd->thread_stack = (char *)&thd; // remember where our stack is
@@ -7481,14 +7456,6 @@ static int process_io_rotate(Master_info *mi, Rotate_log_event *rev) {
74817456

74827457
if (unlikely(!rev->is_valid())) return 1;
74837458

7484-
#ifndef NDEBUG
7485-
/*
7486-
If we do not do this, we will be getting the first
7487-
rotate event forever, so we need to not disconnect after one.
7488-
*/
7489-
if (disconnect_slave_event_count) mi->events_until_exit++;
7490-
#endif
7491-
74927459
/*
74937460
Master will send a FD event immediately after the Roate event, so don't log
74947461
the current FD event.
@@ -8366,9 +8333,6 @@ int connect_to_master(THD *thd, MYSQL *mysql, Master_info *mi, bool reconnect,
83668333
size_t password_size = sizeof(password);
83678334
DBUG_TRACE;
83688335
set_replica_max_allowed_packet(thd, mysql);
8369-
#ifndef NDEBUG
8370-
mi->events_until_exit = disconnect_slave_event_count;
8371-
#endif
83728336
ulong client_flag = CLIENT_REMEMBER_OPTIONS;
83738337

83748338
/* Always reset public key to remove cached copy */

sql/rpl_replica.h

-3
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,6 @@ int connect_to_master(THD *thd, MYSQL *mysql, Master_info *mi, bool reconnect,
637637
bool net_request_file(NET *net, const char *fname);
638638

639639
extern bool replicate_same_server_id;
640-
641-
extern int disconnect_slave_event_count, abort_slave_event_count;
642-
643640
/* the master variables are defaults read from my.cnf or command line */
644641
extern uint report_port;
645642
extern const char *master_info_file;

0 commit comments

Comments
 (0)