| 1 |
create table t1 (c1 int, c2 geometry not null SRID 0, spatial index (c2))engine=innodb; |
| 2 |
create procedure insert_t1(IN total int) |
| 3 |
begin |
| 4 |
declare i int default 1; |
| 5 |
while (i <= total) DO |
| 6 |
insert into t1 values (i, Point(i, i)); |
| 7 |
set i = i + 1; |
| 8 |
end while; |
| 9 |
end| |
| 10 |
CALL insert_t1(5000); |
| 11 |
select count(*) from t1; |
| 12 |
count(*) |
| 13 |
5000 |
| 14 |
check table t1; |
| 15 |
Table Op Msg_type Msg_text |
| 16 |
test.t1 check status OK |
| 17 |
truncate table t1; |
| 18 |
CALL insert_t1(10000); |
| 19 |
select count(*) from t1; |
| 20 |
count(*) |
| 21 |
10000 |
| 22 |
drop index c2 on t1; |
| 23 |
create spatial index idx on t1(c2); |
| 24 |
show create table t1; |
| 25 |
Table Create Table |
| 26 |
t1 CREATE TABLE `t1` ( |
| 27 |
`c1` int DEFAULT NULL, |
| 28 |
`c2` geometry NOT NULL /*!80003 SRID 0 */, |
| 29 |
SPATIAL KEY `idx` (`c2`) |
| 30 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 31 |
check table t1; |
| 32 |
Table Op Msg_type Msg_text |
| 33 |
test.t1 check status OK |
| 34 |
truncate table t1; |
| 35 |
call mtr.add_suppression("page [0-9]+ in the doublewrite buffer is not within space bounds.*"); |
| 36 |
START TRANSACTION; |
| 37 |
CALL insert_t1(5000); |
| 38 |
COMMIT; |
| 39 |
# Kill and restart |
| 40 |
drop procedure insert_t1; |
| 41 |
drop table t1; |