mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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().
This commit is contained in:
parent
5a796f1f41
commit
88d89ee0ba
5 changed files with 4 additions and 24 deletions
|
@ -24,7 +24,7 @@
|
|||
#include "mariadb.h"
|
||||
#include "sql_priv.h"
|
||||
#include "init.h"
|
||||
#include "mysqld.h" // abort_loop, ...
|
||||
#include "mysqld.h"
|
||||
#include "my_time.h" // my_init_time
|
||||
#include "unireg.h" // SPECIAL_SAME_DB_NAME
|
||||
#include <m_ctype.h>
|
||||
|
@ -34,8 +34,6 @@ void unireg_init(ulong options)
|
|||
DBUG_ENTER("unireg_init");
|
||||
|
||||
error_handler_hook = my_message_stderr;
|
||||
abort_loop=0;
|
||||
|
||||
my_disable_async_io=1; /* aioread is only in shared library */
|
||||
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
|
||||
|
||||
|
|
|
@ -510,7 +510,7 @@ handle_slave_background(void *arg __attribute__((unused)))
|
|||
&old_stage);
|
||||
for (;;)
|
||||
{
|
||||
stop= abort_loop || thd->killed || slave_background_thread_stop;
|
||||
stop= thd->killed || slave_background_thread_stop;
|
||||
kill_list= slave_background_kill_list;
|
||||
create_list= slave_background_gtid_pos_create_list;
|
||||
pending_deletes= slave_background_gtid_pending_delete_flag;
|
||||
|
@ -1474,7 +1474,7 @@ static bool io_slave_killed(Master_info* mi)
|
|||
DBUG_ENTER("io_slave_killed");
|
||||
|
||||
DBUG_ASSERT(mi->slave_running); // tracking buffer overrun
|
||||
DBUG_RETURN(mi->abort_slave || abort_loop || mi->io_thd->killed);
|
||||
DBUG_RETURN(mi->abort_slave || mi->io_thd->killed);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1499,7 +1499,7 @@ static bool sql_slave_killed(rpl_group_info *rgi)
|
|||
|
||||
DBUG_ASSERT(rli->sql_driver_thd == thd);
|
||||
DBUG_ASSERT(rli->slave_running == 1);// tracking buffer overrun
|
||||
if (abort_loop || rli->sql_driver_thd->killed || rli->abort_slave)
|
||||
if (rli->sql_driver_thd->killed || rli->abort_slave)
|
||||
{
|
||||
/*
|
||||
The transaction should always be binlogged if OPTION_KEEP_LOG is
|
||||
|
|
|
@ -278,7 +278,6 @@ void slave_background_gtid_pos_create_request
|
|||
(rpl_slave_state::gtid_pos_table *table_entry);
|
||||
void slave_background_gtid_pending_delete_request(void);
|
||||
|
||||
extern bool volatile abort_loop;
|
||||
extern Master_info *active_mi; /* active_mi for multi-master */
|
||||
extern Master_info *default_master_info; /* To replace active_mi */
|
||||
extern Master_info_index *master_info_index;
|
||||
|
|
|
@ -2375,22 +2375,6 @@ void wsrep_wait_appliers_close(THD *thd)
|
|||
*/
|
||||
}
|
||||
|
||||
void wsrep_kill_mysql(THD *thd)
|
||||
{
|
||||
if (mysqld_server_started)
|
||||
{
|
||||
if (!abort_loop)
|
||||
{
|
||||
WSREP_INFO("starting shutdown");
|
||||
kill_mysql(thd);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unireg_abort(1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
wsrep_last_committed_id(wsrep_gtid_t* gtid)
|
||||
{
|
||||
|
|
|
@ -195,7 +195,6 @@ extern int wsrep_wait_committing_connections_close(int wait_time);
|
|||
extern void wsrep_close_applier(THD *thd);
|
||||
extern void wsrep_wait_appliers_close(THD *thd);
|
||||
extern void wsrep_close_applier_threads(int count);
|
||||
extern void wsrep_kill_mysql(THD *thd);
|
||||
|
||||
|
||||
/* new defines */
|
||||
|
|
Loading…
Add table
Reference in a new issue