Debian Codegraph @

mysql-test/suite/innodb_gis/t/rtree_compress.test

raw
1 # WL#6745 InnoDB R-tree support
2 # This test case will test R-tree split.
3
4 # Not supported in embedded
5 --source include/not_embedded.inc
6
7 --source include/innodb_page_size_small.inc
8 --source include/have_debug.inc
9 --source include/big_test.inc
10 # Valgrind takes too much time on PB2 even in the --big-test runs.
11 --source include/not_valgrind.inc
12
13 create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb ROW_FORMAT=COMPRESSED STATS_PERSISTENT=0;
14
15 # Insert enough values to let R-tree split.
16 lock tables t1 write;
17 start transaction;
18 insert into t1 values(1, Point(1,1));
19 insert into t1 values(2, Point(2,2));
20 insert into t1 values(3, Point(3,3));
21 insert into t1 values(4, Point(4,4));
22 insert into t1 values(5, Point(5,5));
23 insert into t1 values(6, Point(6,6));
24 insert into t1 values(7, Point(7,7));
25 insert into t1 values(8, Point(8,8));
26 insert into t1 values(9, Point(9,9));
27
28 insert into t1 select * from t1;
29 insert into t1 select * from t1;
30 insert into t1 select * from t1;
31 insert into t1 select * from t1;
32 insert into t1 select * from t1;
33 insert into t1 select * from t1;
34 insert into t1 select * from t1;
35 insert into t1 select * from t1;
36 insert into t1 select * from t1;
37 insert into t1 select * from t1;
38 commit;
39 unlock tables;
40 start transaction;
41 insert into t1 select * from t1;
42 select count(*) from t1;
43 rollback;
44
45 check table t1;
46
47 select count(*) from t1;
48
49 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
50 select count(*) from t1 where MBRWithin(t1.c2, @g1);
51
52 set @g1 = ST_GeomFromText('Polygon((10 10,10 800,800 800,800 10,10 10))');
53 select count(*) from t1 where MBRWithin(t1.c2, @g1);
54
55 SET @saved_dbug = @@SESSION.debug_dbug;
56 SET DEBUG_DBUG='+d,page_copy_rec_list_start_compress_fail';
57 delete from t1;
58 select count(*) from t1 where MBRWithin(t1.c2, @g1);
59 SET debug_dbug = @saved_dbug;
60
61 --source ../../innodb/include/wait_all_purged.inc
62
63 # Clean up.
64 drop table t1;