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

MDEV-18465 Logging of DDL statements during backup

Many of the changes was needed to be able to collect and print engine
name and table version id's in the ddl log.
This commit is contained in:
Monty
2021-03-30 17:06:55 +03:00
committed by Sergei Golubchik
parent 496a14e187
commit 83e529eced
46 changed files with 1841 additions and 145 deletions

View File

@ -36,6 +36,10 @@ connection default;
create table t1 (a int) engine=innodb;
connection con2;
backup stage start;
connection default;
start transaction;
# Acquires MDL lock
insert into t1 values (1);
@ -49,7 +53,6 @@ let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table metadata lock";
--source include/wait_condition.inc
backup stage start;
backup stage flush;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
#
@ -227,6 +230,28 @@ connection default;
select * from t1;
drop table t1;
--echo #
--echo # Check if BACKUP STAGE BLOCK_DDL blocks create view
--echo #
create table t1 (a int) engine=innodb;
connection con1;
backup stage start;
backup stage block_ddl;
connection default;
--send create view v1 as select * from t1;
connection con1;
--sleep 2
select count(*) = 1 from information_schema.processlist;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for backup lock";
backup stage end;
connection default;
--reap # create
drop table t1;
drop view v1;
#
# End of tests using con1 and con2
#