Debian Codegraph @

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

raw
1 # WL#6745 InnoDB R-tree support
2 # This test case will test R-tree split.
3
4
5 --source include/big_test.inc
6 --source include/not_valgrind.inc
7
8 # Create table with R-tree index.
9 create table t1 (c1 int, c2 geometry not null SRID 0, spatial index (c2))engine=innodb;
10
11 # Insert enough values to let R-tree split.
12 insert into t1 values(1, Point(1,1));
13 insert into t1 values(2, Point(2,2));
14 insert into t1 values(3, Point(3,3));
15 insert into t1 values(4, Point(4,4));
16 insert into t1 values(5, Point(5,5));
17 insert into t1 values(6, Point(6,6));
18 insert into t1 values(7, Point(7,7));
19 insert into t1 values(8, Point(8,8));
20 insert into t1 values(9, Point(9,9));
21
22 insert into t1 select * from t1;
23 insert into t1 select * from t1;
24 insert into t1 select * from t1;
25 insert into t1 select * from t1;
26 insert into t1 select * from t1;
27 insert into t1 select * from t1;
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 start transaction;
35 insert into t1 select * from t1;
36 select count(*) from t1;
37 rollback;
38 check table t1;
39
40 select count(*) from t1;
41
42 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
43 select count(*) from t1 where MBRWithin(t1.c2, @g1);
44
45 set @g1 = ST_GeomFromText('Polygon((10 10,10 800,800 800,800 10,10 10))');
46 select count(*) from t1 where MBRWithin(t1.c2, @g1);
47
48 # Clean up.
49 drop table t1;
50