Skip to content

Commit 88d89ee

Browse files
committed
Less abort_loop references
Removed redundant initialisation in unireg_init(): already done by mysql_init_variables(). Slave threads already check THD::killed, which eliminates the need to check abort_loop. Removed unused wsrep_kill_mysql().
1 parent 5a796f1 commit 88d89ee

File tree

5 files changed

+4
-24
lines changed

5 files changed

+4
-24
lines changed

sql/init.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "mariadb.h"
2525
#include "sql_priv.h"
2626
#include "init.h"
27-
#include "mysqld.h" // abort_loop, ...
27+
#include "mysqld.h"
2828
#include "my_time.h" // my_init_time
2929
#include "unireg.h" // SPECIAL_SAME_DB_NAME
3030
#include <m_ctype.h>
@@ -34,8 +34,6 @@ void unireg_init(ulong options)
3434
DBUG_ENTER("unireg_init");
3535

3636
error_handler_hook = my_message_stderr;
37-
abort_loop=0;
38-
3937
my_disable_async_io=1; /* aioread is only in shared library */
4038
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
4139

sql/slave.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ handle_slave_background(void *arg __attribute__((unused)))
510510
&old_stage);
511511
for (;;)
512512
{
513-
stop= abort_loop || thd->killed || slave_background_thread_stop;
513+
stop= thd->killed || slave_background_thread_stop;
514514
kill_list= slave_background_kill_list;
515515
create_list= slave_background_gtid_pos_create_list;
516516
pending_deletes= slave_background_gtid_pending_delete_flag;
@@ -1474,7 +1474,7 @@ static bool io_slave_killed(Master_info* mi)
14741474
DBUG_ENTER("io_slave_killed");
14751475

14761476
DBUG_ASSERT(mi->slave_running); // tracking buffer overrun
1477-
DBUG_RETURN(mi->abort_slave || abort_loop || mi->io_thd->killed);
1477+
DBUG_RETURN(mi->abort_slave || mi->io_thd->killed);
14781478
}
14791479

14801480
/**
@@ -1499,7 +1499,7 @@ static bool sql_slave_killed(rpl_group_info *rgi)
14991499

15001500
DBUG_ASSERT(rli->sql_driver_thd == thd);
15011501
DBUG_ASSERT(rli->slave_running == 1);// tracking buffer overrun
1502-
if (abort_loop || rli->sql_driver_thd->killed || rli->abort_slave)
1502+
if (rli->sql_driver_thd->killed || rli->abort_slave)
15031503
{
15041504
/*
15051505
The transaction should always be binlogged if OPTION_KEEP_LOG is

sql/slave.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ void slave_background_gtid_pos_create_request
278278
(rpl_slave_state::gtid_pos_table *table_entry);
279279
void slave_background_gtid_pending_delete_request(void);
280280

281-
extern bool volatile abort_loop;
282281
extern Master_info *active_mi; /* active_mi for multi-master */
283282
extern Master_info *default_master_info; /* To replace active_mi */
284283
extern Master_info_index *master_info_index;

sql/wsrep_mysqld.cc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2375,22 +2375,6 @@ void wsrep_wait_appliers_close(THD *thd)
23752375
*/
23762376
}
23772377

2378-
void wsrep_kill_mysql(THD *thd)
2379-
{
2380-
if (mysqld_server_started)
2381-
{
2382-
if (!abort_loop)
2383-
{
2384-
WSREP_INFO("starting shutdown");
2385-
kill_mysql(thd);
2386-
}
2387-
}
2388-
else
2389-
{
2390-
unireg_abort(1);
2391-
}
2392-
}
2393-
23942378
void
23952379
wsrep_last_committed_id(wsrep_gtid_t* gtid)
23962380
{

sql/wsrep_mysqld.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ extern int wsrep_wait_committing_connections_close(int wait_time);
195195
extern void wsrep_close_applier(THD *thd);
196196
extern void wsrep_wait_appliers_close(THD *thd);
197197
extern void wsrep_close_applier_threads(int count);
198-
extern void wsrep_kill_mysql(THD *thd);
199198

200199

201200
/* new defines */

0 commit comments

Comments
 (0)