summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2012-04-29 17:18:38 +0500
committerAlexey Botchkov <holyfoot@askmonty.org>2012-04-29 17:18:38 +0500
commitd16ea779f814ec10a2cd2cc44a6cacca3bd45705 (patch)
tree4e4d1150ca4bf40dd8023e1a9595027c4f4354c0 /sql/item_geofunc.cc
parentb6ad03cde9367e4fae45f8d84d8175599fab61e9 (diff)
downloadmariadb-git-d16ea779f814ec10a2cd2cc44a6cacca3bd45705.tar.gz
bug #977021 ST_BUFFER fails with the negative D.
Points and lines should disappear if we got negative D. To make it work properly inside the GEOMETRYCOLLECTION, we add the empty operation there. bug #986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int). The double->inernal coord conversion produced -0 (minus zero) on some data. That minus-zero produces invalid comparison results when compared agains plus-zero. So we fixed the gcalc_set_double() to avoid it. per-file comments: mysql-test/r/gis-precise.result result updated. mysql-test/t/gis-precise.test tests for #977021 and #986977 added. sql/gcalc_slicescan.cc bug #986977. The gcalc_set_double fixed to not produce minus-zero. sql/item_geofunc.cc bug #977021. Add the NOOP for the disappearing features.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index e1f06824d5b..fdd3cab8273 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1010,6 +1010,13 @@ static void calculate_perpendicular(
int Item_func_buffer::Transporter::single_point(double x, double y)
{
+ if (buffer_op == Gcalc_function::op_difference)
+ {
+ m_fn->add_operation(Gcalc_function::op_false, 0);
+ return 0;
+ }
+
+ m_nshapes= 0;
return add_point_buffer(x, y);
}
@@ -1109,6 +1116,7 @@ int Item_func_buffer::Transporter::start_line()
{
if (buffer_op == Gcalc_function::op_difference)
{
+ m_fn->add_operation(Gcalc_function::op_false, 0);
skip_line= TRUE;
return 0;
}