Commit cea083af authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: use THD_STAGE_INFO, not thd_proc_info

and put master-slave.inc *last* in the series of includes
parent cb7c9967
#
# Ensure that Seconds_Behind_Master works correctly on the parallel replica.
#
--source include/master-slave.inc
--source include/have_log_bin.inc
--source include/have_debug.inc
--source include/master-slave.inc
--echo #
--echo # MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas
......
......@@ -44,8 +44,6 @@ rpl_slave_state *rpl_global_gtid_slave_state;
/* Object used for MASTER_GTID_WAIT(). */
gtid_waiting rpl_global_gtid_waiting;
const char *const Relay_log_info::state_delaying_string = "Waiting until MASTER_DELAY seconds after master executed event";
Relay_log_info::Relay_log_info(bool is_slave_recovery, const char* thread_name)
:Slave_reporting_capability(thread_name),
replicate_same_server_id(::replicate_same_server_id),
......
......@@ -506,11 +506,6 @@ class Relay_log_info : public Slave_reporting_capability
m_flags&= ~flag;
}
/**
Text used in THD::proc_info when the slave SQL thread is delaying.
*/
static const char *const state_delaying_string;
bool flush();
/**
......@@ -533,7 +528,7 @@ class Relay_log_info : public Slave_reporting_capability
{
mysql_mutex_assert_owner(&data_lock);
sql_delay_end= delay_end;
thd_proc_info(sql_driver_thd, state_delaying_string);
THD_STAGE_INFO(sql_driver_thd, stage_sql_thd_waiting_until_delay);
}
int32 get_sql_delay() { return sql_delay; }
......
......@@ -3324,7 +3324,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
// to ensure that we use the same value throughout this function.
const char *slave_sql_running_state=
mi->rli.sql_driver_thd ? mi->rli.sql_driver_thd->proc_info : "";
if (slave_sql_running_state == Relay_log_info::state_delaying_string)
if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
{
time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end();
protocol->store((uint32)(t < sql_delay_end ? sql_delay_end - t : 0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment