Debian Codegraph @

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

raw
1 --source include/not_embedded.inc
2 # Don't test this under valgrind, memory leaks will occur as we crash
3 --source include/not_valgrind.inc
4 # Binary must be compiled with debug for crash to occur
5 --source include/have_debug.inc
6 --source include/have_maria.inc
7 --source include/have_geometry.inc
8 --source include/default_charset.inc
9
10 set global aria_log_file_size=4294967295;
11 let $MARIA_LOG=../../tmp;
12
13 --disable_warnings
14 drop database if exists mysqltest;
15 --enable_warnings
16 create database mysqltest;
17 let $mms_tname=t;
18
19 # Include scripts can perform SQL. For it to not influence the main test
20 # they use a separate connection. This way if they use a DDL it would
21 # not autocommit in the main test.
22 connect (admin, localhost, root,,mysqltest,,);
23 --enable_reconnect
24
25 connection default;
26 use mysqltest;
27 --enable_reconnect
28
29 -- source include/maria_empty_logs.inc
30 let $mms_tables=1;
31 CREATE TABLE t1 (
32 i int,
33 shape GEOMETRY NOT NULL,
34 SPATIAL (shape)
35 ) ENGINE=ARIA;
36 insert into t1 values(1,POINT(1, 1));
37 -- source include/maria_make_snapshot_for_feeding_recovery.inc
38 insert into t1 values(2,POINT(2, 2)), (3,POINT(3, 3)), (4,POINT(4, 4));
39 -- source include/maria_make_snapshot_for_comparison.inc
40 let $mvr_restore_old_snapshot=1;
41 let $mms_compare_physically=0;
42 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
43 let $mvr_crash_statement= set global aria_checkpoint_interval=1;
44 -- source include/maria_verify_recovery.inc
45 show create table t1;
46
47 # Test that UPDATE's effect on auto-increment is recovered
48 --echo * TEST of UPDATE vs state.auto_increment
49 -- source include/maria_make_snapshot_for_feeding_recovery.inc
50 update t1 set shape=POINT(5, 5) where i=2;
51 -- source include/maria_make_snapshot_for_comparison.inc
52 let $mvr_restore_old_snapshot=1;
53 let $mms_compare_physically=0;
54 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
55 let $mvr_crash_statement= set global aria_checkpoint_interval=1;
56 -- source include/maria_verify_recovery.inc
57 show create table t1;
58 drop table t1;
59
60 # clean up everything
61 let $mms_purpose=feeding_recovery;
62 eval drop database mysqltest_for_$mms_purpose;
63 let $mms_purpose=comparison;
64 eval drop database mysqltest_for_$mms_purpose;
65 drop database mysqltest;