diff options
author | Monty <monty@mariadb.org> | 2018-11-13 01:34:37 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-12-09 22:12:27 +0200 |
commit | c53aab974bef7d98810409029d996e89677d2f68 (patch) | |
tree | 5ea7b1ed09f9b85802d8093e38b9193812cb4a87 /sql/sys_vars.cc | |
parent | 965311ee8b2bf65e772a121a83fc35b4dd44de5e (diff) | |
download | mariadb-git-c53aab974bef7d98810409029d996e89677d2f68.tar.gz |
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()
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index cf3067ca801..e8044ef9035 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2585,13 +2585,15 @@ static Sys_var_ulong Sys_read_buff_size( static bool check_read_only(sys_var *self, THD *thd, set_var *var) { /* Prevent self dead-lock */ - if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction()) + if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction() || + thd->current_backup_stage != BACKUP_FINISHED) { my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0)); return true; } return false; } + static bool fix_read_only(sys_var *self, THD *thd, enum_var_type type) { bool result= true; |