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 8set global aria_log_file_size=4294959104; 9 10--disable_warnings 11drop database if exists mysqltest; 12--enable_warnings 13create database mysqltest; 14 15connect (admin, localhost, root,,mysqltest,,); 16--enable_reconnect 17 18connection default; 19use mysqltest; 20--enable_reconnect 21 22# checkpoints can make log unrepeatable 23let $def_checkinterval=`select @@global.aria_checkpoint_interval`; 24set global aria_checkpoint_interval=0; 25 26# Prepare table to help for big load 27create table t2 (a varchar(100)) engine=myisam; 28insert into t2 select repeat('z',100); 29insert into t2 select * from t2; 30insert into t2 select * from t2; 31insert into t2 select * from t2; 32insert into t2 select * from t2; 33insert into t2 select * from t2; 34insert 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 42create table t1 (a varchar(100)) engine=aria transactional=1; 43show create table t1; 44--replace_regex /; .+aria_log/aria_log/ 45show engine aria logs; 46 47insert into t1 values('a'); 48insert into t1 select * from t2; 49--replace_regex /; .+aria_log/aria_log/ 50show engine aria logs; 51select count(*) from t1; 52 53# optimization because table is empty 54-- source include/maria_empty_logs.inc 55truncate table t1; 56insert into t1 select * from t2; 57--replace_regex /; .+aria_log/aria_log/ 58show engine aria logs; 59select count(*) from t1; 60 61drop table t1; 62 63# same for CREATE SELECT 64 65# no optimization because table not empty 66-- source include/maria_empty_logs.inc 67create table t1 (a varchar(100)) engine=aria transactional=1; 68insert into t1 values('a'); 69create table if not exists t1 select * from t2; 70--replace_regex /; .+aria_log/aria_log/ 71show engine aria logs; 72 73# optimization because table is empty 74-- source include/maria_empty_logs.inc 75drop table t1; 76create table t1 engine=aria transactional=1 select * from t2; 77--replace_regex /; .+aria_log/aria_log/ 78show engine aria logs; 79 80drop database mysqltest; 81 82--disable_result_log 83--disable_query_log 84eval set global aria_checkpoint_interval=$def_checkinterval; 85--enable_result_log 86--enable_query_log 87