Fix for AsText() spatial function

parent 64943e08
......@@ -2128,12 +2128,16 @@ String *Item_func_as_text::val_str(String *str)
{
String *wkt = args[0]->val_str(str);
Geometry geom;
str->length(0);
if ((null_value=(args[0]->null_value ||
geom.create_from_wkb(wkt->ptr(),wkt->length()) ||
geom.as_wkt(str))))
geom.create_from_wkb(wkt->ptr(),wkt->length()))))
return 0;
str->length(0);
if ((null_value=geom.as_wkt(str)))
return 0;
return str;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment