Buy Percona SupportBuy Now

Lock-Free SHOW SLAVE STATUS

The STOP SLAVE and SHOW SLAVE STATUS commands can conflict due to a global lock in the situation where one thread on a slave attempts to execute a STOP SLAVE command, while a second thread on the slave is already running a command that takes a long time to execute.

If a STOP SLAVE command is given in this situation, it will wait and not complete execution until the long-executing thread has completed its task. If another thread now executes a SHOW SLAVE STATUS command while the STOP SLAVE command is waiting to complete, the SHOW SLAVE STATUS command will not be able to execute while the STOP SLAVE command is waiting.

This features modifies the SHOW SLAVE STATUS syntax to allow:

SHOW SLAVE STATUS NOLOCK

This will display the slave’s status as if there were no lock, allowing the user to detect and understand the situation that is occurring.

NOTE: The information given when NOLOCK is used may be slightly inconsistent with the actual situation while the lock is being held.

Status Variables

variable Com_show_slave_status_nolock
Variable Type:Numeric
Scope:Global/Session

The Com_show_slave_status_nolock statement counter variable indicates the number of times the statement SHOW SLAVE STATUS NOLOCK has been executed.

Version Specific Information

This documentation is developed in Launchpad as part of the Percona Server 5.5.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.


General Inquiries

For general inquiries, please send us your question and someone will contact you.