diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-09-04 19:11:04 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-09-04 19:11:04 +0500 |
commit | eefff87652cde1cb0c986fd167ed057e87230250 (patch) | |
tree | 610484de1f8231ab6291ebb0678a12927c2d424f /sql/gstream.h | |
parent | c937b7588f007d24c1cf93ee0b2da9e0e244d711 (diff) | |
download | mariadb-git-eefff87652cde1cb0c986fd167ed057e87230250.tar.gz |
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
We didn't implement an empty geometry. And returning NULL instead of it is not
quite correct. So here is the implementation of the empty value as GEOMETRYCOLLECTION().
per-file comments:
mysql-test/r/gis-precise.result
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test result updated.
mysql-test/r/gis.result
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test result updated.
mysql-test/t/gis-precise.test
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test case added.
mysql-test/t/gis.test
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
test case added.
sql/field.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
store GEOMETRYCOLLECTION() properly.
sql/gcalc_tools.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
create the GEOMETRYCOLLECTION() for the empty result.
sql/gstream.h
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
next_symbol() added.
sql/spatial.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
code modified to handle 0 geometries in the GEOMETRYCOLLECTION properly.
Diffstat (limited to 'sql/gstream.h')
-rw-r--r-- | sql/gstream.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/gstream.h b/sql/gstream.h index 1ef90ad5bf0..a1850e9a333 100644 --- a/sql/gstream.h +++ b/sql/gstream.h @@ -57,6 +57,14 @@ public: m_cur++; return 0; } + /* Returns the next notempty character. */ + char next_symbol() + { + skip_space(); + if (m_cur >= m_limit) + return 0; /* EOL meet. */ + return *m_cur; + } void set_error_msg(const char *msg); // caller should free this pointer |