diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-07 16:59:45 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-07 16:59:45 +0500 |
commit | 13f6e1119f831ecde5a8e82e8a68f2848b2b54a1 (patch) | |
tree | 8d84efe86eecaf6c9a0f6258f9fc0738dad6d583 /sql/gcalc_tools.cc | |
parent | f3b850a7b52b5947eb694b5a1f73d0425de5bb0e (diff) | |
download | mariadb-git-13f6e1119f831ecde5a8e82e8a68f2848b2b54a1.tar.gz |
Fix for bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
There were actually two bugs. One was when the line that intersects itself
the intersection point treated as it doesn't belong to the line.
Second when edges partly coincide, wrong result produced when we try to find their
intersection.
per-file comments:
mysql-test/r/gis-precise.result
Fix for bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
test result updated.
mysql-test/t/gis-precise.test
Fix for bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
test case added.
sql/gcalc_slicescan.cc
Fix for bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
skip the intersection if it just line that intersects itself.
sql/gcalc_tools.cc
Fix for bug #804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection
if edges coincide, just pick the first coinciding poing as an intersection.
Diffstat (limited to 'sql/gcalc_tools.cc')
-rw-r--r-- | sql/gcalc_tools.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc index 11d452cd8cf..a360a4c100a 100644 --- a/sql/gcalc_tools.cc +++ b/sql/gcalc_tools.cc @@ -701,7 +701,8 @@ handle_lines_intersection(active_thread *t0, active_thread *t1, double x, double y) { m_fn->invert_state(p0->shape); - m_fn->invert_state(p1->shape); + if (p0->shape != p1->shape) + m_fn->invert_state(p1->shape); int intersection_state= m_fn->count(); if ((t0->result_range | t1->result_range) == intersection_state) return 0; |