1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Added syntax and implementation for BACKUP STAGE's

Part of MDEV-5336 Implement LOCK FOR BACKUP

- Changed check of Global_only_lock to also include BACKUP lock.
- We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able
  to downgrade lock during copy_data_between_tables()
This commit is contained in:
Monty
2018-11-13 01:34:37 +02:00
parent 965311ee8b
commit c53aab974b
38 changed files with 3530 additions and 41 deletions

View File

@ -221,7 +221,9 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
!thd->mdl_context.has_locks() ||
thd->handler_tables_hash.records ||
thd->ull_hash.records ||
thd->global_read_lock.is_acquired());
thd->global_read_lock.is_acquired() ||
thd->current_backup_stage != BACKUP_FINISHED
);
/*
Note that if REFRESH_READ_LOCK bit is set then REFRESH_TABLES is set too
@ -243,6 +245,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return 1;
}
/*
Writing to the binlog could cause deadlocks, as we don't log
UNLOCK TABLES