summaryrefslogtreecommitdiff
path: root/sql/wsrep_sst.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2021-01-22 12:12:42 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2021-01-22 12:12:42 +0200
commitce141d0714207afb70911abce21c2a4055b8a9e9 (patch)
treece8c3d0f5ec990d7177d9cc8cd335ca6c4fbfa41 /sql/wsrep_sst.cc
parentbe5fce16a0d4104b216818438ca624bfaa19497a (diff)
downloadmariadb-git-ce141d0714207afb70911abce21c2a4055b8a9e9.tar.gz
MDEV-24463 : galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lockbb-10.4-MDEV-24463
We need to complete SST if both new and old start positions are not same as initial positions. If they are initial positions just set local uuid and seqno.
Diffstat (limited to 'sql/wsrep_sst.cc')
-rw-r--r--sql/wsrep_sst.cc9
1 files changed, 6 insertions, 3 deletions
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(),