1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MariaDB adjustments to innodb_gis tests.

Some test are still disabled as they provide different results,
fail on different error or crash.

Fixes also MDEV-14060 InnoDB: Foreign key constraint to
geometry type does not work where test intentionally tried
incorrect cases.
This commit is contained in:
Jan Lindström
2017-10-12 17:21:04 +03:00
parent 42e3e57426
commit a6a4c25bf7
27 changed files with 697 additions and 52 deletions

View File

@ -32,7 +32,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
truncate table t1;
call mtr.add_suppression("InnoDB: page [0-9]+ in the doublewrite buffer is not within space bounds.*");
call mtr.add_suppression("InnoDB: A copy of page \[page id: space=[0-9]+, page number=[0-9]+\] in the doublewrite buffer slot [0-9]+ is not within space bounds");
START TRANSACTION;
CALL insert_t1(5000);
COMMIT;

View File

@ -24,10 +24,8 @@ INSERT INTO gis_point VALUES
(ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(200.32247328 101.86728201)')),
(ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(100.32374832 101.98527111)'));
EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Using temporary; Using filesort
Warnings:
Note 1003 /* select#1 */ select st_astext(`test`.`gis_point`.`p1`) AS `ST_AsText(p1)`,st_astext(`test`.`gis_point`.`p2`) AS `ST_AsText(p2)` from `test`.`gis_point` group by `test`.`gis_point`.`p1`,`test`.`gis_point`.`p2`
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 #
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
ST_AsText(p1) ST_AsText(p2)
POINT(100.32374832 101.23741821) POINT(100.32374832 101.98527111)
@ -146,10 +144,11 @@ POINT(1 0) POINT(10 20)
POINT(0 0) POINT(10 20)
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('POLYGON((-1 0.5, -1 -0.5, 1 -0.5, 1 0.5, -1 0.5))'));
ST_AsText(p) ST_AsText(p1)
POINT(1 0) POINT(10 20)
POINT(0 0) POINT(10 20)
# Drop spatial keys on the table
ALTER TABLE t1 DROP KEY p, DROP KEY p1;
ERROR 42000: Can't DROP 'p1'; check that column/key exists
ERROR 42000: Can't DROP INDEX `p1`; check that it exists
SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
name mtype prtype len
p 14 1535 12
@ -171,6 +170,7 @@ POINT(1 0) POINT(10 20)
POINT(0 0) POINT(10 20)
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('POLYGON((-1 0.5, -1 -0.5, 1 -0.5, 1 0.5, -1 0.5))'));
ST_AsText(p) ST_AsText(p1)
POINT(1 0) POINT(10 20)
POINT(0 0) POINT(10 20)
TRUNCATE t1;
ALTER TABLE t1 DROP COLUMN p, DROP COLUMN p1;
@ -203,8 +203,10 @@ SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p1, ST_GeomFromText('
ST_AsText(p) ST_AsText(p1)
POINT(0 1) POINT(10 19)
POINT(1 1) POINT(10 20)
POINT(1 0) POINT(10 21)
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('POLYGON((-1 0.5, -1 -0.5, 1 -0.5, 1 0.5, -1 0.5))'));
ST_AsText(p) ST_AsText(p1)
POINT(1 0) POINT(10 21)
POINT(0 0) POINT(10 22)
ALTER TABLE t1 DROP COLUMN p1, ADD COLUMN p1 POINT, CHANGE COLUMN p pp POINT AFTER p1;
SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'pp' OR name = 'g' OR name = 'p1';
@ -232,9 +234,14 @@ SELECT ST_AsText(pp), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(1
ST_AsText(pp) ST_AsText(p1)
SELECT ST_AsText(pp), ST_AsText(p1) FROM t1 WHERE MBRWithin(p1, ST_GeomFromText('POLYGON((5 5, 20 5, 20 21, 5 21, 5 5))')) ORDER BY pp;
ST_AsText(pp) ST_AsText(p1)
POINT(0 0) POINT(5 5)
POINT(0 1) POINT(5 5)
POINT(1 0) POINT(5 5)
POINT(1 1) POINT(5 5)
SELECT ST_AsText(pp), ST_AsText(p1) FROM t1 WHERE MBRWithin(pp, ST_GeomFromText('POLYGON((-1 0.5, -1 -0.5, 1 -0.5, 1 0.5, -1 0.5))')) ORDER BY pp;
ST_AsText(pp) ST_AsText(p1)
POINT(0 0) POINT(5 5)
POINT(1 0) POINT(5 5)
DROP TABLE t1;
#
# Test when the POINT is on B-TREE
@ -263,10 +270,8 @@ INSERT INTO gis_point VALUES
(206, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(103.43718640 105.248206478)'))));
'The ORDER BY will use filesort'
EXPLAIN SELECT ST_AsText(p) FROM gis_point ORDER BY p;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Using filesort
Warnings:
Note 1003 /* select#1 */ select st_astext(`test`.`gis_point`.`p`) AS `ST_AsText(p)` from `test`.`gis_point` order by `test`.`gis_point`.`p`
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE gis_point ALL NULL NULL NULL NULL 10 #
SELECT ST_AsText(p) FROM gis_point ORDER BY p;
ST_AsText(p)
POINT(10 10)
@ -418,7 +423,6 @@ CREATE TABLE t2 AS SELECT * FROM t1;
DROP TABLE t1;
SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' AND name='t2';
name mtype prtype len
p 14 1535 12
DROP table t2;
#
# Test when POINT is used in spatial index
@ -453,8 +457,6 @@ SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE
name mtype prtype len
p1 14 1535 12
p2 14 1535 12
p1 14 1535 12
p2 14 1535 12
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point1;
ST_AsText(p1) ST_AsText(p2)
POINT(1 2) POINT(-1 -3)
@ -475,14 +477,18 @@ ST_AsText(p1)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point1 WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p2) FROM gis_point1 WHERE ST_Contains(@poly2, p2);
ST_AsText(p2)
POINT(-1 -3)
POINT(-2 -6)
POINT(-3 -9)
POINT(-4 -12)
POINT(-5 -15)
POINT(0 0)
POINT(-1 -1)
SELECT ST_AsText(p2) FROM gis_point1 WHERE ST_Equals(p2, @p1);
ST_AsText(p2)
@ -493,10 +499,13 @@ POINT(20.5 41)
POINT(32.1234 64.2468)
SELECT ST_AsText(p1) FROM gis_point1 WHERE ST_Contains(@mpoly, p1);
ST_AsText(p1)
POINT(3 6)
POINT(4 8)
POINT(5 10)
POINT(6 12)
POINT(7 14)
POINT(8 16)
POINT(10 21)
POINT(20.5 41)
SELECT ST_AsText(p1) FROM gis_point1 WHERE ST_Contains(@mpoly, p1) AND NOT MBRWithin(p1, @mpoly);
ST_AsText(p1)
@ -549,8 +558,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point1 WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point1 WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -673,8 +684,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point1 WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point1 WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -756,14 +769,18 @@ ST_AsText(p1)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p2) FROM gis_point WHERE ST_Contains(@poly2, p2);
ST_AsText(p2)
POINT(-1 -3)
POINT(-2 -6)
POINT(-3 -9)
POINT(-4 -12)
POINT(-5 -15)
POINT(0 0)
POINT(-1 -1)
SELECT ST_AsText(p2) FROM gis_point WHERE ST_Equals(p2, @p1);
ST_AsText(p2)
@ -774,10 +791,13 @@ POINT(20.5 41)
POINT(32.1234 64.2468)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Contains(@mpoly, p1);
ST_AsText(p1)
POINT(3 6)
POINT(4 8)
POINT(5 10)
POINT(6 12)
POINT(7 14)
POINT(8 16)
POINT(10 21)
POINT(20.5 41)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Contains(@mpoly, p1) AND NOT MBRWithin(p1, @mpoly);
ST_AsText(p1)
@ -830,8 +850,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -954,8 +976,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -1067,8 +1091,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -1191,8 +1217,10 @@ POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
POINT(3 6)
POINT(4 8)
POINT(5 10)
SELECT ST_AsText(p1) FROM gis_point WHERE ST_Touches(p1, @poly1);
ST_AsText(p1)
POINT(2 4)
@ -1260,10 +1288,8 @@ Table Op Msg_type Msg_text
test.gis_point check status OK
The ORDER BY for spatial index will use filesort
EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Using filesort
Warnings:
Note 1003 /* select#1 */ select st_astext(`test`.`gis_point`.`p1`) AS `ST_AsText(p1)`,st_astext(`test`.`gis_point`.`p2`) AS `ST_AsText(p2)` from `test`.`gis_point` order by `test`.`gis_point`.`p1`,`test`.`gis_point`.`p2`
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE gis_point ALL NULL NULL NULL NULL 13 #
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2;
ST_AsText(p1) ST_AsText(p2)
POINT(2 4) POINT(-2 -6)
@ -1423,8 +1449,8 @@ a ST_AsText(p) ST_AsText(l) ST_AsText(g)
1 POINT(10 10) LINESTRING(1 1,5 5,10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
2 POINT(20 20) LINESTRING(2 3,7 8,9 10,15 16) POLYGON((10 30,30 40,40 50,40 30,30 20,10 30))
EXPLAIN UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)');
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 UPDATE t1 NULL range PRIMARY PRIMARY 27 const # 100.00 Using where
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 27 NULL 1 #
UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)');
SELECT a, ST_AsText(p), ST_AsText(l), ST_AsText(g) FROM t1;
a ST_AsText(p) ST_AsText(l) ST_AsText(g)
@ -1461,10 +1487,8 @@ a ST_AsText(p) ST_AsText(l) ST_AsText(g)
ALTER TABLE t1 DROP PRIMARY KEY;
ALTER TABLE t1 ADD PRIMARY KEY(p);
EXPLAIN SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)');
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 NULL const PRIMARY,idx2 PRIMARY 27 const # 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select '2' AS `a`,st_astext('
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY,idx2 PRIMARY 27 const 1 #
SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)');
a ST_AsText(p)
2 POINT(30 30)
@ -1497,13 +1521,28 @@ child CREATE TABLE `child` (
SPATIAL KEY `idx2` (`p`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
ERROR HY000: Cannot add foreign key constraint
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
ALTER TABLE parent DROP INDEX idx1;
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
ERROR HY000: Cannot add foreign key constraint
Got one of the listed errors
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
ALTER TABLE child DROP INDEX idx2;
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
ERROR HY000: Cannot add foreign key constraint
Got one of the listed errors
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is only prefix index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
DROP TABLE child, parent;
#
# Bug#28763: Selecting geometry fields in UNION caused server crash.

View File

@ -16,6 +16,8 @@ SELECT COUNT(*) FROM tab;
COUNT(*)
1
"In connection 1"
connect con1,localhost,root,,;
connection con1;
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT @@tx_isolation;
@@tx_isolation
@ -27,6 +29,8 @@ SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
"In connection 2"
connect con2,localhost,root,,;
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT @@tx_isolation;
@@tx_isolation
@ -41,6 +45,7 @@ SET @g2 = ST_GeomFromText('POINT(10 10)');
UPDATE tab SET C5 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))')
WHERE MBREquals(tab.c4, @g1) AND MBREquals(tab.c2, @g2);
"In connection 1"
connection con1;
SET @g3 = ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))');
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g3);
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
@ -52,11 +57,14 @@ SELECT COUNT(*) FROM tab;
COUNT(*)
1
"In connection 2"
connection con2;
SELECT COUNT(*) FROM tab;
COUNT(*)
2
COMMIT;
disconnect con2;
"In connection 1"
connection con1;
SELECT COUNT(*) FROM tab;
COUNT(*)
1
@ -74,6 +82,8 @@ SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab;
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
1 POINT(10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
2 POINT(20 20) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
disconnect con1;
connection default;
DROP TABLE tab;
CREATE TABLE tab(c1 int NOT NULL PRIMARY KEY,c2 POINT NOT NULL,
c3 LINESTRING NOT NULL,c4 POLYGON NOT NULL,c5 GEOMETRY NOT NULL)
@ -93,6 +103,8 @@ SELECT COUNT(*) FROM tab;
COUNT(*)
1
"In connection 1"
connect con1,localhost,root,,;
connection con1;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT @@tx_isolation;
@@tx_isolation
@ -104,6 +116,8 @@ SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
"In connection 2"
connect con2,localhost,root,,;
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT @@tx_isolation;
@@tx_isolation
@ -118,6 +132,7 @@ SET @g2 = ST_GeomFromText('POINT(10 10)');
UPDATE tab SET C5 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))')
WHERE MBREquals(tab.c4, @g1) AND MBREquals(tab.c2, @g2);
"In connection 1"
connection con1;
SET @g3 = ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))');
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g3);
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
@ -129,11 +144,14 @@ SELECT COUNT(*) FROM tab;
COUNT(*)
1
"In connection 2"
connection con2;
SELECT COUNT(*) FROM tab;
COUNT(*)
2
COMMIT;
disconnect con2;
"In connection 1"
connection con1;
SELECT COUNT(*) FROM tab;
COUNT(*)
1
@ -151,4 +169,6 @@ SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab;
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
1 POINT(10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
2 POINT(20 20) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
disconnect con1;
connection default;
DROP TABLE tab;

View File

@ -410,6 +410,8 @@ update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
ERROR 23000: Duplicate entry '5' for key 'c'
rollback;
set session debug="+d,row_mysql_crash_if_error";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
ERROR HY000: Lost connection to MySQL server during query
insert into t1 values(5, point(5,5), point(5,5), 5);

View File

@ -40,8 +40,12 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
count(*)
0
SET DEBUG='+d,page_copy_rec_list_start_compress_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
delete from t1;
SET DEBUG='-d,page_copy_rec_list_start_compress_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
select count(*) from t1 where MBRWithin(t1.c2, @g1);
count(*)
0

View File

@ -16,7 +16,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
truncate table t1;
call mtr.add_suppression("InnoDB: page [0-9]+ in the doublewrite buffer is not within space bounds.*");
call mtr.add_suppression("InnoDB: A copy of page \[page id: space=[0-9]+, page number=[0-9]+\] in the doublewrite buffer slot [0-9]+ is not within space bounds");
START TRANSACTION;
CALL insert_t1(5000);
COMMIT;

View File

@ -31,5 +31,7 @@ COUNT(*)
0
ALTER TABLE t1 DROP INDEX idx, ADD SPATIAL INDEX idx3(c2);
SET SESSION debug="+d,row_merge_instrument_log_check_flush";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 DROP INDEX idx3, ADD SPATIAL INDEX idx4(c2), ADD SPATIAL INDEX idx5(c3);
DROP TABLE t1;

View File

@ -39,9 +39,13 @@ t1 CREATE TABLE `t1` (
SPATIAL KEY `idx` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET DEBUG='+d,row_merge_ins_spatial_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
create spatial index idx2 on t1(c2);
ERROR HY000: Got error 1000 from storage engine
ERROR HY000: Got error 1000 "Unknown error 1000" from storage engine InnoDB
SET DEBUG='-d,row_merge_ins_spatial_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (

File diff suppressed because one or more lines are too long

View File

@ -19,5 +19,6 @@ set n:=n+1;
until n >= i end repeat;
end|
call p(200);
InnoDB 0 transactions not purged
drop procedure p;
drop table t;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,6 @@
SET SESSION debug="+d,row_print_geometry_data";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
CREATE TABLE t_wl6455 ( i INT, g GEOMETRY NOT NULL) ENGINE=InnoDB;
SHOW CREATE TABLE t_wl6455;
Table Create Table
@ -24,7 +26,7 @@ SELECT ST_AsText(g) FROM t_wl6455;
ST_AsText(g)
POINT(1 1)
POINT(2 2)
MULTIPOINT((0 0),(20 20),(60 60))
MULTIPOINT(0 0,20 20,60 60)
LINESTRING(1 1,4 4)
LINESTRING(2 2,5 5)
MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5))
@ -33,10 +35,8 @@ MULTIPOLYGON(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1)))
GEOMETRYCOLLECTION(POINT(1 1),LINESTRING(2 2,3 3))
CREATE INDEX i_p ON t_wl6455 (g(10));
EXPLAIN SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t_wl6455 NULL ref i_p i_p 12 const # 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select st_astext(`test`.`t_wl6455`.`g`) AS `ST_AsText(g)` from `test`.`t_wl6455` where (`test`.`t_wl6455`.`g` = <cache>(point(2,2)))
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t_wl6455 ref i_p i_p 12 const 2 #
SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2);
ST_AsText(g)
POINT(2 2)
@ -61,7 +61,7 @@ SELECT ST_AsText(g) FROM t_wl6455;
ST_AsText(g)
POINT(1 1)
POINT(2 2)
MULTIPOINT((0 0),(20 20),(60 60))
MULTIPOINT(0 0,20 20,60 60)
LINESTRING(1 1,4 4)
LINESTRING(2 2,5 5)
MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5))