diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-09-21 12:50:03 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-09-21 12:50:03 +0500 |
commit | 6b64baf3b9c8a6c33dd47be62c0b73ab12157760 (patch) | |
tree | 21d723c86ca82853f27d1ccdc6cfdc1dfe3963fd /sql/gstream.cc | |
parent | 25b5019c34e717aff95bf405e7d5eb15c2bedf75 (diff) | |
download | mariadb-git-6b64baf3b9c8a6c33dd47be62c0b73ab12157760.tar.gz |
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.
Diffstat (limited to 'sql/gstream.cc')
-rw-r--r-- | sql/gstream.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/gstream.cc b/sql/gstream.cc index e2bb41b8541..3eaa46af3bf 100644 --- a/sql/gstream.cc +++ b/sql/gstream.cc @@ -39,6 +39,29 @@ enum Gis_read_stream::enum_tok_types Gis_read_stream::get_next_toc_type() } +bool Gis_read_stream::lookup_next_word(LEX_STRING *res) +{ + const char *cur= m_cur; + + skip_space(); + res->str= (char*) cur; + /* The following will also test for \0 */ + if ((cur >= m_limit) || !my_isvar_start(&my_charset_bin, *cur)) + return 1; + + /* + We can't combine the following increment with my_isvar() because + my_isvar() is a macro that would cause side effects + */ + cur++; + while ((cur < m_limit) && my_isvar(&my_charset_bin, *cur)) + cur++; + + res->length= (uint32) (cur - res->str); + return 0; +} + + bool Gis_read_stream::get_next_word(LEX_STRING *res) { skip_space(); |