summaryrefslogtreecommitdiff
path: root/sql/gcalc_slicescan.h
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2011-09-13 13:59:11 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2011-09-13 13:59:11 +0500
commit3882c5d62c83f4768c022f38bf91180ce0fcc7a2 (patch)
tree9c3bf39a8c49c9a2b4049f55a4dbd15ca0b2da93 /sql/gcalc_slicescan.h
parenta1315808b4a067fd82877ea1cfbd8867f9a8588a (diff)
downloadmariadb-git-3882c5d62c83f4768c022f38bf91180ce0fcc7a2.tar.gz
Fix for few similar bugs:
#841622 Assertion `t->rp->type == Gcalc_function::shape_line' failed in Gcalc_operation_reducer::end_line in maria-5.3-gi #841625 Assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis #841638 Assertion `!m_prev || m_prev->x != x || m_prev->y != y' failed in Gcalc_shape_transporter::int_add_point in maria-5.3-gis #841662 Third assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos #841745 Assertion `!sp0->is_bottom()' failed in Gcalc_scan_iterator::find_intersections in maria-5.3-gis They mostly was caused by inprecision of double arithmetic. Fixed by changes in how to handle multiple intersections to keep their order right. Also ST_DISTANCE(GEOM, EMPTY_GEOM) was defined as NULL. per-file comments: mysql-test/r/gis-precise.result GIS bugfixes. test result updated. mysql-test/t/gis-precise.test GIS bugfixes. test cases added. sql/gcalc_slicescan.cc GIS bugfixes. If intersections are close, add order checks to cope with the double calcualtions imprecision. sql/gcalc_slicescan.h GIS bugfixes. n_row parameter added to intersection to check their order. sql/item_geofunc.cc GIS bugfixes. ST_DISTANCE(GEOM, EMPTY_GEOM) returns NULL.
Diffstat (limited to 'sql/gcalc_slicescan.h')
-rw-r--r--sql/gcalc_slicescan.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/gcalc_slicescan.h b/sql/gcalc_slicescan.h
index 9ffe39dd370..ebe2bcffe5c 100644
--- a/sql/gcalc_slicescan.h
+++ b/sql/gcalc_slicescan.h
@@ -303,6 +303,7 @@ public:
class intersection : public Gcalc_dyn_list::Item
{
public:
+ int n_row;
sc_thread_id thread_a;
sc_thread_id thread_b;
double x;
@@ -371,7 +372,7 @@ private:
void sort_intersections();
int handle_intersections();
int insert_top_point();
- int add_intersection(const point *a, const point *b,
+ int add_intersection(int n_row, const point *a, const point *b,
Gcalc_dyn_list::Item ***p_hook);
int find_intersections();