Skip to content

Commit 0f7fece

Browse files
author
Jan Lindström
committed
Revert "MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]"
This reverts commit a0f711e.
1 parent 62e320c commit 0f7fece

File tree

5 files changed

+2
-148
lines changed

5 files changed

+2
-148
lines changed

mysql-test/suite/galera/r/galera_gtid_server_id.result

Lines changed: 0 additions & 82 deletions
This file was deleted.

mysql-test/suite/galera/t/galera_gtid_server_id.cnf

Lines changed: 0 additions & 16 deletions
This file was deleted.

mysql-test/suite/galera/t/galera_gtid_server_id.test

Lines changed: 0 additions & 27 deletions
This file was deleted.

sql/sys_vars.cc

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3223,21 +3223,6 @@ static Sys_var_charptr_fscs Sys_secure_file_priv(
32233223
PREALLOCATED READ_ONLY GLOBAL_VAR(opt_secure_file_priv),
32243224
CMD_LINE(REQUIRED_ARG), DEFAULT(0));
32253225

3226-
static bool check_server_id(sys_var *self, THD *thd, set_var *var)
3227-
{
3228-
#ifdef WITH_WSREP
3229-
if (WSREP_ON && WSREP_PROVIDER_EXISTS && !wsrep_new_cluster && wsrep_gtid_mode)
3230-
{
3231-
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
3232-
ER_WRONG_VALUE_FOR_VAR,
3233-
"Can't change server_id because wsrep and wsrep_gtid_mode is set."
3234-
" You can set server_id only with wsrep_new_cluster. ");
3235-
return true;
3236-
}
3237-
#endif /* WITH_WSREP */
3238-
return false;
3239-
}
3240-
32413226
static bool fix_server_id(sys_var *self, THD *thd, enum_var_type type)
32423227
{
32433228
if (type == OPT_GLOBAL)
@@ -3262,7 +3247,7 @@ Sys_server_id(
32623247
"replication partners",
32633248
SESSION_VAR(server_id), CMD_LINE(REQUIRED_ARG, OPT_SERVER_ID),
32643249
VALID_RANGE(1, UINT_MAX32), DEFAULT(1), BLOCK_SIZE(1), NO_MUTEX_GUARD,
3265-
NOT_IN_BINLOG, ON_CHECK(check_server_id), ON_UPDATE(fix_server_id));
3250+
NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_server_id));
32663251

32673252
static Sys_var_on_access_global<Sys_var_mybool,
32683253
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_COMPRESSED_PROTOCOL>

sql/wsrep_mysqld.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ int wsrep_init_server()
802802

803803
void wsrep_init_globals()
804804
{
805+
wsrep_gtid_server.domain_id= wsrep_gtid_domain_id;
805806
wsrep_init_sidno(Wsrep_server_state::instance().connected_gtid().id());
806807
/* Recover last written wsrep gtid */
807808
wsrep_init_gtid();
@@ -816,13 +817,6 @@ void wsrep_init_globals()
816817
wsrep_get_binlog_gtid_seqno(new_gtid);
817818
wsrep_gtid_server.gtid(new_gtid);
818819
}
819-
else
820-
{
821-
if (wsrep_gtid_mode && wsrep_gtid_server.server_id != global_system_variables.server_id)
822-
{
823-
WSREP_WARN("Ignoring server id for non bootstrap node.");
824-
}
825-
}
826820
wsrep_init_schema();
827821
if (WSREP_ON)
828822
{

0 commit comments

Comments
 (0)