diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2012-04-29 17:18:38 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2012-04-29 17:18:38 +0500 |
commit | d16ea779f814ec10a2cd2cc44a6cacca3bd45705 (patch) | |
tree | 4e4d1150ca4bf40dd8023e1a9595027c4f4354c0 /sql/gcalc_slicescan.cc | |
parent | b6ad03cde9367e4fae45f8d84d8175599fab61e9 (diff) | |
download | mariadb-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/gcalc_slicescan.cc')
-rw-r--r-- | sql/gcalc_slicescan.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc index cd3717f186a..251869cad03 100644 --- a/sql/gcalc_slicescan.cc +++ b/sql/gcalc_slicescan.cc @@ -576,7 +576,7 @@ int gcalc_set_double(Gcalc_internal_coord *c, double d, double ext) c[1]= 0; c[0]++; } - if (sign) + if (sign && (c[0] | c[1])) c[0]|= GCALC_COORD_MINUS; #ifdef GCALC_CHECK_WITH_FLOAT GCALC_DBUG_ASSERT(de_check(d, gcalc_get_double(c, 2))); |