| 1 |
# WL#6745 InnoDB R-tree support |
| 2 |
# This test case will test R-tree multi level split. |
| 3 |
|
| 4 |
|
| 5 |
--source include/have_debug.inc |
| 6 |
--source include/big_test.inc |
| 7 |
--source include/not_valgrind.inc |
| 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 |
delimiter |; |
| 13 |
create procedure insert_t1(IN total int) |
| 14 |
begin |
| 15 |
declare i int default 1; |
| 16 |
while (i <= total) DO |
| 17 |
insert into t1 values (i, Point(i, i)); |
| 18 |
set i = i + 1; |
| 19 |
end while; |
| 20 |
end| |
| 21 |
delimiter ;| |
| 22 |
|
| 23 |
# Test level 3 rtree. |
| 24 |
CALL insert_t1(70000); |
| 25 |
|
| 26 |
CALL insert_t1(90); |
| 27 |
CALL insert_t1(90); |
| 28 |
CALL insert_t1(83); |
| 29 |
|
| 30 |
insert into t1 values (0, Point(0.9, 0.9)); |
| 31 |
|
| 32 |
# Check table. |
| 33 |
check table t1; |
| 34 |
|
| 35 |
drop procedure insert_t1; |
| 36 |
drop table t1; |