mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
cleanup: remove OPT_WSREP_START_POSITION and OPT_WSREP_SST_AUTH
there is no reason to initialize wsrep start position and auth from inside the get_one_option() callback
This commit is contained in:
@ -8772,12 +8772,6 @@ mysqld_get_one_option(int optid,
|
||||
case OPT_LOWER_CASE_TABLE_NAMES:
|
||||
lower_case_table_names_used= 1;
|
||||
break;
|
||||
case OPT_WSREP_START_POSITION:
|
||||
wsrep_start_position_init (argument);
|
||||
break;
|
||||
case OPT_WSREP_SST_AUTH:
|
||||
wsrep_sst_auth_init (argument);
|
||||
break;
|
||||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
case OPT_DEBUG_SYNC_TIMEOUT:
|
||||
/*
|
||||
|
@ -599,8 +599,6 @@ enum options_mysqld
|
||||
OPT_WANT_CORE,
|
||||
OPT_MYSQL_COMPATIBILITY,
|
||||
OPT_MYSQL_TO_BE_IMPLEMENTED,
|
||||
OPT_WSREP_START_POSITION,
|
||||
OPT_WSREP_SST_AUTH,
|
||||
OPT_which_is_always_the_last
|
||||
};
|
||||
#endif
|
||||
|
@ -4553,7 +4553,7 @@ static Sys_var_charptr Sys_wsrep_sst_receive_address(
|
||||
|
||||
static Sys_var_charptr Sys_wsrep_sst_auth(
|
||||
"wsrep_sst_auth", "Authentication for SST connection",
|
||||
PREALLOCATED GLOBAL_VAR(wsrep_sst_auth), CMD_LINE(REQUIRED_ARG, OPT_WSREP_SST_AUTH),
|
||||
PREALLOCATED GLOBAL_VAR(wsrep_sst_auth), CMD_LINE(REQUIRED_ARG),
|
||||
IN_SYSTEM_CHARSET, DEFAULT(NULL), NO_MUTEX_GUARD,
|
||||
NOT_IN_BINLOG,
|
||||
ON_CHECK(wsrep_sst_auth_check),
|
||||
@ -4582,7 +4582,7 @@ static Sys_var_mybool Sys_wsrep_on (
|
||||
static Sys_var_charptr Sys_wsrep_start_position (
|
||||
"wsrep_start_position", "global transaction position to start from ",
|
||||
PREALLOCATED GLOBAL_VAR(wsrep_start_position),
|
||||
CMD_LINE(REQUIRED_ARG, OPT_WSREP_START_POSITION),
|
||||
CMD_LINE(REQUIRED_ARG),
|
||||
IN_SYSTEM_CHARSET, DEFAULT(WSREP_START_POSITION_ZERO),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG,
|
||||
ON_CHECK(wsrep_start_position_check),
|
||||
|
@ -66,10 +66,11 @@ handlerton *wsrep_hton;
|
||||
*/
|
||||
void wsrep_register_hton(THD* thd, bool all)
|
||||
{
|
||||
if (thd->wsrep_exec_mode != TOTAL_ORDER && !thd->wsrep_apply_toi)
|
||||
if (WSREP(thd) && thd->wsrep_exec_mode != TOTAL_ORDER &&
|
||||
!thd->wsrep_apply_toi)
|
||||
{
|
||||
THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
|
||||
for (Ha_trx_info *i= trans->ha_list; WSREP(thd) && i; i = i->next())
|
||||
for (Ha_trx_info *i= trans->ha_list; i; i = i->next())
|
||||
{
|
||||
if ((i->ht()->db_type == DB_TYPE_INNODB) ||
|
||||
(i->ht()->db_type == DB_TYPE_TOKUDB))
|
||||
|
@ -572,6 +572,11 @@ int wsrep_init()
|
||||
int rcode= -1;
|
||||
DBUG_ASSERT(wsrep_inited == 0);
|
||||
|
||||
if (strcmp(wsrep_start_position, WSREP_START_POSITION_ZERO))
|
||||
wsrep_start_position_init(wsrep_start_position);
|
||||
|
||||
wsrep_sst_auth_init(wsrep_sst_auth);
|
||||
|
||||
wsrep_causal_reads_update(&global_system_variables);
|
||||
|
||||
mysql_mutex_register("sql", wsrep_mutexes, array_elements(wsrep_mutexes));
|
||||
|
Reference in New Issue
Block a user