Debian Codegraph @

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

raw
1 CREATE TABLE tab(c1 int NOT NULL PRIMARY KEY,c2 POINT NOT NULL SRID 0,
2 c3 LINESTRING NOT NULL SRID 0,c4 POLYGON NOT NULL SRID 0,c5 GEOMETRY NOT NULL SRID 0)
3 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
4 CREATE SPATIAL INDEX idx1 on tab(c2);
5 CREATE SPATIAL INDEX idx2 on tab(c3 ASC) COMMENT 'wl6968';
6 ERROR HY000: Incorrect usage of spatial/fulltext/hash index and explicit index order
7 CREATE SPATIAL INDEX idx2 on tab(c3 DESC) COMMENT 'wl6968';
8 ERROR HY000: Incorrect usage of spatial/fulltext/hash index and explicit index order
9 CREATE SPATIAL INDEX idx3 on tab(c4) KEY_BLOCK_SIZE=8 ;
10 CREATE SPATIAL INDEX idx4 on tab(c5 DESC) KEY_BLOCK_SIZE=4
11 COMMENT 'Spatial index on Geometry type column';
12 ERROR HY000: Incorrect usage of spatial/fulltext/hash index and explicit index order
13 ANALYZE TABLE tab;
14 Table Op Msg_type Msg_text
15 test.tab analyze status OK
16 SHOW INDEXES FROM tab;
17 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression
18 tab 0 PRIMARY 1 c1 A 0 NULL NULL BTREE YES NULL
19 tab 1 idx1 1 c2 A 0 32 NULL SPATIAL YES NULL
20 tab 1 idx3 1 c4 A 0 32 NULL SPATIAL YES NULL
21 INSERT INTO tab(c1,c2,c3,c4,c5)
22 VALUES(1,ST_GeomFromText('POINT(10 10)'),ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'),
23 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'),
24 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
25 INSERT INTO tab(c1,c2,c3,c4,c5)
26 VALUES(2,ST_GeomFromText('POINT(20 20)'),ST_GeomFromText('LINESTRING(20 20,30 30,40 40)'),
27 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'),
28 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'));
29 INSERT INTO tab(c1,c2,c3,c4,c5)
30 VALUES(3,ST_GeomFromText('POINT(4 4)'),ST_GeomFromText('LINESTRING(130 130,140 140,150 150)'),
31 ST_GeomFromText('POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'),
32 ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'));
33 INSERT INTO tab(c1,c2,c3,c4,c5)
34 VALUES(4,ST_GeomFromText('POINT(50 50)'),ST_GeomFromText('LINESTRING(200 200,300 300,400 400)'),
35 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'),
36 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'));
37 INSERT INTO tab(c1,c2,c3,c4,c5)
38 VALUES(5,ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(400 400,500 500,600 700)'),
39 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'),
40 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'));
41 INSERT INTO tab(c1,c2,c3,c4,c5)
42 VALUES(6,ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
43 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'),
44 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'));
45 INSERT INTO tab(c1,c2,c3,c4,c5)
46 VALUES(7,ST_GeomFromText('POINT(60 70)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
47 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
48 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
49 INSERT INTO tab(c1,c2,c3,c4,c5)
50 VALUES(8,ST_GeomFromText('POINT(0 0)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
51 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
52 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
53 INSERT INTO tab(c1,c2,c3,c4,c5)
54 VALUES(9,ST_GeomFromText('POINT(120 120)'),ST_GeomFromText('LINESTRING(100 100,110 110,120 120)'),
55 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'),
56 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'));
57 INSERT INTO tab(c1,c2,c3,c4,c5)
58 VALUES(10,ST_GeomFromText('POINT(160 160)'),ST_GeomFromText('LINESTRING(140 140,150 150,160 160)'),
59 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'),
60 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
61 ANALYZE TABLE tab;
62 Table Op Msg_type Msg_text
63 test.tab analyze status OK
64 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
65 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
66 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
67 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
68 Warnings:
69 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
70 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
71 c1 ST_Astext(c4)
72 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
73 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
74 WHERE MBRContains(tab.c4, @g1);
75 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
76 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
77 Warnings:
78 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
79 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
80 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
81 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
82 Warnings:
83 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
84 SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)');
85 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
86 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
87 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
88 Warnings:
89 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
90 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
91 c1 ST_Astext(c4)
92 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
93 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
94 WHERE MBRContains(tab.c4, @g1);
95 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
96 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
97 Warnings:
98 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
99 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
100 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
101 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
102 Warnings:
103 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
104 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
105 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
106 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
107 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
108 Warnings:
109 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
110 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
111 c1 ST_Astext(c4)
112 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
113 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
114 WHERE MBRWithin(tab.c4, @g1);
115 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
116 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
117 Warnings:
118 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
119 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
120 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
121 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
122 Warnings:
123 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
124 SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))');
125 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
126 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
127 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
128 Warnings:
129 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
130 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
131 c1 ST_Astext(c4)
132 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
133 WHERE ST_Crosses(tab.c4, @g1);
134 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
135 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
136 Warnings:
137 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
138 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
139 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
140 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
141 Warnings:
142 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
143 SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)');
144 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1;
145 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
146 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
147 Warnings:
148 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
149 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
150 c1 ST_Astext(c4)
151 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
152 WHERE ST_Crosses(tab.c4, @g1);
153 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
154 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
155 Warnings:
156 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
157 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
158 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
159 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
160 Warnings:
161 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
162 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
163 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
164 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
165 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 90.00 Using where
166 Warnings:
167 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
168 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
169 c1 ST_Astext(c4)
170 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
171 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
172 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
173 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
174 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
175 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
176 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
177 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
178 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
179 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
180 WHERE MBRDisjoint(tab.c4, @g1);
181 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
182 1 UPDATE tab NULL index idx3 PRIMARY 4 NULL 10 100.00 Using where
183 Warnings:
184 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
185 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
186 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
187 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
188 Warnings:
189 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
190 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
191 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
192 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
193 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
194 Warnings:
195 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
196 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
197 c1 ST_Astext(c4)
198 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
199 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
200 WHERE MBREquals(tab.c4, @g1);
201 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
202 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
203 Warnings:
204 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
205 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
206 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
207 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
208 Warnings:
209 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
210 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
211 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
212 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
213 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
214 Warnings:
215 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
216 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
217 c1 ST_Astext(c4)
218 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
219 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
220 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
221 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
222 WHERE MBRintersects(tab.c4, @g1);
223 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
224 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
225 Warnings:
226 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
227 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
228 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
229 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
230 Warnings:
231 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
232 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
233 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
234 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
235 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
236 Warnings:
237 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
238 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
239 c1 ST_Astext(c4)
240 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
241 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
242 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
243 WHERE MBRintersects(tab.c4, @g1);
244 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
245 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
246 Warnings:
247 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
248 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
249 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
250 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
251 Warnings:
252 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
253 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
254 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
255 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
256 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
257 Warnings:
258 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
259 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
260 c1 ST_Astext(c4)
261 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
262 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
263 WHERE MBROverlaps(tab.c4, @g1);
264 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
265 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
266 Warnings:
267 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
268 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
269 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
270 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
271 Warnings:
272 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
273 SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )');
274 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
275 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
276 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 80.00 Using where
277 Warnings:
278 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
279 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
280 c1 ST_Astext(c4)
281 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
282 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
283 WHERE MBROverlaps(tab.c4, @g1);
284 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
285 1 UPDATE tab NULL range idx3 idx3 34 const 8 100.00 Using where
286 Warnings:
287 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
288 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
289 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
290 1 DELETE tab NULL range idx3 idx3 34 const 8 100.00 Using where
291 Warnings:
292 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
293 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
294 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
295 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
296 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
297 Warnings:
298 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
299 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
300 c1 ST_Astext(c4)
301 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
302 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
303 WHERE ST_Touches(tab.c4, @g1);
304 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
305 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
306 Warnings:
307 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
308 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
309 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
310 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
311 Warnings:
312 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
313 SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)');
314 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
315 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
316 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
317 Warnings:
318 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
319 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
320 c1 ST_Astext(c4)
321 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
322 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
323 WHERE ST_Touches(tab.c4, @g1);
324 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
325 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
326 Warnings:
327 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
328 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
329 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
330 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
331 Warnings:
332 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
333 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
334 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
335 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
336 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
337 Warnings:
338 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
339 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
340 c1 ST_Astext(c4)
341 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
342 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
343 WHERE MBRContains(tab.c4, @g1);
344 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
345 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
346 Warnings:
347 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
348 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
349 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
350 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
351 Warnings:
352 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
353 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
354 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
355 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
356 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
357 Warnings:
358 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
359 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
360 c1 ST_Astext(c4)
361 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
362 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
363 WHERE MBRWithin(tab.c4, @g1);
364 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
365 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
366 Warnings:
367 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
368 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
369 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
370 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
371 Warnings:
372 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
373 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
374 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
375 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
376 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 90.00 Using where
377 Warnings:
378 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
379 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
380 c1 ST_Astext(c4)
381 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
382 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
383 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
384 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
385 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
386 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
387 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
388 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
389 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
390 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
391 WHERE MBRDisjoint(tab.c4, @g1);
392 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
393 1 UPDATE tab NULL index idx3 PRIMARY 4 NULL 10 100.00 Using where
394 Warnings:
395 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
396 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
397 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
398 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
399 Warnings:
400 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
401 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
402 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
403 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
404 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
405 Warnings:
406 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
407 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
408 c1 ST_Astext(c4)
409 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
410 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
411 WHERE MBREquals(tab.c4, @g1);
412 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
413 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
414 Warnings:
415 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
416 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
417 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
418 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
419 Warnings:
420 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
421 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
422 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
423 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
424 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
425 Warnings:
426 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
427 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
428 c1 ST_Astext(c4)
429 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
430 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
431 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
432 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
433 WHERE MBRintersects(tab.c4, @g1);
434 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
435 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
436 Warnings:
437 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
438 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
439 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
440 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
441 Warnings:
442 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
443 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
444 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
445 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
446 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
447 Warnings:
448 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
449 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
450 c1 ST_Astext(c4)
451 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
452 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
453 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
454 WHERE MBRintersects(tab.c4, @g1);
455 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
456 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
457 Warnings:
458 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
459 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
460 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
461 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
462 Warnings:
463 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
464 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
465 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
466 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
467 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
468 Warnings:
469 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
470 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
471 c1 ST_Astext(c4)
472 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
473 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
474 WHERE MBROverlaps(tab.c4, @g1);
475 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
476 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
477 Warnings:
478 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
479 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
480 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
481 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
482 Warnings:
483 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
484 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
485 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
486 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
487 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
488 Warnings:
489 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
490 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
491 c1 ST_Astext(c4)
492 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
493 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
494 WHERE MBRTouches(tab.c4, @g1);
495 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
496 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
497 Warnings:
498 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
499 EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1);
500 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
501 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
502 Warnings:
503 Note 1003 delete from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
504 CREATE PROCEDURE proc_wl6968()
505 BEGIN
506 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
507 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
508 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
509 WHERE MBRContains(tab.c4, @g1);
510 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
511 END |
512 CALL proc_wl6968();
513 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
514 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
515 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
516 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
517 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
518 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
519 Warnings:
520 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
521 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
522 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
523 c1 ST_Astext(c4)
524 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
525 DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
526 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
527 c1 ST_Astext(c4)
528 CHECK TABLE tab;
529 Table Op Msg_type Msg_text
530 test.tab check status OK
531 SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)');
532 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
533 c1 ST_Astext(c4)
534 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
535 DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
536 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
537 c1 ST_Astext(c4)
538 CHECK TABLE tab;
539 Table Op Msg_type Msg_text
540 test.tab check status OK
541 SET @g1 = ST_GeomFromText('POLYGON((100 200,1010 1010,1020 1020,500 300,300 200,100 300,100 200))');
542 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
543 c1 ST_Astext(c4)
544 DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
545 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
546 c1 ST_Astext(c4)
547 CHECK TABLE tab;
548 Table Op Msg_type Msg_text
549 test.tab check status OK
550 SET @g1 = ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))');
551 SET @g2 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
552 UPDATE tab SET C4 = @g2 WHERE ST_Crosses(tab.c4, @g1);
553 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g2) ORDER BY c1;
554 c1 ST_Astext(c4)
555 CHECK TABLE tab;
556 Table Op Msg_type Msg_text
557 test.tab check status OK
558 DROP TABLE tab;
559 DROP PROCEDURE proc_wl6968;
560 CREATE TABLE tab(c1 int ,c2 POINT NOT NULL SRID 0,
561 c3 LINESTRING NOT NULL SRID 0,c4 POLYGON NOT NULL SRID 0,c5 GEOMETRY NOT NULL SRID 0)
562 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
563 CREATE SPATIAL INDEX idx1 on tab(c2);
564 CREATE SPATIAL INDEX idx2 on tab(c3) COMMENT 'wl6968';
565 CREATE SPATIAL INDEX idx3 on tab(c4) KEY_BLOCK_SIZE=2 ;
566 CREATE SPATIAL INDEX idx4 on tab(c5) KEY_BLOCK_SIZE=8
567 COMMENT 'Spatial index on Geometry type column';
568 ANALYZE TABLE tab;
569 Table Op Msg_type Msg_text
570 test.tab analyze status OK
571 SHOW INDEXES FROM tab;
572 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression
573 tab 1 idx1 1 c2 A 0 32 NULL SPATIAL YES NULL
574 tab 1 idx2 1 c3 A 0 32 NULL SPATIAL wl6968 YES NULL
575 tab 1 idx3 1 c4 A 0 32 NULL SPATIAL YES NULL
576 tab 1 idx4 1 c5 A 0 32 NULL SPATIAL Spatial index on Geometry type column YES NULL
577 INSERT INTO tab(c1,c2,c3,c4,c5)
578 VALUES(1,ST_GeomFromText('POINT(10 10)'),ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'),
579 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'),
580 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
581 INSERT INTO tab(c1,c2,c3,c4,c5)
582 VALUES(2,ST_GeomFromText('POINT(20 20)'),ST_GeomFromText('LINESTRING(20 20,30 30,40 40)'),
583 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'),
584 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'));
585 INSERT INTO tab(c1,c2,c3,c4,c5)
586 VALUES(3,ST_GeomFromText('POINT(4 4)'),ST_GeomFromText('LINESTRING(130 130,140 140,150 150)'),
587 ST_GeomFromText('POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'),
588 ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'));
589 INSERT INTO tab(c1,c2,c3,c4,c5)
590 VALUES(4,ST_GeomFromText('POINT(50 50)'),ST_GeomFromText('LINESTRING(200 200,300 300,400 400)'),
591 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'),
592 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'));
593 INSERT INTO tab(c1,c2,c3,c4,c5)
594 VALUES(5,ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(400 400,500 500,600 700)'),
595 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'),
596 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'));
597 INSERT INTO tab(c1,c2,c3,c4,c5)
598 VALUES(6,ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
599 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'),
600 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'));
601 INSERT INTO tab(c1,c2,c3,c4,c5)
602 VALUES(7,ST_GeomFromText('POINT(60 70)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
603 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
604 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
605 INSERT INTO tab(c1,c2,c3,c4,c5)
606 VALUES(8,ST_GeomFromText('POINT(0 0)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
607 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
608 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
609 INSERT INTO tab(c1,c2,c3,c4,c5)
610 VALUES(9,ST_GeomFromText('POINT(120 120)'),ST_GeomFromText('LINESTRING(100 100,110 110,120 120)'),
611 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'),
612 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'));
613 INSERT INTO tab(c1,c2,c3,c4,c5)
614 VALUES(10,ST_GeomFromText('POINT(160 160)'),ST_GeomFromText('LINESTRING(140 140,150 150,160 160)'),
615 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'),
616 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
617 ANALYZE TABLE tab;
618 Table Op Msg_type Msg_text
619 test.tab analyze status OK
620 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
621 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
622 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
623 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
624 Warnings:
625 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
626 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
627 c1 ST_Astext(c4)
628 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
629 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
630 WHERE MBRContains(tab.c4, @g1);
631 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
632 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
633 Warnings:
634 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
635 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
636 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
637 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
638 Warnings:
639 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
640 SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)');
641 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
642 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
643 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
644 Warnings:
645 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
646 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
647 c1 ST_Astext(c4)
648 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
649 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
650 WHERE MBRContains(tab.c4, @g1);
651 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
652 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
653 Warnings:
654 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
655 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
656 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
657 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
658 Warnings:
659 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
660 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
661 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
662 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
663 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
664 Warnings:
665 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
666 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
667 c1 ST_Astext(c4)
668 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
669 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
670 WHERE MBRWithin(tab.c4, @g1);
671 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
672 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
673 Warnings:
674 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
675 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
676 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
677 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
678 Warnings:
679 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
680 SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))');
681 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
682 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
683 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
684 Warnings:
685 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
686 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
687 c1 ST_Astext(c4)
688 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
689 WHERE ST_Crosses(tab.c4, @g1);
690 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
691 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
692 Warnings:
693 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
694 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
695 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
696 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
697 Warnings:
698 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
699 SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)');
700 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1;
701 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
702 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
703 Warnings:
704 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
705 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
706 c1 ST_Astext(c4)
707 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
708 WHERE ST_Crosses(tab.c4, @g1);
709 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
710 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
711 Warnings:
712 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
713 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
714 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
715 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
716 Warnings:
717 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
718 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
719 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
720 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
721 1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 90.00 Using where; Using filesort
722 Warnings:
723 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
724 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
725 c1 ST_Astext(c4)
726 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
727 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
728 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
729 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
730 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
731 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
732 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
733 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
734 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
735 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
736 WHERE MBRDisjoint(tab.c4, @g1);
737 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
738 1 UPDATE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
739 Warnings:
740 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
741 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
742 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
743 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
744 Warnings:
745 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
746 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
747 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
748 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
749 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
750 Warnings:
751 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
752 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
753 c1 ST_Astext(c4)
754 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
755 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
756 WHERE MBREquals(tab.c4, @g1);
757 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
758 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
759 Warnings:
760 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
761 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
762 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
763 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
764 Warnings:
765 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
766 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
767 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
768 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
769 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
770 Warnings:
771 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
772 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
773 c1 ST_Astext(c4)
774 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
775 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
776 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
777 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
778 WHERE MBRintersects(tab.c4, @g1);
779 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
780 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
781 Warnings:
782 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
783 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
784 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
785 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
786 Warnings:
787 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
788 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
789 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
790 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
791 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
792 Warnings:
793 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
794 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
795 c1 ST_Astext(c4)
796 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
797 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
798 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
799 WHERE MBRintersects(tab.c4, @g1);
800 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
801 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
802 Warnings:
803 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
804 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
805 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
806 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
807 Warnings:
808 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
809 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
810 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
811 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
812 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
813 Warnings:
814 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
815 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
816 c1 ST_Astext(c4)
817 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
818 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
819 WHERE MBROverlaps(tab.c4, @g1);
820 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
821 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
822 Warnings:
823 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
824 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
825 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
826 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
827 Warnings:
828 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
829 SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )');
830 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
831 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
832 1 SIMPLE tab NULL range idx3 idx3 34 NULL 8 100.00 Using where; Using filesort
833 Warnings:
834 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
835 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
836 c1 ST_Astext(c4)
837 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
838 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
839 WHERE MBROverlaps(tab.c4, @g1);
840 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
841 1 UPDATE tab NULL range idx3 idx3 34 const 8 100.00 Using where
842 Warnings:
843 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
844 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
845 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
846 1 DELETE tab NULL range idx3 idx3 34 const 8 100.00 Using where
847 Warnings:
848 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
849 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
850 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
851 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
852 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
853 Warnings:
854 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
855 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
856 c1 ST_Astext(c4)
857 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
858 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
859 WHERE ST_Touches(tab.c4, @g1);
860 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
861 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
862 Warnings:
863 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
864 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
865 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
866 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
867 Warnings:
868 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
869 SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)');
870 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
871 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
872 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
873 Warnings:
874 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
875 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
876 c1 ST_Astext(c4)
877 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
878 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
879 WHERE ST_Touches(tab.c4, @g1);
880 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
881 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
882 Warnings:
883 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
884 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
885 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
886 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
887 Warnings:
888 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
889 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
890 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
891 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
892 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
893 Warnings:
894 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
895 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
896 c1 ST_Astext(c4)
897 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
898 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
899 WHERE MBRContains(tab.c4, @g1);
900 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
901 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
902 Warnings:
903 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
904 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
905 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
906 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
907 Warnings:
908 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
909 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
910 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
911 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
912 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
913 Warnings:
914 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
915 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
916 c1 ST_Astext(c4)
917 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
918 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
919 WHERE MBRWithin(tab.c4, @g1);
920 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
921 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
922 Warnings:
923 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
924 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
925 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
926 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
927 Warnings:
928 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
929 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
930 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
931 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
932 1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 90.00 Using where; Using filesort
933 Warnings:
934 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
935 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
936 c1 ST_Astext(c4)
937 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
938 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
939 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
940 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
941 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
942 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
943 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
944 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
945 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
946 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
947 WHERE MBRDisjoint(tab.c4, @g1);
948 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
949 1 UPDATE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
950 Warnings:
951 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
952 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
953 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
954 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
955 Warnings:
956 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
957 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
958 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
959 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
960 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
961 Warnings:
962 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
963 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
964 c1 ST_Astext(c4)
965 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
966 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
967 WHERE MBREquals(tab.c4, @g1);
968 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
969 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
970 Warnings:
971 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
972 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
973 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
974 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
975 Warnings:
976 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
977 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
978 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
979 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
980 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
981 Warnings:
982 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
983 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
984 c1 ST_Astext(c4)
985 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
986 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
987 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
988 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
989 WHERE MBRintersects(tab.c4, @g1);
990 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
991 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
992 Warnings:
993 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
994 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
995 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
996 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
997 Warnings:
998 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
999 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
1000 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1001 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1002 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1003 Warnings:
1004 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1005 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1006 c1 ST_Astext(c4)
1007 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1008 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1009 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1010 WHERE MBRintersects(tab.c4, @g1);
1011 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1012 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1013 Warnings:
1014 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1015 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
1016 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1017 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1018 Warnings:
1019 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1020 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
1021 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1022 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1023 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1024 Warnings:
1025 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1026 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1027 c1 ST_Astext(c4)
1028 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1029 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1030 WHERE MBROverlaps(tab.c4, @g1);
1031 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1032 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1033 Warnings:
1034 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1035 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
1036 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1037 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1038 Warnings:
1039 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1040 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1041 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
1042 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1043 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
1044 Warnings:
1045 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1046 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
1047 c1 ST_Astext(c4)
1048 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1049 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1050 WHERE MBRTouches(tab.c4, @g1);
1051 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1052 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1053 Warnings:
1054 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
1055 EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1);
1056 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1057 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1058 Warnings:
1059 Note 1003 delete from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
1060 CREATE PROCEDURE proc_wl6968()
1061 BEGIN
1062 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
1063 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1064 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1065 WHERE MBREquals(tab.c4, @g1);
1066 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
1067 END |
1068 CALL proc_wl6968();
1069 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1070 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1071 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1072 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1073 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1074 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1075 Warnings:
1076 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
1077 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
1078 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1079 c1 ST_Astext(c4)
1080 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1081 DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
1082 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1083 c1 ST_Astext(c4)
1084 CHECK TABLE tab;
1085 Table Op Msg_type Msg_text
1086 test.tab check status OK
1087 SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))');
1088 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
1089 c1 ST_Astext(c4)
1090 DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
1091 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
1092 c1 ST_Astext(c4)
1093 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
1094 SET @g2 = ST_GeomFromText( 'POLYGON((1 1,2 2,3 3,10 3,5 1,1 1))');
1095 UPDATE tab SET C4 = @g2 WHERE MBROverlaps(tab.c4, @g1);
1096 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1097 c1 ST_Astext(c4)
1098 3 POLYGON((1 1,2 2,3 3,10 3,5 1,1 1))
1099 CHECK TABLE tab;
1100 Table Op Msg_type Msg_text
1101 test.tab check status OK
1102 DROP TABLE tab;
1103 DROP PROCEDURE proc_wl6968;
1104 CREATE TABLE tab(c1 int AUTO_INCREMENT PRIMARY KEY,c2 POINT NOT NULL SRID 0,
1105 c3 LINESTRING NOT NULL SRID 0,c4 POLYGON NOT NULL SRID 0,c5 GEOMETRY NOT NULL SRID 0)
1106 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
1107 CREATE SPATIAL INDEX idx1 on tab(c2);
1108 CREATE SPATIAL INDEX idx2 on tab(c3) COMMENT 'wl6968';
1109 CREATE SPATIAL INDEX idx3 on tab(c4) KEY_BLOCK_SIZE=16 ;
1110 CREATE SPATIAL INDEX idx4 on tab(c5) KEY_BLOCK_SIZE=16
1111 COMMENT 'Spatial index on Geometry type column';
1112 ANALYZE TABLE tab;
1113 Table Op Msg_type Msg_text
1114 test.tab analyze status OK
1115 SHOW INDEXES FROM tab;
1116 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression
1117 tab 0 PRIMARY 1 c1 A 0 NULL NULL BTREE YES NULL
1118 tab 1 idx1 1 c2 A 0 32 NULL SPATIAL YES NULL
1119 tab 1 idx2 1 c3 A 0 32 NULL SPATIAL wl6968 YES NULL
1120 tab 1 idx3 1 c4 A 0 32 NULL SPATIAL YES NULL
1121 tab 1 idx4 1 c5 A 0 32 NULL SPATIAL Spatial index on Geometry type column YES NULL
1122 INSERT INTO tab(c2,c3,c4,c5)
1123 VALUES(ST_GeomFromText('POINT(10 10)'),ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'),
1124 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'),
1125 ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
1126 INSERT INTO tab(c2,c3,c4,c5)
1127 VALUES(ST_GeomFromText('POINT(20 20)'),ST_GeomFromText('LINESTRING(20 20,30 30,40 40)'),
1128 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'),
1129 ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'));
1130 INSERT INTO tab(c2,c3,c4,c5)
1131 VALUES(ST_GeomFromText('POINT(4 4)'),ST_GeomFromText('LINESTRING(130 130,140 140,150 150)'),
1132 ST_GeomFromText('POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'),
1133 ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'));
1134 INSERT INTO tab(c2,c3,c4,c5)
1135 VALUES(ST_GeomFromText('POINT(50 50)'),ST_GeomFromText('LINESTRING(200 200,300 300,400 400)'),
1136 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'),
1137 ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))'));
1138 INSERT INTO tab(c2,c3,c4,c5)
1139 VALUES(ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(400 400,500 500,600 700)'),
1140 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'),
1141 ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))'));
1142 INSERT INTO tab(c2,c3,c4,c5)
1143 VALUES(ST_GeomFromText('POINT(3 3)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
1144 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'),
1145 ST_GeomFromText('POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))'));
1146 INSERT INTO tab(c2,c3,c4,c5)
1147 VALUES(ST_GeomFromText('POINT(60 70)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
1148 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
1149 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
1150 INSERT INTO tab(c2,c3,c4,c5)
1151 VALUES(ST_GeomFromText('POINT(0 0)'),ST_GeomFromText('LINESTRING(40 40,50 50,60 70)'),
1152 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'),
1153 ST_GeomFromText('POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))'));
1154 INSERT INTO tab(c2,c3,c4,c5)
1155 VALUES(ST_GeomFromText('POINT(120 120)'),ST_GeomFromText('LINESTRING(100 100,110 110,120 120)'),
1156 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'),
1157 ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))'));
1158 INSERT INTO tab(c2,c3,c4,c5)
1159 VALUES(ST_GeomFromText('POINT(160 160)'),ST_GeomFromText('LINESTRING(140 140,150 150,160 160)'),
1160 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'),
1161 ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
1162 ANALYZE TABLE tab;
1163 Table Op Msg_type Msg_text
1164 test.tab analyze status OK
1165 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
1166 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1167 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1168 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1169 Warnings:
1170 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1171 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1172 c1 ST_Astext(c4)
1173 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1174 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1175 WHERE MBRContains(tab.c4, @g1);
1176 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1177 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1178 Warnings:
1179 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1180 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
1181 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1182 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1183 Warnings:
1184 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1185 SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)');
1186 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1187 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1188 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1189 Warnings:
1190 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1191 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1192 c1 ST_Astext(c4)
1193 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
1194 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1195 WHERE MBRContains(tab.c4, @g1);
1196 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1197 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1198 Warnings:
1199 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1200 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
1201 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1202 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1203 Warnings:
1204 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1205 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
1206 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1207 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1208 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1209 Warnings:
1210 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1211 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1212 c1 ST_Astext(c4)
1213 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1214 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1215 WHERE MBRWithin(tab.c4, @g1);
1216 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1217 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1218 Warnings:
1219 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
1220 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
1221 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1222 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1223 Warnings:
1224 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
1225 SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))');
1226 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
1227 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1228 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1229 Warnings:
1230 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1231 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
1232 c1 ST_Astext(c4)
1233 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1234 WHERE ST_Crosses(tab.c4, @g1);
1235 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1236 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1237 Warnings:
1238 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
1239 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
1240 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1241 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1242 Warnings:
1243 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
1244 SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)');
1245 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1;
1246 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1247 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1248 Warnings:
1249 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1250 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1;
1251 c1 ST_Astext(c4)
1252 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1253 WHERE ST_Crosses(tab.c4, @g1);
1254 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1255 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1256 Warnings:
1257 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_crosses(`test`.`tab`.`c4`,(@`g1`))
1258 EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1);
1259 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1260 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1261 Warnings:
1262 Note 1003 delete from `test`.`tab` where st_crosses(`test`.`tab`.`c4`,(@`g1`))
1263 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
1264 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
1265 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1266 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 90.00 Using where
1267 Warnings:
1268 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1269 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
1270 c1 ST_Astext(c4)
1271 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1272 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1273 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
1274 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
1275 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
1276 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
1277 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
1278 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
1279 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
1280 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1281 WHERE MBRDisjoint(tab.c4, @g1);
1282 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1283 1 UPDATE tab NULL index idx3 PRIMARY 4 NULL 10 100.00 Using where
1284 Warnings:
1285 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
1286 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
1287 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1288 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
1289 Warnings:
1290 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
1291 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
1292 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1293 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1294 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1295 Warnings:
1296 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1297 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1298 c1 ST_Astext(c4)
1299 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
1300 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1301 WHERE MBREquals(tab.c4, @g1);
1302 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1303 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1304 Warnings:
1305 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
1306 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
1307 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1308 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1309 Warnings:
1310 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
1311 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1312 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1313 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1314 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
1315 Warnings:
1316 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1317 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1318 c1 ST_Astext(c4)
1319 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1320 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1321 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1322 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1323 WHERE MBRintersects(tab.c4, @g1);
1324 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1325 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1326 Warnings:
1327 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1328 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
1329 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1330 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1331 Warnings:
1332 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1333 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
1334 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1335 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1336 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1337 Warnings:
1338 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1339 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1340 c1 ST_Astext(c4)
1341 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1342 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1343 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1344 WHERE MBRintersects(tab.c4, @g1);
1345 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1346 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1347 Warnings:
1348 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1349 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
1350 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1351 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1352 Warnings:
1353 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1354 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
1355 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1356 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1357 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1358 Warnings:
1359 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1360 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1361 c1 ST_Astext(c4)
1362 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1363 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1364 WHERE MBROverlaps(tab.c4, @g1);
1365 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1366 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1367 Warnings:
1368 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1369 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
1370 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1371 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1372 Warnings:
1373 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1374 SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )');
1375 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1376 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1377 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 80.00 Using where
1378 Warnings:
1379 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1380 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1381 c1 ST_Astext(c4)
1382 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1383 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1384 WHERE MBROverlaps(tab.c4, @g1);
1385 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1386 1 UPDATE tab NULL range idx3 idx3 34 const 8 100.00 Using where
1387 Warnings:
1388 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1389 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
1390 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1391 1 DELETE tab NULL range idx3 idx3 34 const 8 100.00 Using where
1392 Warnings:
1393 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1394 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1395 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
1396 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1397 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
1398 Warnings:
1399 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1400 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
1401 c1 ST_Astext(c4)
1402 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1403 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1404 WHERE ST_Touches(tab.c4, @g1);
1405 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1406 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1407 Warnings:
1408 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
1409 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
1410 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1411 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1412 Warnings:
1413 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
1414 SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)');
1415 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
1416 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1417 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1418 Warnings:
1419 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where st_touches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1420 SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1;
1421 c1 ST_Astext(c4)
1422 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
1423 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1424 WHERE ST_Touches(tab.c4, @g1);
1425 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1426 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1427 Warnings:
1428 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where st_touches(`test`.`tab`.`c4`,(@`g1`))
1429 EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1);
1430 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1431 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1432 Warnings:
1433 Note 1003 delete from `test`.`tab` where st_touches(`test`.`tab`.`c4`,(@`g1`))
1434 SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
1435 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1436 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1437 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1438 Warnings:
1439 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1440 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
1441 c1 ST_Astext(c4)
1442 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1443 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1444 WHERE MBRContains(tab.c4, @g1);
1445 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1446 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1447 Warnings:
1448 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1449 EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1);
1450 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1451 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1452 Warnings:
1453 Note 1003 delete from `test`.`tab` where mbrcontains(`test`.`tab`.`c4`,(@`g1`))
1454 SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) ');
1455 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1456 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1457 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1458 Warnings:
1459 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1460 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1;
1461 c1 ST_Astext(c4)
1462 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1463 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1464 WHERE MBRWithin(tab.c4, @g1);
1465 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1466 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1467 Warnings:
1468 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
1469 EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1);
1470 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1471 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1472 Warnings:
1473 Note 1003 delete from `test`.`tab` where mbrwithin(`test`.`tab`.`c4`,(@`g1`))
1474 SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))');
1475 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
1476 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1477 1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 90.00 Using where
1478 Warnings:
1479 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1480 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1;
1481 c1 ST_Astext(c4)
1482 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1483 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1484 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
1485 5 POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))
1486 6 POLYGON((2010 2010,2020 2020,2030 2030,2040 2030,2020 2010,2010 2010))
1487 7 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
1488 8 POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
1489 9 POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
1490 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
1491 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1492 WHERE MBRDisjoint(tab.c4, @g1);
1493 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1494 1 UPDATE tab NULL index idx3 PRIMARY 4 NULL 10 100.00 Using where
1495 Warnings:
1496 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
1497 EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1);
1498 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1499 1 DELETE tab NULL ALL idx3 NULL NULL NULL 10 100.00 Using where
1500 Warnings:
1501 Note 1003 delete from `test`.`tab` where mbrdisjoint(`test`.`tab`.`c4`,(@`g1`))
1502 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
1503 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1504 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1505 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1506 Warnings:
1507 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1508 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1509 c1 ST_Astext(c4)
1510 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
1511 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1512 WHERE MBREquals(tab.c4, @g1);
1513 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1514 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1515 Warnings:
1516 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrequals(`test`.`tab`.`c4`,(@`g1`))
1517 EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
1518 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1519 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1520 Warnings:
1521 Note 1003 delete from `test`.`tab` where mbrequals(`test`.`tab`.`c4`,(@`g1`))
1522 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1523 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1524 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1525 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
1526 Warnings:
1527 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1528 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1529 c1 ST_Astext(c4)
1530 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1531 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1532 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1533 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1534 WHERE MBRintersects(tab.c4, @g1);
1535 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1536 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1537 Warnings:
1538 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1539 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
1540 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1541 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1542 Warnings:
1543 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1544 SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)');
1545 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1546 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1547 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1548 Warnings:
1549 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1550 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1551 c1 ST_Astext(c4)
1552 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1553 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1554 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1555 WHERE MBRintersects(tab.c4, @g1);
1556 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1557 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1558 Warnings:
1559 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1560 EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1);
1561 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1562 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1563 Warnings:
1564 Note 1003 delete from `test`.`tab` where mbrintersects(`test`.`tab`.`c4`,(@`g1`))
1565 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))');
1566 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1567 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1568 1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 100.00 Using where; Using filesort
1569 Warnings:
1570 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1571 SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1;
1572 c1 ST_Astext(c4)
1573 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1574 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1575 WHERE MBROverlaps(tab.c4, @g1);
1576 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1577 1 UPDATE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1578 Warnings:
1579 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1580 EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1);
1581 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1582 1 DELETE tab NULL range idx3 idx3 34 const 1 100.00 Using where
1583 Warnings:
1584 Note 1003 delete from `test`.`tab` where mbroverlaps(`test`.`tab`.`c4`,(@`g1`))
1585 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1586 EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
1587 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1588 1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 100.00 Using where; Using filesort
1589 Warnings:
1590 Note 1003 /* select#1 */ select `test`.`tab`.`c1` AS `c1`,st_astext(`test`.`tab`.`c4`) AS `ST_Astext(c4)` from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,<cache>((@`g1`))) order by `test`.`tab`.`c1`
1591 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1;
1592 c1 ST_Astext(c4)
1593 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1594 EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)')
1595 WHERE MBRTouches(tab.c4, @g1);
1596 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1597 1 UPDATE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1598 Warnings:
1599 Note 1003 update `test`.`tab` set `test`.`tab`.`c2` = st_geomfromtext('POINT(0 0)') where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
1600 EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1);
1601 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1602 1 DELETE tab NULL range idx3 idx3 34 const 2 100.00 Using where
1603 Warnings:
1604 Note 1003 delete from `test`.`tab` where mbrtouches(`test`.`tab`.`c4`,(@`g1`))
1605 SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
1606 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1607 c1 ST_Astext(c4)
1608 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))
1609 DELETE FROM tab WHERE MBREquals(tab.c4, @g1);
1610 SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1;
1611 c1 ST_Astext(c4)
1612 CHECK TABLE tab;
1613 Table Op Msg_type Msg_text
1614 test.tab check status OK
1615 SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
1616 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1617 c1 ST_Astext(c4)
1618 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
1619 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
1620 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))
1621 DELETE FROM tab WHERE MBRIntersects(tab.c4, @g1);
1622 SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
1623 c1 ST_Astext(c4)
1624 CHECK TABLE tab;
1625 Table Op Msg_type Msg_text
1626 test.tab check status OK
1627 DROP TABLE tab;
1628 CREATE TABLE tab(c1 POINT NOT NULL SRID 0,
1629 CONSTRAINT tab_const
1630 CHECK(ST_Equals(c1, ST_GeomFromText("POINT(0 0)") = FALSE))
1631 ) ENGINE=InnoDB;
1632 CREATE SPATIAL INDEX idx1 ON tab(c1) ;
1633 SHOW CREATE TABLE tab;
1634 Table Create Table
1635 tab CREATE TABLE `tab` (
1636 `c1` point NOT NULL /*!80003 SRID 0 */,
1637 SPATIAL KEY `idx1` (`c1`),
1638 CONSTRAINT `tab_const` CHECK (st_equals(`c1`,(st_geomfromtext(_utf8mb4'POINT(0 0)') = false)))
1639 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1640 ANALYZE TABLE tab;
1641 Table Op Msg_type Msg_text
1642 test.tab analyze status OK
1643 SHOW INDEX FROM tab;
1644 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression
1645 tab 1 idx1 1 c1 A 0 32 NULL SPATIAL YES NULL
1646 set @g1 = ST_GeomFromText('POINT(-1 -2)');
1647 SELECT ST_AsText(c1) FROM tab;
1648 ST_AsText(c1)
1649 DROP table tab;
1650 create table `t1`(`a` geometry not null SRID 0,`b` linestring not null SRID 0,
1651 spatial key (`b`)) engine=innodb;
1652 insert into `t1` values(
1653 point(1,1),
1654 linestring(point(1,1),point(1,1))
1655 );
1656 insert into `t1` values
1657 (
1658 polygon(
1659 linestring(point(1,1),point(1,1)),
1660 linestring(point(1,1),point(11,1))
1661 ),
1662 linestring(point(1,1),point(1,1))
1663 );
1664 ERROR 22023: Invalid GIS data provided to function polygon.
1665 select 1 from t1 where st_intersects(
1666 geometrycollection(point(1,-1)),b
1667 );
1668 1
1669 drop table t1;