mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11881 Empty coordinates must be rejected in GeoJSON objects.
Check for the empty 'coordinates' array.
This commit is contained in:
@ -89,6 +89,21 @@ ST_AsGeoJSON(ST_GeomFromText("POINT(10 11)"), 100, 1)
|
||||
SELECT ST_AsGeoJSON(ST_GeomFromText("POINT(10 11)"), 100, 5);
|
||||
ST_AsGeoJSON(ST_GeomFromText("POINT(10 11)"), 100, 5)
|
||||
{"bbox": [10, 11, 10, 11], "type": "Point", "coordinates": [10, 11]}
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "MultiLineString","coordinates": []}')) as a;
|
||||
a
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4076 Incorrect GeoJSON format - empty 'coordinates' array.
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "Polygon","coordinates": []}')) as a;
|
||||
a
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4076 Incorrect GeoJSON format - empty 'coordinates' array.
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "MultiPolygon","coordinates": []}')) as a;
|
||||
a
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4076 Incorrect GeoJSON format - empty 'coordinates' array.
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user