Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.4Mb
PDF (A4) - 35.6Mb
PDF (RPM) - 33.8Mb
EPUB - 8.5Mb
HTML Download (TGZ) - 8.3Mb
HTML Download (Zip) - 8.4Mb
HTML Download (RPM) - 7.2Mb
Eclipse Doc Plugin (TGZ) - 9.2Mb
Eclipse Doc Plugin (Zip) - 11.3Mb
Man Pages (TGZ) - 198.4Kb
Man Pages (Zip) - 302.4Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
Excerpts from this Manual

23.9.11.6 The replication_applier_status_by_worker Table

In MySQL 5.7.9 and later, if the slave is not multi-threaded, this table shows the status of the applier thread. (Previously, this table was empty in such cases, and this information was reported in the replication_applier_status_by_coordinator table; see Bug #74765, Bug #20001173.) Otherwise, the slave uses multiple worker threads and a coordinator thread to manage them, and this table shows the status of the worker threads. This table was added in MySQL 5.7.2 as replication_execute_status_by_worker, and renamed replication_applier_status_by_worker in MySQL 5.7.6. For a multi-threaded slave, the replication_applier_status_by_coordinator table shows the status of the coordinator thread.

The replication_applier_status_by_worker table has these columns:

  • CHANNEL_NAME

    The replication channel which this row is displaying. There is always a default replication channel, and more replication channels can be added. See Section 18.2.3, “Replication Channels” for more information.

  • WORKER_ID

    The worker identifier (same value as the id column in the mysql.slave_worker_info table). After STOP SLAVE, the THREAD_ID column becomes NULL, but the WORKER_ID value is preserved.

  • THREAD_ID

    The worker thread ID.

  • SERVICE_STATE

    ON (thread exists and is active or idle) or OFF (thread no longer exists).

  • LAST_SEEN_TRANSACTION

    The transaction that the worker has last seen. The worker has not necessarily applied this transaction because it could still be in the process of doing so.

    If the gtid_mode system variable value is OFF, this column is ANONYMOUS, indicating that transactions do not have global transaction identifiers (GTIDs) and are identified by file and position only.

    If gtid_mode is ON, the column value is defined as follows:

    • If no transaction has executed, the column is empty.

    • When a transaction has executed, the column is set from gtid_next as soon as gtid_next is set. From this moment, the column always shows a GTID.

    • The GTID is preserved until the next transaction is executed. If an error occurs, the column value is the GTID of the transaction being executed by the worker when the error occurred.

    • When the next GTID log event is picked up by this worker thread, this column is updated from gtid_next soon after gtid_next is set.

  • LAST_ERROR_NUMBER, LAST_ERROR_MESSAGE

    The error number and error message of the most recent error that caused the worker thread to stop. An error number of 0 and message of the empty string mean no error. If the LAST_ERROR_MESSAGE value is not empty, the error values also appear in the slave's error log.

    Issuing RESET MASTER or RESET SLAVE resets the values shown in these columns.

    All error codes and messages displayed in the LAST_ERROR_NUMBER and LAST_ERROR_MESSAGE columns correspond to error values listed in Section B.3, “Server Error Codes and Messages”.

  • LAST_ERROR_TIMESTAMP

    A timestamp in YYMMDD HH:MM:SS format that shows when the most recent worker error occurred.

The following table shows the correspondence between replication_applier_status_by_worker columns and SHOW SLAVE STATUS columns.

replication_applier_status_by_worker ColumnSHOW SLAVE STATUS Column
WORKER_IDNone
THREAD_IDNone
SERVICE_STATENone
LAST_SEEN_TRANSACTIONNone
LAST_ERROR_NUMBERLast_SQL_Errno
LAST_ERROR_MESSAGELast_SQL_Error
LAST_ERROR_TIMESTAMPLast_SQL_Error_Timestamp

User Comments
Sign Up Login You must be logged in to post a comment.