Avoiding the "An optimized (without redo logging) DDL operation has been performed" Error with MySQL Server 5.7
When performing backups with MySQL 5.7, you might encounter errors due to optimized DDL operations skipping the redo log. To avoid this, Xtrabackup offers the `--lock-ddl-per-table` option, which helps ensure data consistency during backups.
Why Use `--lock-ddl-per-table`?
MySQL 5.7 introduced a feature where certain DDL operations bypass redo logging, which can lead to inconsistent backups. By using `--lock-ddl-per-table`, you can place metadata locks (MDL) on individual tables during the backup process, preventing DDL operations from causing inconsistencies.
Using `--lock-ddl-per-table` helps maintain backup consistency by locking tables at the metadata level during the backup process, thereby avoiding issues caused by optimized DDL operations.
For more detailed information, visit the Percona Blog on avoiding redo logging errors.