Bug #36870 Documentation for Slave_running status is wrong
Submitted: 22 May 2008 2:17 Modified: 22 May 2008 2:38
Reporter: Baron Schwartz (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.45 OS:Any
Assigned to: CPU Architecture:Any

[22 May 2008 2:17] Baron Schwartz
Description:
From the docs: http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html#option_mysqld_Slave_ru...

Slave_running

This is ON if this server is a slave that is connected to a master.

In real life, stopping the slave makes it go to OFF even though it's still connected to a master.

How to repeat:
slave2 [localhost] {msandbox} ((none)) > show status like '%running%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Slave_running   | ON    | 
| Threads_running | 1     | 
+-----------------+-------+
2 rows in set (0.00 sec)

slave2 [localhost] {msandbox} ((none)) > stop slave;
Query OK, 0 rows affected (0.00 sec)

slave2 [localhost] {msandbox} ((none)) > show status like '%running%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Slave_running   | OFF   | 
| Threads_running | 1     | 
+-----------------+-------+

slave2 [localhost] {msandbox} ((none)) > start slave io_thread;
Query OK, 0 rows affected (0.00 sec)

slave2 [localhost] {msandbox} ((none)) > show status like '%running%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Slave_running   | OFF   | 
| Threads_running | 1     | 
+-----------------+-------+

Suggested fix:
It should probably say 

This is ON if this server is a slave that is connected to a master, and both the SQL and I/O threads are running.
[22 May 2008 2:38] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.