From 6b64baf3b9c8a6c33dd47be62c0b73ab12157760 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Wed, 21 Sep 2011 12:50:03 +0500 Subject: fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" per-file comments: mysql-test/r/gis.result fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" test result updated. mysql-test/t/gis.test fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" test case added. sql/gstream.cc fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" lookup_next_word() implemented. sql/gstream.h fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" lookup_next_word() added. sql/spatial.cc fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" name changed for the empty geometry. sql/spatial.h fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY" declarations modified. --- sql/spatial.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'sql/spatial.h') diff --git a/sql/spatial.h b/sql/spatial.h index eaf048b7a3d..cec80b3dacf 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -286,18 +286,7 @@ public: const char *wkb, uint32 len, String *res); static int create_from_opresult(Geometry_buffer *g_buf, String *res, Gcalc_result_receiver &rr); - int as_wkt(String *wkt, const char **end) - { - uint32 len= (uint) get_class_info()->m_name.length; - if (wkt->reserve(len + 2, 512)) - return 1; - wkt->qs_append(get_class_info()->m_name.str, len); - wkt->qs_append('('); - if (get_data_as_wkt(wkt, end)) - return 1; - wkt->qs_append(')'); - return 0; - } + int as_wkt(String *wkt, const char **end); inline void set_data_ptr(const char *data, uint32 data_len) { -- cgit v1.2.1