Hmm. Looking at the test it seems to stop the slave, acquire the locks, restarts the slave and check that the event blocks. If I do the same, I do see the desired behavior: mysql[master]> SHOW CREATE TABLE foo\G *************************** 1. row *************************** Table: foo Create Table: CREATE TABLE `foo` ( `id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql[master]> truncate table foo; Query OK, 0 rows affected (0.00 sec) mysql[slave]> stop slave; Query OK, 0 rows affected (0.00 sec) mysql[slave]> LOCK TABLES FOR BACKUP; Query OK, 0 rows affected (0.00 sec) mysql[slave]> LOCK BINLOG FOR BACKUP; Query OK, 0 rows affected (0.00 sec) mysql[master]> insert into foo values (1); Query OK, 1 row affected (0.00 sec) mysql[slave]> start slave; Query OK, 0 rows affected (0.00 sec) mysql[slave]> SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 15 User: root Host: localhost db: NULL Command: Query Time: 0 State: init Info: SHOW PROCESSLIST Rows_sent: 0 Rows_examined: 0 *************************** 2. row *************************** Id: 19 User: system user Host: db: NULL Command: Connect Time: 15 State: Waiting for master to send event Info: NULL Rows_sent: 0 Rows_examined: 0 *************************** 3. row *************************** Id: 20 User: system user Host: db: NULL Command: Connect Time: 15 State: Waiting for binlog lock Info: NULL Rows_sent: 0 Rows_examined: 0 3 rows in set (0.00 sec) mysql[slave]> unlock tables; Query OK, 0 rows affected (0.00 sec) mysql[slave]> unlock binlog; Query OK, 0 rows affected (0.00 sec) mysql[slave]> show processlist\G *************************** 1. row *************************** Id: 15 User: root Host: localhost db: NULL Command: Query Time: 0 State: init Info: show processlist Rows_sent: 0 Rows_examined: 0 *************************** 2. row *************************** Id: 19 User: system user Host: db: NULL Command: Connect Time: 125 State: Waiting for master to send event Info: NULL Rows_sent: 0 Rows_examined: 0 *************************** 3. row *************************** Id: 20 User: system user Host: db: NULL Command: Connect Time: 53 State: Slave has read all relay log; waiting for the slave I/O thread to update it Info: NULL Rows_sent: 0 Rows_examined: 0 3 rows in set (0.00 sec) However, if I do not stop the slave and just acquire locks then this does not work for innodb tables: mysql[master]> truncate table foo; Query OK, 0 rows affected (0.00 sec) mysql[slave]> LOCK TABLES FOR BACKUP; Query OK, 0 rows affected (0.00 sec) mysql[slave]> LOCK BINLOG FOR BACKUP; Query OK, 0 rows affected (0.00 sec) mysql[slave]> SHOW SLAVE STATUS\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: replication Master_Port: 5619 Connect_Retry: 60 Master_Log_File: bin-log.000002 Read_Master_Log_Pos: 1630 Relay_Log_File: relay-log.000025 Relay_Log_Pos: 583 Relay_Master_Log_File: bin-log.000002 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 1630 Relay_Log_Space: 1003 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 051dab53-27b4-11e4-8b17-a4badb2ab461 Master_Info_File: /opt/slave/data/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 1 row in set (0.00 sec) mysql[master]> insert into foo values (1); Query OK, 1 row affected (0.00 sec) mysql[slave]> SHOW SLAVE STATUS\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: replication Master_Port: 5619 Connect_Retry: 60 Master_Log_File: bin-log.000002 Read_Master_Log_Pos: 1840 Relay_Log_File: relay-log.000025 Relay_Log_Pos: 793 Relay_Master_Log_File: bin-log.000002 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 1840 Relay_Log_Space: 1213 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 051dab53-27b4-11e4-8b17-a4badb2ab461 Master_Info_File: /opt/slave/data/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 1 row in set (0.00 sec) And I see Exec_Master_Log_Pos changes from 1630 -> 1840 If I do some action to a non-InnoDB table, it does block on the table lock: mysql[master]> show create table bar\G *************************** 1. row *************************** Table: bar Create Table: CREATE TABLE `bar` ( `id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql[master]> insert into bar values (1); Query OK, 1 row affected (0.00 sec) mysql[slave]> show processlist\G *************************** 1. row *************************** Id: 15 User: root Host: localhost db: NULL Command: Query Time: 0 State: init Info: show processlist Rows_sent: 0 Rows_examined: 0 *************************** 2. row *************************** Id: 19 User: system user Host: db: NULL Command: Connect Time: 376 State: Waiting for master to send event Info: NULL Rows_sent: 0 Rows_examined: 0 *************************** 3. row *************************** Id: 20 User: system user Host: db: test Command: Connect Time: 36 State: Waiting for backup lock Info: insert into bar values (1) Rows_sent: 0 Rows_examined: 0 3 rows in set (0.00 sec) Or if I release the table lock, it will block on the binlog: mysql[slave]> UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) mysql[slave]> SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 15 User: root Host: localhost db: NULL Command: Query Time: 0 State: init Info: show processlist Rows_sent: 0 Rows_examined: 0 *************************** 2. row *************************** Id: 19 User: system user Host: db: NULL Command: Connect Time: 405 State: Waiting for master to send event Info: NULL Rows_sent: 0 Rows_examined: 0 *************************** 3. row *************************** Id: 20 User: system user Host: db: NULL Command: Connect Time: 65 State: Waiting for binlog lock Info: NULL Rows_sent: 0 Rows_examined: 0 3 rows in set (0.00 sec) And show slave status still shows the initial position 1840, right after the innodb insert: mysql[slave]> SHOW SLAVE STATUS\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: replication Master_Port: 5619 Connect_Retry: 60 Master_Log_File: bin-log.000002 Read_Master_Log_Pos: 2099 Relay_Log_File: relay-log.000025 Relay_Log_Pos: 793 Relay_Master_Log_File: bin-log.000002 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 1840 Relay_Log_Space: 1472 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 93 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 051dab53-27b4-11e4-8b17-a4badb2ab461 Master_Info_File: /opt/slave/data/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Waiting for binlog lock Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 1 row in set (0.00 sec) Is stopping the slave prior to acquiring backup locks an expected action?