Replication Statements deadlock on the replica. This situation can occur for a single-threaded or multithreaded replica. When  binlog_format=STATEMENT  is set, a warning is issued for DML statements inside XA transactions. When  binlog_format=MIXED  or  binlog_format=ROW  is set, DML statements inside XA transactions are logged using row-based replication, and the potential issue is not present. Prior to MySQL 5.7.7, XA transactions were not compatible with replication at all. This was because an XA transaction that was in  PREPARED  state would be rolled back on clean server shutdown or client disconnect. Similarly, an XA transaction that was in  PREPARED  state would still exist in  PREPARED  state in case the server was shutdown abnormally and then started again, but the contents of the transaction could not be written to the binary log. In both of these situations the XA transaction could not be replicated correctly. Replication can be controlled through the SQL interface using the statements described in this section. Statements are split into a group which controls source servers, a group which controls replica servers, and a group which can be applied to any replication servers. This section discusses statements for managing replication source servers. Section 13.4.2, “SQL Statements for Controlling Replica Servers” , discusses statements for managing replica servers. In addition to the statements described here, the following  SHOW  statements are used with source servers in replication. For information about these statements, see Section 13.7.7, “SHOW Statements” . The binary log is a set of files that contain information about data modifications made by the MySQL server. The log consists of a set of binary log files, plus an index file (see Section 5.4.4, “The Binary Log” ). The  PURGE BINARY LOGS  statement deletes all the binary log files listed in the log index file prior to the specified log file name or date.  BINARY  and  MASTER  are synonyms. Deleted log files also are removed from the list recorded in the index file, so that the given log file becomes the first in the list. PURGE BINARY LOGS  requires the  BINLOG_ADMIN  privilege. This statement has no effect if the server was not started with the  --log-bin  option to enable binary logging. Examples: PURGE BINARY LOGS TO ’mysql-bin.010’; 2740 PURGE { BINARY | MASTER } LOGS { TO ’ log_name ’ | BEFORE  datetime_expr } Note 13.4 Replication Statements 13.4.1 SQL Statements for Controlling Source Servers 13.4.1.1 PURGE BINARY LOGS Statement • SHOW REPLICAS | SHOW SLAVE HOSTS • SHOW MASTER STATUS • SHOW BINLOG EVENTS • SHOW BINARY LOGS