| 1 |
# test of cases where we can safely disable logging |
| 2 |
|
| 3 |
--source include/have_maria.inc |
| 4 |
# can't restart server in embedded |
| 5 |
--source include/not_embedded.inc |
| 6 |
--source include/default_charset.inc |
| 7 |
|
| 8 |
set global aria_log_file_size=4294959104; |
| 9 |
|
| 10 |
--disable_warnings |
| 11 |
drop database if exists mysqltest; |
| 12 |
--enable_warnings |
| 13 |
create database mysqltest; |
| 14 |
|
| 15 |
connect (admin, localhost, root,,mysqltest,,); |
| 16 |
--enable_reconnect |
| 17 |
|
| 18 |
connection default; |
| 19 |
use mysqltest; |
| 20 |
--enable_reconnect |
| 21 |
|
| 22 |
# checkpoints can make log unrepeatable |
| 23 |
let $def_checkinterval=`select @@global.aria_checkpoint_interval`; |
| 24 |
set global aria_checkpoint_interval=0; |
| 25 |
|
| 26 |
# Prepare table to help for big load |
| 27 |
create table t2 (a varchar(100)) engine=myisam; |
| 28 |
insert into t2 select repeat('z',100); |
| 29 |
insert into t2 select * from t2; |
| 30 |
insert into t2 select * from t2; |
| 31 |
insert into t2 select * from t2; |
| 32 |
insert into t2 select * from t2; |
| 33 |
insert into t2 select * from t2; |
| 34 |
insert into t2 select * from t2; |
| 35 |
|
| 36 |
# INSERT SELECT |
| 37 |
|
| 38 |
# no optimization because table not empty |
| 39 |
|
| 40 |
# SHOW ENGINE ARIA LOGS could be influenced by older logs |
| 41 |
-- source include/maria_empty_logs.inc |
| 42 |
create table t1 (a varchar(100)) engine=aria transactional=1; |
| 43 |
show create table t1; |
| 44 |
--replace_regex /; .+aria_log/aria_log/ |
| 45 |
show engine aria logs; |
| 46 |
|
| 47 |
insert into t1 values('a'); |
| 48 |
insert into t1 select * from t2; |
| 49 |
--replace_regex /; .+aria_log/aria_log/ |
| 50 |
show engine aria logs; |
| 51 |
select count(*) from t1; |
| 52 |
|
| 53 |
# optimization because table is empty |
| 54 |
-- source include/maria_empty_logs.inc |
| 55 |
truncate table t1; |
| 56 |
insert into t1 select * from t2; |
| 57 |
--replace_regex /; .+aria_log/aria_log/ |
| 58 |
show engine aria logs; |
| 59 |
select count(*) from t1; |
| 60 |
|
| 61 |
drop table t1; |
| 62 |
|
| 63 |
# same for CREATE SELECT |
| 64 |
|
| 65 |
# no optimization because table not empty |
| 66 |
-- source include/maria_empty_logs.inc |
| 67 |
create table t1 (a varchar(100)) engine=aria transactional=1; |
| 68 |
insert into t1 values('a'); |
| 69 |
create table if not exists t1 select * from t2; |
| 70 |
--replace_regex /; .+aria_log/aria_log/ |
| 71 |
show engine aria logs; |
| 72 |
|
| 73 |
# optimization because table is empty |
| 74 |
-- source include/maria_empty_logs.inc |
| 75 |
drop table t1; |
| 76 |
create table t1 engine=aria transactional=1 select * from t2; |
| 77 |
--replace_regex /; .+aria_log/aria_log/ |
| 78 |
show engine aria logs; |
| 79 |
|
| 80 |
drop database mysqltest; |
| 81 |
|
| 82 |
--disable_result_log |
| 83 |
--disable_query_log |
| 84 |
eval set global aria_checkpoint_interval=$def_checkinterval; |
| 85 |
--enable_result_log |
| 86 |
--enable_query_log |