diff options
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 955ba0ef67a..11cb8ad935b 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -64,11 +64,8 @@ String *Item_func_geometry_from_text::val_str(String *str) return 0; str->length(0); str->q_append(srid); - if (!Geometry::create_from_wkt(&buffer, &trs, str, 0)) - /* We shouldn't return NULL here as NULL is a legal spatial object */ - /* Geometry::bad_spatial_data will produce error message beeing stored*/ - /* in GEOMETRY field */ - return &Geometry::bad_geometry_data; + if ((null_value= !Geometry::create_from_wkt(&buffer, &trs, str, 0))) + return 0; return str; } |