Skip to content

Commit

Permalink
MDEV-25292 backup_log improved
Browse files Browse the repository at this point in the history
Separate backup_log_print per each test case group.
  • Loading branch information
midenok committed Aug 31, 2022
1 parent 93c8252 commit 34398a2
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 163 deletions.
26 changes: 25 additions & 1 deletion mysql-test/main/backup_log.inc
Expand Up @@ -7,7 +7,7 @@
# non-partitioned testing

--echo #
--echo # Testing with normal tables
--echo # Testing normal tables
--echo #

eval create table t1 (a int) engine=myisam $part_int;
Expand All @@ -20,6 +20,8 @@ repair table t1;
optimize table t1;
drop table t1;

--source backup_log_print.inc

eval create table t1_innodb (a int) engine=innodb $part_int;
insert into t1_innodb values (1),(2);
alter table t1_innodb add column b int;
Expand All @@ -30,6 +32,8 @@ repair table t1_innodb;
optimize table t1_innodb;
drop table t1_innodb;

--source backup_log_print.inc

--echo #
--echo # Testing with temporary tables (should not be logged)
--echo #
Expand All @@ -41,6 +45,8 @@ rename table tmp_t11 to tmp_t10;
truncate table tmp_t10;
drop table tmp_t10;

--source backup_log_print.inc

--echo #
--echo # Testing with mix of normal and temporary tables
--echo #
Expand All @@ -54,6 +60,8 @@ eval create table t21 (a int) $part_int;
drop temporary table if exists tmp_t21,t21;
drop table if exists tmp_t21,t21;

--source backup_log_print.inc

--echo #
--echo # Testing create select
--echo #
Expand All @@ -68,6 +76,8 @@ eval create or replace table t31 (a int primary key) $part_int select * from t30
eval create table t32 (a int) $part_int;
drop table if exists t30,t31,t32,tmp_t30;

--source backup_log_print.inc

--echo #
--echo # Testing create LIKE
--echo #
Expand All @@ -81,6 +91,8 @@ create or replace table t42 like t41;
show create table t42;
drop table t40, t41, t42;

--source backup_log_print.inc

--echo #
--echo # Testing rename
--echo #
Expand All @@ -91,6 +103,8 @@ rename table t50 to t52, t51 to t53;
rename table t52 to tmp, t53 to t52, tmp to t53;
drop table t52,t53;

--source backup_log_print.inc

--echo #
--echo # Testing enable/disable keys
--echo #
Expand All @@ -107,6 +121,8 @@ INSERT INTO t61 VALUES(1),(2),(3);
ALTER TABLE t61 DISABLE KEYS;
DROP TABLE t61;

--source backup_log_print.inc

--echo #
--echo # Testing load data
--echo #
Expand All @@ -128,13 +144,17 @@ insert into t71 select * from t70;
unlock tables;
drop table t70,t71;

--source backup_log_print.inc

--echo #
--echo # Testing strange table names
--echo #

eval create table `t 1` (a int) $part_int;
drop table `t 1`;

--source backup_log_print.inc

--echo #
--echo # Testing views and triggers
--echo #
Expand All @@ -146,10 +166,14 @@ drop trigger trg;
drop view v1;
drop table t80;

--source backup_log_print.inc

--echo #
--echo # Testing alter to a new storage engine
--echo #

eval create table t85 (a int primary key, b int) engine=myisam $part_int;
alter table t85 engine=innodb;
drop table t85;

--source backup_log_print.inc

0 comments on commit 34398a2

Please sign in to comment.