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
5 --source include/have_innodb_max_16k.inc
6 --source include/have_debug.inc
7 --source include/big_test.inc
8 # Valgrind takes too much time on PB2 even in the --big-test runs.
9 --source include/not_valgrind.inc
10
11 # Create table with R-tree index.
12 SET GLOBAL innodb_file_per_table=1;
13
14 #Create table with R-tree index.
15 create table t1 (c1 int, c2 geometry not null SRID 0, spatial index (c2))engine=innodb ROW_FORMAT=COMPRESSED;
16
17 # Insert enough values to let R-tree split.
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 start transaction;
39 insert into t1 select * from t1;
40 select count(*) from t1;
41 rollback;
42
43 check table t1;
44
45 select count(*) from t1;
46
47 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
48 select count(*) from t1 where MBRWithin(t1.c2, @g1);
49
50 set @g1 = ST_GeomFromText('Polygon((10 10,10 800,800 800,800 10,10 10))');
51 select count(*) from t1 where MBRWithin(t1.c2, @g1);
52
53 SET DEBUG='+d,page_copy_rec_list_start_compress_fail';
54 delete from t1;
55 SET DEBUG='-d,page_copy_rec_list_start_compress_fail';
56
57
58 select count(*) from t1 where MBRWithin(t1.c2, @g1);
59
60 # Clean up.
61 drop table t1;