mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
218dbf68b8
The function rtr_update_mbr_field_in_place() is generating MLOG_REC_UPDATE_IN_PLACE or MLOG_COMP_REC_UPDATE_IN_PLACE records on non-leaf pages, even though MLOG_WRITE_STRING would perfectly suffice for updating a fixed-length data field. btr_cur_parse_update_in_place(): If flags==7, the record may be from rtr_update_mbr_field_in_place(), and we must check if the page is a leaf page. Otherwise, assume that it is. btr_cur_update_in_place(): Assert that the page is a leaf page.
57 lines
1.4 KiB
Text
57 lines
1.4 KiB
Text
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
|
|
create procedure insert_t1(IN total int)
|
|
begin
|
|
declare i int default 1;
|
|
while (i <= total) DO
|
|
insert into t1 values (i, Point(i, i));
|
|
set i = i + 1;
|
|
end while;
|
|
end|
|
|
create procedure update_t1(IN total int)
|
|
begin
|
|
declare i int default 1;
|
|
while (i <= total) DO
|
|
update t1 set c2 = Point(i + 10000, i + 10000) where c2 = Point(i, i);
|
|
set i = i + 1;
|
|
end while;
|
|
end|
|
|
CALL insert_t1(367);
|
|
COMMIT;
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
create table t1 (c1 int, c2 point not null, spatial index (c2))engine=innodb;
|
|
CALL insert_t1(367);
|
|
CALL update_t1(367);
|
|
SET @poly1 = ST_GeomFromText('POLYGON((10000 10000, 10000 10350, 10350 10350, 10350 10000, 10000 10000))');
|
|
delete from t1 where ST_Contains(@poly1, c2);
|
|
COMMIT;
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
select count(*) from t1;
|
|
count(*)
|
|
17
|
|
select c1, ST_astext(c2) from t1;
|
|
c1 ST_astext(c2)
|
|
351 POINT(10351 10351)
|
|
352 POINT(10352 10352)
|
|
353 POINT(10353 10353)
|
|
354 POINT(10354 10354)
|
|
355 POINT(10355 10355)
|
|
356 POINT(10356 10356)
|
|
357 POINT(10357 10357)
|
|
358 POINT(10358 10358)
|
|
359 POINT(10359 10359)
|
|
360 POINT(10360 10360)
|
|
361 POINT(10361 10361)
|
|
362 POINT(10362 10362)
|
|
363 POINT(10363 10363)
|
|
364 POINT(10364 10364)
|
|
365 POINT(10365 10365)
|
|
366 POINT(10366 10366)
|
|
367 POINT(10367 10367)
|
|
drop procedure insert_t1;
|
|
drop procedure update_t1;
|
|
drop table t1;
|