maria-purge.test 3.66 KB
Newer Older
1 2 3 4 5 6 7 8
-- source include/have_maria.inc
-- source include/big_test.inc
let $default=`select @@global.storage_engine`;
set global storage_engine=maria;
set session storage_engine=maria;
let $def_logsize=`select @@global.maria_log_file_size`;
let $def_checkinterval=`select @@global.maria_checkpoint_interval`;

9
set global maria_log_file_size=4294967295;
10 11 12 13 14 15 16 17 18 19 20 21 22
# Initialise
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
SET SQL_WARNINGS=1;

CREATE TABLE t1 (
  STRING_DATA char(255) default NULL
);
CREATE TABLE t2 (
  STRING_DATA char(255) default NULL
);

unknown's avatar
unknown committed
23

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
48 49 50 51 52 53

set global maria_log_file_size=16777216;
eval set global maria_checkpoint_interval=$def_checkinterval;
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;

54 55 56 57
insert into t2 select * from t1;
insert into t1 select * from t2;


unknown's avatar
unknown committed
58 59

eval set global maria_checkpoint_interval=$def_checkinterval;
60 61 62 63
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;
set global maria_log_file_size=16777216;
select @@global.maria_log_file_size;
unknown's avatar
unknown committed
64
eval set global maria_checkpoint_interval=$def_checkinterval;
65 66 67 68 69 70 71
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;
set global maria_log_file_size=8388608;
select @@global.maria_log_file_size;

set global maria_log_purge_type=at_flush;
insert into t1 select * from t2;
unknown's avatar
unknown committed
72
eval set global maria_checkpoint_interval=$def_checkinterval;
73 74 75 76 77 78 79 80 81
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;
flush logs;
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;

set global maria_log_file_size=16777216;
set global maria_log_purge_type=external;
insert into t1 select * from t2;
unknown's avatar
unknown committed
82
eval set global maria_checkpoint_interval=$def_checkinterval;
83 84 85 86 87 88 89 90
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;
flush logs;
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;

set global maria_log_purge_type=immediate;
insert into t1 select * from t2;
unknown's avatar
unknown committed
91
eval set global maria_checkpoint_interval=$def_checkinterval;
92 93 94 95 96 97 98 99 100 101 102 103 104
--replace_regex /Size +[0-9]+ ; .+master-data/master-data/
SHOW ENGINE maria logs;

drop table t1, t2;

--disable_result_log
--disable_query_log
set global maria_log_purge_type=immediate;
eval set global storage_engine=$default;
eval set global maria_log_file_size=$def_logsize;
eval set global maria_checkpoint_interval=$def_checkinterval;
--enable_result_log
--enable_query_log