IO_BEFORE_GTIDS

IO_BEFORE_GTIDS is an event in MySQL binary logs occurring before GTIDs (Global Transaction Identifiers). It specifies that all following events, until a corresponding IO_AFTER_GTIDs event is found, are transactions that were incomplete at the time the previous binary log was being closed. This corresponds with events occurring before the RESET MASTER or RESET SLAVE statement.

Example:

SHOW BINARY LOGS;
PURGE BINARY LOGS BEFORE 'mysql-bin.00003' IO_BEFORE_GTIDS;

Output:

Query OK, 0 rows affected (0.02 sec)

Explanation:

In the example code, the binary logs before ‘mysql-bin.00003’ are purged. IO_BEFORE_GTIDS ensures that any transactions, present in the purged binary logs and not committed yet by any replication slave, will not be removed. The output indicates the successful execution of the query with 0 rows affected.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.