mariadb/mysql-test/suite/mariabackup/truncate_during_backup.result
Marko Mäkelä d6f7fd6016 MDEV-13564: Refuse MLOG_TRUNCATE in mariabackup
The MySQL 5.7 TRUNCATE TABLE is inherently incompatible
with hot backup, because it is creating and deleting a separate
log file, and it is not writing redo log for all changes of the
InnoDB data dictionary tables. Refuse to create a corrupted backup
if the unsafe form of TRUNCATE was executed.

Note: Undo log tablespace truncation cannot be detected easily.
Also it is incompatible with backup, for similar reasons.

xtrabackup_backup_func(): "Subscribe to" the log events before
the first invocation of xtrabackup_copy_logfile().

recv_parse_or_apply_log_rec_body(): If the function pointer
log_truncate is set, invoke it to report MLOG_TRUNCATE.
2018-08-16 16:10:18 +03:00

4 lines
141 B
Text

CREATE TABLE t1 ENGINE=InnoDB SELECT 1;
DROP TABLE t1;
SET GLOBAL innodb_log_checkpoint_now=1;
SET GLOBAL innodb_log_checkpoint_now=DEFAULT;