Details
Description
Consider the following scenarios which should both result in GEOMETRYCOLLECTIONs on MariaDB, but don't:
CREATE TABLE t1 (g GEOMETRY); |
INSERT INTO t1 VALUES (POINT(1,1)), (ST_GeomFromText('LINESTRING(0 0,1 1)')), (POINT(5,5)); |
SELECT ST_AsText(ST_Collect(g)) FROM t1; |
-- MULTIPOINT(1 1,1e-323 0,1.7765824089018436e-307 1.1643010474979122e-302) |
The same rows inserted in a different order give the expected result:
CREATE TABLE t1 (g GEOMETRY); |
INSERT INTO t1 VALUES (POINT(1,1)), (POINT(5,5)), (ST_GeomFromText('LINESTRING(0 0,1 1)')); |
SELECT ST_AsText(ST_Collect(g)) FROM t1; |
-- GEOMETRYCOLLECTION(POINT(1 1),POINT(5 5),LINESTRING(0 0,1 1)) |
MySQL correctly returns a GEOMETRYCOLLECTION for both queries.