Debian Codegraph @

mysql-test/suite/innodb_gis/r/rtree_split.result

raw
1 create table t1 (c1 int, c2 geometry not null SRID 0, spatial index (c2))engine=innodb;
2 insert into t1 values(1, Point(1,1));
3 insert into t1 values(2, Point(2,2));
4 insert into t1 values(3, Point(3,3));
5 insert into t1 values(4, Point(4,4));
6 insert into t1 values(5, Point(5,5));
7 insert into t1 values(6, Point(6,6));
8 insert into t1 values(7, Point(7,7));
9 insert into t1 values(8, Point(8,8));
10 insert into t1 values(9, Point(9,9));
11 insert into t1 select * from t1;
12 insert into t1 select * from t1;
13 insert into t1 select * from t1;
14 insert into t1 select * from t1;
15 insert into t1 select * from t1;
16 insert into t1 select * from t1;
17 SET SESSION debug="+d, rtr_page_need_second_split";
18 insert into t1 select * from t1;
19 SET SESSION debug="-d, rtr_page_need_second_split";
20 delete from t1;
21 insert into t1 values(1, Point(1,1));
22 insert into t1 values(2, Point(2,2));
23 insert into t1 values(3, Point(3,3));
24 insert into t1 values(4, Point(4,4));
25 insert into t1 values(5, Point(5,5));
26 insert into t1 values(6, Point(6,6));
27 insert into t1 values(7, Point(7,7));
28 insert into t1 values(8, Point(8,8));
29 insert into t1 values(9, Point(9,9));
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 rollback;
41 check table t1;
42 Table Op Msg_type Msg_text
43 test.t1 check status OK
44 insert into t1 select * from t1;
45 insert into t1 select * from t1;
46 insert into t1 select * from t1;
47 insert into t1 select * from t1;
48 insert into t1 select * from t1;
49 check table t1;
50 Table Op Msg_type Msg_text
51 test.t1 check status OK
52 select count(*) from t1;
53 count(*)
54 73728
55 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
56 select count(*) from t1 where MBRWithin(t1.c2, @g1);
57 count(*)
58 73728
59 set @g1 = ST_GeomFromText('Polygon((10 10,10 800,800 800,800 10,10 10))');
60 select count(*) from t1 where MBRWithin(t1.c2, @g1);
61 count(*)
62 0
63 drop index c2 on t1;
64 create spatial index idx2 on t1(c2);
65 show create table t1;
66 Table Create Table
67 t1 CREATE TABLE `t1` (
68 `c1` int DEFAULT NULL,
69 `c2` geometry NOT NULL /*!80003 SRID 0 */,
70 SPATIAL KEY `idx2` (`c2`)
71 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
72 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
73 select count(*) from t1 where MBRWithin(t1.c2, @g1);
74 count(*)
75 73728
76 SET GLOBAL innodb_fast_shutdown = 0;
77 # restart: --innodb-read-only
78 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
79 select count(*) from t1 where MBRWithin(t1.c2, @g1);
80 count(*)
81 73728
82 set @g1 = ST_GeomFromText('Polygon((2 2,2 800,800 800,800 2,2 2))');
83 select count(*) from t1 where MBRWithin(t1.c2, @g1);
84 count(*)
85 57344
86 # restart
87 drop table t1;
88 #
89 # Bug #29465567 INNODB: RTREE SPLIT ASSERTION FAILURE
90 #
91 create table t1 (c1 int, c2 geometry not null SRID 0, spatial index (c2))engine=innodb;
92 insert into t1 values(1, Point(1,1));
93 insert into t1 values(2, Point(2,2));
94 insert into t1 values(3, Point(3,3));
95 insert into t1 values(4, Point(4,4));
96 insert into t1 values(5, Point(5,5));
97 insert into t1 values(6, Point(6,6));
98 insert into t1 values(7, Point(7,7));
99 insert into t1 values(8, Point(8,8));
100 insert into t1 values(9, Point(9,9));
101 insert into t1 select * from t1;
102 insert into t1 select * from t1;
103 insert into t1 select * from t1;
104 insert into t1 select * from t1;
105 insert into t1 select * from t1;
106 insert into t1 select * from t1;
107 insert into t1 select * from t1;
108 insert into t1 select * from t1;
109 start transaction;
110 insert into t1 select * from t1;
111 rollback;
112 check table t1;
113 Table Op Msg_type Msg_text
114 test.t1 check status OK
115 insert into t1 select * from t1;
116 insert into t1 select * from t1;
117 insert into t1 select * from t1;
118 insert into t1 select * from t1;
119 SET SESSION debug="+d, rtr_page_need_first_split";
120 insert into t1 select * from t1;
121 SET SESSION debug="-d, rtr_page_need_first_split";
122 drop table t1;