Commit e8b6c964 authored by unknown's avatar unknown

Fix for AsText() spatial function


sql/item_strfunc.cc:
  Fix for the case when argument args[0] and result str are the same strings
parent 48297dbf
......@@ -2129,11 +2129,15 @@ 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