diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-19 12:25:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-19 12:25:00 +0300 |
commit | f3fcf5f45c9c09242bfb8762a88c26238458e4c2 (patch) | |
tree | 914f1a5d9bd38b9f9d09d0c39306c80c00e21842 /sql/wsrep_mysqld.cc | |
parent | 475f69b98587c2a0842e3fcbfe515e4362ded973 (diff) | |
parent | 17980e35fafdf0b05c89c11ecafbea96e1cfc5e5 (diff) | |
download | mariadb-git-f3fcf5f45c9c09242bfb8762a88c26238458e4c2.tar.gz |
Merge 10.5 to 10.6
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 0f2fa131f0a..0f150851e4f 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -806,17 +806,20 @@ void wsrep_init_globals() { wsrep_gtid_server.domain_id= wsrep_gtid_domain_id; wsrep_init_sidno(Wsrep_server_state::instance().connected_gtid().id()); - wsrep_init_gtid(); /* Recover last written wsrep gtid */ + wsrep_init_gtid(); if (wsrep_new_cluster) { - wsrep_server_gtid_t gtid= {wsrep_gtid_server.domain_id, - wsrep_gtid_server.server_id, 0}; - wsrep_get_binlog_gtid_seqno(gtid); - wsrep_gtid_server.seqno(gtid.seqno); + /* Start with provided domain_id & server_id found in configuration */ + wsrep_server_gtid_t new_gtid; + new_gtid.domain_id= wsrep_gtid_domain_id; + new_gtid.server_id= global_system_variables.server_id; + new_gtid.seqno= 0; + /* Try to search for domain_id and server_id combination in binlog if found continue from last seqno */ + wsrep_get_binlog_gtid_seqno(new_gtid); + wsrep_gtid_server.gtid(new_gtid); } wsrep_init_schema(); - if (WSREP_ON) { Wsrep_server_state::instance().initialized(); |