mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
MDEV-13564: Implement innodb_unsafe_truncate=ON for compatibility
While MariaDB Server 10.2 is not really guaranteed to be compatible with Percona XtraBackup 2.4 (for example, the MySQL 5.7 undo log format change that could be present in XtraBackup, but was reverted from MariaDB in MDEV-12289), we do not want to disrupt users who have deployed xtrabackup and MariaDB Server 10.2 in their environments. With this change, MariaDB 10.2 will continue to use the backup-unsafe TRUNCATE TABLE code, so that neither the undo log nor the redo log formats will change in an incompatible way. Undo tablespace truncation will keep using the redo log only. Recovery or backup with old code will fail to shrink the undo tablespace files, but the contents will be recovered just fine. In the MariaDB Server 10.2 series only, we introduce the configuration parameter innodb_unsafe_truncate and make it ON by default. To allow MariaDB Backup (mariabackup) to work properly with TRUNCATE TABLE operations, use loose_innodb_unsafe_truncate=OFF. MariaDB Server 10.3.10 and later releases will always use the backup-safe TRUNCATE TABLE, and this parameter will not be added there. recv_recovery_rollback_active(): Skip row_mysql_drop_garbage_tables() unless innodb_unsafe_truncate=OFF. It is too unsafe to drop orphan tables if RENAME operations are not transactional within InnoDB. LOG_HEADER_FORMAT_10_3: Replaces LOG_HEADER_FORMAT_CURRENT. log_init(), log_group_file_header_flush(), srv_prepare_to_delete_redo_log_files(), innobase_start_or_create_for_mysql(): Choose the redo log format and subformat based on the value of innodb_unsafe_truncate.
This commit is contained in:
parent
07815d9555
commit
3448ceb02a
53 changed files with 6346 additions and 27 deletions
|
|
@ -152,6 +152,9 @@ my_bool srv_read_only_mode;
|
|||
/** store to its own file each table created by an user; data
|
||||
dictionary tables are in the system tablespace 0 */
|
||||
my_bool srv_file_per_table;
|
||||
/** whether to use the MySQL 5.7 WL#6501 TRUNCATE TABLE implementation
|
||||
that does not work with backup */
|
||||
my_bool srv_57_truncate;
|
||||
/** The file format to use on new *.ibd files. */
|
||||
ulint srv_file_format;
|
||||
/** Whether to check file format during startup. A value of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue