diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-08 15:38:15 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-08 15:38:15 +0500 |
commit | 67e937095cec8aa922ff3ea971204d59ee3047ff (patch) | |
tree | 611143cd07430b4c9a947ce1cc18aa6e8d35660f /sql/gcalc_tools.cc | |
parent | e182ae27cd11548feeb59306799aea3c342e8af9 (diff) | |
download | mariadb-git-67e937095cec8aa922ff3ea971204d59ee3047ff.tar.gz |
Fix for bug #804259 Second assertion in Gis_geometry_collection::init_from_opresult.
A polygon has no right to have holes that are actually points.
So just skip them when we collect the result of an operation.
per-file comments:
mysql-test/r/gis-precise.result
Fix for bug #804259 Second assertion in Gis_geometry_collection::init_from_opresult.
test result updated.
mysql-test/t/gis-precise.test
Fix for bug #804259 Second assertion in Gis_geometry_collection::init_from_opresult.
test case added.
sql/gcalc_tools.cc
Fix for bug #804259 Second assertion in Gis_geometry_collection::init_from_opresult.
Skip the point in the result if it's the hole inside a polygon.
Diffstat (limited to 'sql/gcalc_tools.cc')
-rw-r--r-- | sql/gcalc_tools.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc index a360a4c100a..2a9090a04a1 100644 --- a/sql/gcalc_tools.cc +++ b/sql/gcalc_tools.cc @@ -319,6 +319,11 @@ int Gcalc_result_receiver::complete_shape() { if (cur_shape != Gcalc_function::shape_point) { + if (cur_shape == Gcalc_function::shape_hole) + { + buffer.length(shape_pos); + return 0; + } cur_shape= Gcalc_function::shape_point; buffer.length(buffer.length()-4); } |