summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-11-06 17:05:24 +0200
committerMonty <monty@mariadb.org>2018-12-09 22:12:27 +0200
commit965311ee8b2bf65e772a121a83fc35b4dd44de5e (patch)
tree8f1273b19510d912f6ef9ba5b4216ceb93ad9b3b /sql/table.cc
parentf386b70beb5742c4b0e3afe8b34cb0897537e375 (diff)
downloadmariadb-git-965311ee8b2bf65e772a121a83fc35b4dd44de5e.tar.gz
Added new MDL_BACKUP locks for all backup stages
Part of MDEV-5336 Implement LOCK FOR BACKUP - Added new locks to MDL_BACKUP for all stages of backup locks and a new MDL lock needed for backup stages. - Renamed MDL_BACKUP_STMT to MDL_BACKUP_DDL - flush_tables() takes a new parameter that decides what should be flushed. - InnoDB, Aria (transactional tables with checksums), Blackhole, Federated and Federatedx tables are marked to be safe for online backup. We are using MDL_BACKUP_TRANS_DML instead of MDL_BACKUP_DML locks for these which allows any DML's to proceed for these tables during the whole backup process until BACKUP STAGE COMMIT which will block the final commit.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 8630320090f..b68edd064f5 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3561,6 +3561,8 @@ partititon_err:
share->no_replicate= TRUE;
if (outparam->file->table_cache_type() & HA_CACHE_TBL_NOCACHE)
share->not_usable_by_query_cache= TRUE;
+ if (outparam->file->ha_table_flags() & HA_CAN_ONLINE_BACKUPS)
+ share->online_backup= 1;
}
if (share->no_replicate || !binlog_filter->db_ok(share->db.str))