Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5(EOL), 10.6, 10.11, 11.4, 11.8, 12.3, 13.0
-
Can result in unexpected behaviour
Description
The following test case is based on the test innodb_gis.big_records in the fix of MySQL Bug#39433811:
--source include/have_innodb.inc
|
--source include/have_sequence.inc
|
|
|
CREATE TABLE t1 ( |
a VARCHAR(255) NOT NULL, |
b VARCHAR(255) NOT NULL, |
c VARCHAR(255) NOT NULL, |
d VARCHAR(175) NOT NULL, |
g GEOMETRY NOT NULL, |
PRIMARY KEY (a, b, c, d), |
SPATIAL KEY idx_g (g) |
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=latin1;
|
|
|
# This one is a simple case where the row is very short |
INSERT INTO t1 (a,b,c,d,g) |
VALUES ('a', 'b', 'c', 'd', ST_GeomFromText('POINT(0 0)')); |
|
|
# This one is a more difficult case where the row is very long, |
# in particular its Primary Key columns have longest possible values. |
--echo --error ER_TOO_BIG_ROWSIZE
|
INSERT INTO t1 (a,b,c,d,g) VALUES ( |
REPEAT('a',255), |
REPEAT('b',255), |
REPEAT('c',255), |
REPEAT('d',175), |
ST_GeomFromText('POINT(1 1)') |
);
|
|
|
# Now lets see what happens if the R-tree has some internal nodes |
INSERT INTO t1 (a,b,c,d,g) |
SELECT REPEAT(seq,50), REPEAT('b',255), REPEAT('c',255), 'd2', ST_GeomFromText( |
CONCAT('POINT(', MOD(seq,90), ' -122.4194)'), |
4326
|
) FROM seq_1_to_1024; |
|
|
--echo # Before DELETE:
|
SELECT a,b,c,d,ST_AsText(g) FROM t1 WHERE g=ST_GeomFromText('POINT(40 -122.4194)'); |
SELECT COUNT(*) FROM t1; |
|
|
# Now test navigation
|
DELETE FROM t1 WHERE g=ST_GeomFromText('POINT(40 -122.4194)'); |
--echo # After DELETE
|
SELECT a,b,c,d,ST_AsText(g) FROM t1 WHERE g=ST_GeomFromText('POINT(40 -122.4194)'); |
SELECT COUNT(*) FROM t1; |
|
|
DROP TABLE t1; |
Only one INSERT is failing on MariaDB. Maybe it is related to the fact that the original test made use of a particular spatial reference system, while only one is implemented in MariaDB.
Attachments
Issue Links
- relates to
-
MDEV-40618 Merge applicable changes from InnoDB 8.4.11
-
- Closed
-
-
MDEV-14057 InnoDB GIS tests fail
-
- Closed
-