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 13SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; 14SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; 15 16create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb ROW_FORMAT=COMPRESSED; 17 18# Insert enough values to let R-tree split. 19insert into t1 values(1, Point(1,1)); 20insert into t1 values(2, Point(2,2)); 21insert into t1 values(3, Point(3,3)); 22insert into t1 values(4, Point(4,4)); 23insert into t1 values(5, Point(5,5)); 24insert into t1 values(6, Point(6,6)); 25insert into t1 values(7, Point(7,7)); 26insert into t1 values(8, Point(8,8)); 27insert into t1 values(9, Point(9,9)); 28 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; 35insert into t1 select * from t1; 36insert into t1 select * from t1; 37insert into t1 select * from t1; 38insert into t1 select * from t1; 39start transaction; 40insert into t1 select * from t1; 41select count(*) from t1; 42rollback; 43 44check table t1; 45 46select count(*) from t1; 47 48set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))'); 49select count(*) from t1 where MBRWithin(t1.c2, @g1); 50 51set @g1 = ST_GeomFromText('Polygon((10 10,10 800,800 800,800 10,10 10))'); 52select count(*) from t1 where MBRWithin(t1.c2, @g1); 53 54SET @saved_dbug = @@SESSION.debug_dbug; 55SET DEBUG='+d,page_copy_rec_list_start_compress_fail'; 56delete from t1; 57select count(*) from t1 where MBRWithin(t1.c2, @g1); 58SET debug_dbug = @saved_dbug; 59 60--source ../../innodb/include/wait_all_purged.inc 61 62# Clean up. 63drop table t1; 64SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; 65