diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-02-13 11:21:51 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-02-13 11:21:51 +0400 |
commit | 7f1d3ea03816d579e80b30d9a8957fc58c977c49 (patch) | |
tree | c8f4a1b41145ecc4119287c409e3fc234d55d504 | |
parent | 8ae8145813d1a116e7c81c0092e0df93d0005a9f (diff) | |
download | mariadb-git-7f1d3ea03816d579e80b30d9a8957fc58c977c49.tar.gz |
item_strfunc.cc:
Fix
sql/item_strfunc.cc:
Fix
-rw-r--r-- | sql/item_strfunc.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 308e6e89284..05497202351 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2576,15 +2576,15 @@ String *Item_func_geometry_type::val_str(String *str) String *Item_func_envelope::val_str(String *str) { - String arg_val; - String *wkb = args[0]->val_str(&arg_val); + String *res = args[0]->val_str(str); Geometry geom; - - null_value = args[0]->null_value || - geom.create_from_wkb(wkb->ptr(),wkb->length()) || - geom.envelope(str); - - return null_value ? 0 : str; + + if ((null_value = args[0]->null_value || + geom.create_from_wkb(res->ptr(),res->length()))) + return 0; + + res->length(0); + return (null_value= geom.envelope(res)) ? 0 : res; } |