diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-03-02 15:09:44 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-03-02 15:09:44 +0400 |
commit | d4272a16deb9aa1b2428e446b2321697aebf9d94 (patch) | |
tree | 1e3972d5753dd9753ae64a32d3481b5042c37c3e /sql/item_geofunc.cc | |
parent | 6842f6b12ab03b25b9fee9e0aa11ba6eccc98e1f (diff) | |
download | mariadb-git-d4272a16deb9aa1b2428e446b2321697aebf9d94.tar.gz |
after merge fix (bug #26038)
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/include/gis_generic.inc:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/r/archive_gis.result:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/r/gis.result:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/r/innodb_gis.result:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/r/ndb_gis.result:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
mysql-test/t/gis.test:
after merge fix
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.
sql/item_geofunc.cc:
after merge fix
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; } |