Debian Codegraph @

mysql-test/suite/maria/maria-recovery-big.test

raw
1 # Aria recovery test which cannot run in shared memory
2 # because it generates too much data, or which takes a lot of time.
3
4 --source include/not_embedded.inc
5 # Don't test this under valgrind, memory leaks will occur as we crash
6 --source include/not_valgrind.inc
7 # Binary must be compiled with debug for crash to occur
8 --source include/have_debug.inc
9 --source include/have_maria.inc
10 --source include/big_test.inc
11
12 set global aria_log_file_size=4294959104;
13
14 --disable_warnings
15 drop database if exists mysqltest;
16 --enable_warnings
17 create database mysqltest;
18 let $mms_tname=t;
19
20 # Include scripts can perform SQL. For it to not influence the main test
21 # they use a separate connection. This way if they use a DDL it would
22 # not autocommit in the main test.
23 connect (admin, localhost, root,,mysqltest,,);
24 --enable_reconnect
25
26 connection default;
27 use mysqltest;
28 --enable_reconnect
29
30 #
31 # Test with big blobs
32 #
33
34 --echo * TEST of recovery with blobs
35 -- source include/maria_empty_logs.inc
36 create table t1 (a int, b longtext) engine=aria table_checksum=1;
37 let $mms_tables=1;
38 -- source include/maria_make_snapshot_for_feeding_recovery.inc
39 insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");
40 -- source include/maria_make_snapshot_for_comparison.inc
41 lock table t1 write;
42 let $loop=20;
43 while ($loop)
44 {
45 update t1 set b=CONCAT(b,b);
46 dec $loop;
47 }
48 select a,length(b) from t1;
49 let $loop=22;
50 while ($loop)
51 {
52 update t1 set b=mid(b,1,length(b)/2);
53 dec $loop;
54 }
55 select a,length(b) from t1;
56 # we want recovery to run on the first snapshot made above
57 let $mvr_restore_old_snapshot=1;
58 let $mms_compare_physically=0;
59 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
60 let $mvr_crash_statement= set global aria_checkpoint_interval=1;
61 -- source include/maria_verify_recovery.inc
62 drop table t1;
63
64 # clean up everything
65 let $mms_purpose=feeding_recovery;
66 eval drop database mysqltest_for_$mms_purpose;
67 let $mms_purpose=comparison;
68 eval drop database mysqltest_for_$mms_purpose;
69 drop database mysqltest;