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