diff options
author | hf@deer.(none) <> | 2005-04-29 20:23:02 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2005-04-29 20:23:02 +0500 |
commit | 054463f975334e24853c26d6a1dfd1f3a2919dc1 (patch) | |
tree | a1ccc4cac7fa2e450dd06586cd94df5312459b26 /sql/item_geofunc.cc | |
parent | 908c5d74d49ab3ae818dee09a4fa64b88b9dd042 (diff) | |
download | mariadb-git-054463f975334e24853c26d6a1dfd1f3a2919dc1.tar.gz |
Fix for #6553 and #8776 (no errors on bad spatial data)
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 1a8cb50081b..b9f2ec8a6ca 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -55,8 +55,11 @@ String *Item_func_geometry_from_text::val_str(String *str) return 0; str->length(0); str->q_append(srid); - if ((null_value= !Geometry::create_from_wkt(&buffer, &trs, str, 0))) - return 0; + 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; return str; } |