diff options
author | Andrei Elkin <aelkin@mysql.com> | 2009-11-30 14:34:39 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2009-11-30 14:34:39 +0200 |
commit | 3962da934f6e2a92ba04505bd6a33dd7d8322005 (patch) | |
tree | c5510a774ac5e8722c26070e21e3d266d6408381 /sql/item_geofunc.cc | |
parent | 13dad4ebd268e4bf26c4d6f478f19896770d9b78 (diff) | |
parent | a95f54c6d81f20b07e41a7e0e2246ee00641df6c (diff) | |
download | mariadb-git-3962da934f6e2a92ba04505bd6a33dd7d8322005.tar.gz |
merging from 5.1 to rep+2 starting at gca(5.1, next-mr) == build@mysql.com-20091104182209-iui387z35159aoyw
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index a34204b7181..3c5990eb359 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -84,7 +84,9 @@ String *Item_func_geometry_from_wkb::val_str(String *str) if (args[0]->field_type() == MYSQL_TYPE_GEOMETRY) { - return args[0]->val_str(str); + String *str_ret= args[0]->val_str(str); + null_value= args[0]->null_value; + return str_ret; } wkb= args[0]->val_str(&arg_val); @@ -94,7 +96,10 @@ String *Item_func_geometry_from_wkb::val_str(String *str) str->set_charset(&my_charset_bin); if (str->reserve(SRID_SIZE, 512)) - return 0; + { + null_value= TRUE; /* purecov: inspected */ + return 0; /* purecov: inspected */ + } str->length(0); str->q_append(srid); if ((null_value= |