summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-11-14 13:36:50 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-11-14 13:36:50 +0400
commit24184938ad9954f25c082a1afd74a053a8ab6d8c (patch)
tree80ed9630ac2b1c0fd10be21e7317b76b8d40c769 /sql/item_geofunc.cc
parent56326528044a8b8c688f3223cf88634403d40da2 (diff)
downloadmariadb-git-24184938ad9954f25c082a1afd74a053a8ab6d8c.tar.gz
MDEV-11881 Empty coordinates must be rejected in GeoJSON objects.
Check for the empty 'coordinates' array.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 6f79bd9a039..3119f5a577b 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -174,6 +174,9 @@ String *Item_func_geometry_from_json::val_str(String *str)
case Geometry::GEOJ_TOO_FEW_POINTS:
code= ER_GEOJSON_TOO_FEW_POINTS;
break;
+ case Geometry::GEOJ_EMPTY_COORDINATES:
+ code= ER_GEOJSON_EMPTY_COORDINATES;
+ break;
case Geometry::GEOJ_POLYGON_NOT_CLOSED:
code= ER_GEOJSON_NOT_CLOSED;
break;