Replication Relay and Status Logs


During replication, a slave server creates several logs that hold the binary log events relayed from the master to the slave, and to record information about the current status and location within the relay log. There are three types of logs used in the process, listed here:

In order for replication to be crash-safe when using tables for logging status and relay information, the tables must use a transactional storage engine, such as InnoDB. Beginning with MariaDB 5.6.6, these tables are created using InnoDB. (Bug #13538891)

In MariaDB 5.6.5 and earlier, the slave_master_info and slave_relay_log_info tables used MyISAM by default, which meant that it was necessary before starting replication to change the storage engine used by these tables by issuing ALTER TABLE ... ENGINE=InnoDB, as shown here:

ALTER TABLE mysql.slave_master_info ENGINE=InnoDB;
ALTER TABLE mysql.slave_relay_log_info ENGINE=InnoDB;

The ALTER TABLE statements must be executed by the MariaDB root or other user account with the appropriate privileges on the MariaDB database. You should not attempt to do this while replication is running; beginning with MariaDB 5.6.3, trying to execute an ALTER TABLE on either these tables while replication is ongoing is disallowed. Starting with MariaDB 5.6.4, execution of any statement requiring a write lock on either or both of these tables is disallowed while replication is ongoing, while statements that perform only reads are permitted at any time.Important

Do not attempt to update or insert rows in the slave_master_info or slave_relay_log_info table manually. Doing so can cause undefined behavior, and is not supported.

Prior to MariaDB 5.6.4, mysqldump did not dump the replication log tables unless they were specified by name and the --master-data option was used.

Retornar