diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-03-02 15:09:44 +0400 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-03-02 15:09:44 +0400 |
commit | f165316cfcaf52875d56fdf99404c1cf483cb05d (patch) | |
tree | 1e3972d5753dd9753ae64a32d3481b5042c37c3e /sql/item_geofunc.cc | |
parent | 08431e7865c1195afdc167a74b97ad932a0a58a7 (diff) | |
download | mariadb-git-f165316cfcaf52875d56fdf99404c1cf483cb05d.tar.gz |
after merge fix (bug #26038)
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
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; } |