From 494adde6fbd9d5b3ec194ec3aef5ba7e88cc987c Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 16:07:33 +0800 Subject: [PATCH] Backport BUG#41613 Slave I/O status inconsistent between SHOW SLAVE STATUS and START SLAVE There are three internal status for slave I/O thread, both MYSQL_SLAVE_RUN_NOT_CONNECT and MYSQL_SLAVE_NOT_RUN are reported as 'No' for Slave_IO_running of command SHOW SLAVE STATUS. Change MYSQL_SLAVE_RUN_NOT_CONNECT to be reported as 'Connecting'. --- sql/slave.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/slave.cc b/sql/slave.cc index 4c13841875c..47842cce225 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1848,7 +1848,8 @@ bool show_master_info(THD* thd, Master_info* mi) protocol->store((ulonglong) mi->rli.group_relay_log_pos); protocol->store(mi->rli.group_master_log_name, &my_charset_bin); protocol->store(mi->slave_running == MYSQL_SLAVE_RUN_CONNECT ? - "Yes" : "No", &my_charset_bin); + "Yes" : (mi->slave_running == MYSQL_SLAVE_RUN_NOT_CONNECT ? + "Connecting" : "No"), &my_charset_bin); protocol->store(mi->rli.slave_running ? "Yes":"No", &my_charset_bin); protocol->store(rpl_filter->get_do_db()); protocol->store(rpl_filter->get_ignore_db());