summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/galera/disabled.def3
-rw-r--r--sql/wsrep_sst.cc9
-rw-r--r--sql/wsrep_var.cc34
3 files changed, 30 insertions, 16 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 509841a823b..046feac5566 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -23,7 +23,6 @@ galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stm
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_ftwrl : MDEV-21525 galera.galera_ftwrl
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
-galera_ist_mysqldump : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
@@ -34,8 +33,6 @@ galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
galera_split_brain : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade
galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encrypt_with_key
-galera_sst_mysqldump : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock
-galera_sst_mysqldump_with_key : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock
galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting
galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case
galera_var_node_address : MDEV-20485 Galera test failure
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 227cd6b4769..b7a7dadf0dc 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -316,6 +316,9 @@ static bool wsrep_sst_complete (THD* thd,
Wsrep_server_state& server_state= Wsrep_server_state::instance();
enum wsrep::server_state::state state= server_state.state();
bool failed= false;
+ char start_pos_buf[FN_REFLEN];
+ ssize_t len= wsrep::print_to_c_str(sst_gtid, start_pos_buf, FN_REFLEN-1);
+ start_pos_buf[len]='\0';
// Do not call sst_received if we are not in joiner or
// initialized state on server. This is because it
@@ -323,13 +326,13 @@ static bool wsrep_sst_complete (THD* thd,
// in incorrect state.
if ((state == Wsrep_server_state::s_joiner ||
state == Wsrep_server_state::s_initialized))
+ {
Wsrep_server_state::instance().sst_received(client_service,
rcode);
+ WSREP_INFO("SST succeeded for position %s", start_pos_buf);
+ }
else
{
- char start_pos_buf[FN_REFLEN];
- ssize_t len= wsrep::print_to_c_str(sst_gtid, start_pos_buf, FN_REFLEN-1);
- start_pos_buf[len]='\0';
WSREP_ERROR("SST failed for position %s initialized %d server_state %s",
start_pos_buf,
server_state.is_initialized(),
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 266ff9459ac..dea388d30de 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -233,12 +233,24 @@ bool wsrep_set_local_position(THD* thd, const char* const value,
size_t const uuid_len= wsrep_uuid_scan(value, length, &uuid);
wsrep_seqno_t const seqno= strtoll(value + uuid_len + 1, NULL, 10);
- if (sst) {
+ char start_pos_buf[FN_REFLEN];
+ memcpy(start_pos_buf, value, length);
+ start_pos_buf[length]='\0';
+
+ // If both are same as WSREP_START_POSITION_ZERO just set local
+ if (!strcmp(start_pos_buf, WSREP_START_POSITION_ZERO) &&
+ !strcmp(wsrep_start_position, WSREP_START_POSITION_ZERO))
+ goto set;
+ else
+ WSREP_INFO("SST setting local position to %s current %s", start_pos_buf, wsrep_start_position);
+
+ if (sst)
return (wsrep_sst_received (thd, uuid, seqno, NULL, 0));
- } else {
- local_uuid= uuid;
- local_seqno= seqno;
- }
+
+set:
+ local_uuid= uuid;
+ local_seqno= seqno;
+
return false;
}
@@ -255,9 +267,14 @@ bool wsrep_start_position_check (sys_var *self, THD* thd, set_var* var)
var->save_result.string_value.length);
start_pos_buf[var->save_result.string_value.length]= 0;
+
+ WSREP_DEBUG("SST wsrep_start_position check for new position %s old %s",
+ start_pos_buf, wsrep_start_position);
+
// Verify the format.
if (wsrep_start_position_verify(start_pos_buf)) return true;
+
// Give error if position is updated when wsrep is not enabled or
// provider is not loaded.
if ((!WSREP_ON || !Wsrep_server_state::instance().is_provider_loaded())
@@ -274,13 +291,10 @@ bool wsrep_start_position_check (sys_var *self, THD* thd, set_var* var)
As part of further verification, we try to update the value and catch
errors (if any) only when value actually has been changed.
*/
- if (strcmp(start_pos_buf, wsrep_start_position))
- {
- if (wsrep_set_local_position(thd, var->save_result.string_value.str,
+ if (wsrep_set_local_position(thd, var->save_result.string_value.str,
var->save_result.string_value.length,
true))
- goto err;
- }
+ goto err;
return false;