diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-25 21:57:52 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-25 21:57:52 +0300 |
commit | fbe2712705d464bf8488df249c36115e2c1f63f7 (patch) | |
tree | 274e728c719611769288afcb10f79549f6e11f8c /sql/slave.cc | |
parent | 62903434eb009cb0bcd5003b0a45914bd4c09886 (diff) | |
parent | a19782522b1eac52d72f5e787b5d96f1fd1a2cb7 (diff) | |
download | mariadb-git-fbe2712705d464bf8488df249c36115e2c1f63f7.tar.gz |
Merge 10.4 into 10.5
The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1
(MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 754c8df3638..381417c353b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3476,7 +3476,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, { protocol->store((uint32) mi->rli.retried_trans); protocol->store((ulonglong) mi->rli.max_relay_log_size); - protocol->store((uint32) mi->rli.executed_entries); + protocol->store(mi->rli.executed_entries); protocol->store((uint32) mi->received_heartbeats); protocol->store((double) mi->heartbeat_period, 3, &tmp); protocol->store(gtid_pos->ptr(), gtid_pos->length(), &my_charset_bin); @@ -3996,7 +3996,8 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, exec_res= ev->apply_event(rgi); #ifdef WITH_WSREP - if (WSREP_ON) { + if (WSREP(thd)) { + if (exec_res) { mysql_mutex_lock(&thd->LOCK_thd_data); switch(thd->wsrep_trx().state()) { @@ -4574,7 +4575,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, } } - thread_safe_increment64(&rli->executed_entries); + rli->executed_entries++; #ifdef WITH_WSREP wsrep_after_statement(thd); #endif /* WITH_WSREP */ @@ -5650,7 +5651,7 @@ pthread_handler_t handle_slave_sql(void *arg) if (exec_relay_log_event(thd, rli, serial_rgi)) { #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { mysql_mutex_lock(&thd->LOCK_thd_data); @@ -5668,8 +5669,10 @@ pthread_handler_t handle_slave_sql(void *arg) if (!sql_slave_killed(serial_rgi)) { slave_output_error_info(serial_rgi, thd); - if (WSREP_ON && rli->last_error().number == ER_UNKNOWN_COM_ERROR) + if (WSREP(thd) && rli->last_error().number == ER_UNKNOWN_COM_ERROR) + { wsrep_node_dropped= TRUE; + } } goto err; } @@ -5806,7 +5809,7 @@ err_during_init: If slave stopped due to node going non primary, we set global flag to trigger automatic restart of slave when node joins back to cluster. */ - if (WSREP_ON && wsrep_node_dropped && wsrep_restart_slave) + if (WSREP(thd) && wsrep_node_dropped && wsrep_restart_slave) { if (wsrep_ready_get()) { |