diff options
author | Monty <monty@mariadb.org> | 2018-11-06 17:05:24 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-12-09 22:12:27 +0200 |
commit | 965311ee8b2bf65e772a121a83fc35b4dd44de5e (patch) | |
tree | 8f1273b19510d912f6ef9ba5b4216ceb93ad9b3b /mysql-test/main/create_or_replace.test | |
parent | f386b70beb5742c4b0e3afe8b34cb0897537e375 (diff) | |
download | mariadb-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 'mysql-test/main/create_or_replace.test')
-rw-r--r-- | mysql-test/main/create_or_replace.test | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test index 4b167663742..1b4994e811f 100644 --- a/mysql-test/main/create_or_replace.test +++ b/mysql-test/main/create_or_replace.test @@ -210,7 +210,7 @@ drop table t1,t3,t4; create database mysqltest2; drop table if exists test.t1,mysqltest2.t2; -create table test.t1 (i int); +create table test.t1 (i int) engine=myisam; create table mysqltest2.t2 like test.t1; lock table test.t1 write, mysqltest2.t2 write; --replace_column 1 # @@ -249,6 +249,26 @@ create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a'; select * from information_schema.metadata_lock_info; create table t1 (i int); drop table t1; + +create table test.t1 (i int) engine=innodb; +create table mysqltest2.t2 like test.t1; +lock table test.t1 write, mysqltest2.t2 write; +--replace_column 1 # +--sorted_result +select * from information_schema.metadata_lock_info; +unlock tables; +drop table test.t1,mysqltest2.t2; + +create table test.t1 (i int) engine=aria transactional=1 checksum=1; +create table mysqltest2.t2 like test.t1; +lock table test.t1 write, mysqltest2.t2 write; +--replace_column 1 # +--sorted_result +select * from information_schema.metadata_lock_info; +unlock tables; +drop table t1; + +create table test.t1 (i int); drop database mysqltest2; --echo # |