1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed bug in Aria when used with enterprise mariadb-backup

If the backup finished in the middle of a Aria bulk load insert,
which could happen with LOAD DATA INFILE, CREATE ... SELECT etc)
there was a chance that Aria recovery would fail on the backup.

Fixed by ensuring that bulk load operations for Aria are not allowed
under BACKUP LOCK.
I also changed so that the table TRN is updated just before truncate
which ensures that old redo's for the table are ignored.
I also enabled Aria redo for DDL's to be able to repeat REPAIR commands.
Without this change recovery would not work on repaired tables.

Notes:
- We take the backup lock protection at the end of bulk insert (as we
  don't want to keep the lock over a very long running insert).
  If mariadb-backup keeps the backup lock too long,  this may fail with
  a lock timeout. In this case the batch insert will fail and the table
  will be truncated (set to it's original state).
This commit is contained in:
Monty
2022-12-08 12:10:58 +02:00
parent 9044e016c5
commit dd5f4b3625
5 changed files with 126 additions and 54 deletions

View File

@@ -5198,7 +5198,7 @@ public:
return (lower_case_table_names == 2 && !(ha_table_flags() & HA_FILE_BASED));
}
void log_not_redoable_operation(const char *operation);
bool log_not_redoable_operation(const char *operation);
protected:
Handler_share *get_ha_share_ptr();
void set_ha_share_ptr(Handler_share *arg_ha_share);