Commit graph

23 commits

Author SHA1 Message Date
Oleksandr Byelkin
ef7cb0a0b5 Merge branch '10.1' into 10.2 2020-08-02 11:05:29 +02:00
Ian Gilfillan
d2982331a6 Code comment spellfixes 2020-07-22 23:18:12 +02:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Michal Schorm
17b4f99928 Update FSF address
This commit is based on the work of Michal Schorm, rebased on the
earliest MariaDB version.

Th command line used to generate this diff was:

find ./ -type f \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \
  -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
2019-05-10 20:52:00 +03:00
Alexey Botchkov
e89b611dc9 MDEV-16050 cte + geometry functions lead to crash.
Structures based on Gcalc_dyn_list need to be treated
properly when copied in Item::get_copy().
2018-09-16 10:22:32 +04:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Sergei Golubchik
11b77e9b18 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
5.5 part of the fix
2016-03-18 16:55:11 +01:00
Sergei Golubchik
5f078cc8ff compilation errors on sparc sun studio 10
1. unused static inline functions are only removed at -xO4,
   otherwise test binaries will depend on various mysys
   symbols that they don't use. Link test with libmysys.

2. Sphinx - don't instantiate (explicitly) templates before
   they're defined. Or, rather, don't instantiate them explicitly at
   all.

3. GIS - don't use anonymous unions and structs.
2016-02-15 12:51:35 +01:00
Alexey Botchkov
fc9d34cabf bug #901655 ST_BUFFER asserts with a coplicated shape.
Coinciding nodes can appear as a result of DOUBLE inaccuracy.
        We should test that before we start the loop.

        Also the spatial relations can be calculated faster if we check
        MBR relations first. And we do have the shape's MBR-s now.

per-file comments:
  sql/gcalc_slicescan.cc
        set_extent() method added.
bug #901655 ST_BUFFER asserts with a coplicated shape.
  sql/gcalc_slicescan.h
        set_extent() method declared.
bug #901655 ST_BUFFER asserts with a coplicated shape.
  sql/gcalc_tools.cc
bug #901655 ST_BUFFER asserts with a coplicated shape.
        checks for equal nodes added.
  sql/item_geofunc.cc
bug #901655 ST_BUFFER asserts with a coplicated shape.
        MBR for the shapes calculated, and MBR checks added before we
        start the heavy calculations.
  sql/spatial.h
bug #901655 ST_BUFFER asserts with a coplicated shape.
        MBR::buffer() method implemented.
2011-12-08 16:29:45 +04:00
Alexey Botchkov
5a4c91003a Fix for bug #809849 spatial operations must be KILL-able.
Checks for thd->killed state added to the long loops in geometry calculations.

per-file comments:
  sql/gcalc_slicescan.cc
Fix for bug #809849 spatial operations must be KILL-able.
        checks for TERMINATED_STATE added.
  sql/gcalc_slicescan.h
Fix for bug #809849 spatial operations must be KILL-able.
        defines added to include checks for termination in the
        library.
  sql/gcalc_tools.cc
Fix for bug #809849 spatial operations must be KILL-able.
        checks for TERMINATED_STATE added.
  sql/gcalc_tools.h
Fix for bug #809849 spatial operations must be KILL-able.
        TERMINATED_STATE pointers added.
  sql/item_geofunc.cc
Fix for bug #809849 spatial operations must be KILL-able.
  sql/item_geofunc.h
Fix for bug #809849 spatial operations must be KILL-able.
2011-11-20 12:30:43 +04:00
Alexey Botchkov
47022d2ee2 GCALC_CHECK_WITH_FLOAT disabled.
That's not a good option for an onrdinary user.
2011-11-18 17:56:42 +04:00
Alexey Botchkov
248f2da679 GIS code cleanup. 2011-10-16 19:55:37 +05:00
Alexey Botchkov
c34a8ed827 repeating calcualtions eliminated. 2011-10-14 17:57:07 +05:00
Alexey Botchkov
8432284d4f GIS code.
Forward calculations introduced.

per-file comments:
  sql/gcalc_slicescan.cc
  sql/gcalc_slicescan.h
  sql/gcalc_tools.cc
  sql/gcalc_tools.h
  sql/item_geofunc.cc
2011-10-14 16:10:55 +05:00
Alexey Botchkov
bf2deb5ed3 Copyright notices fixed. 2011-10-06 17:41:28 +05:00
Alexey Botchkov
0048f0b1ae Valgrind warning fixed.
Coordinate size limitation removed.

per-file comments:
  mysql-test/r/gis-precise.result
        test result updated.
  sql/gcalc_slicescan.cc
        Check coordinate extent to pick better precidion in the ::set_double()
  sql/gcalc_slicescan.h
        free_list() can lead to valgrind warnig. Fixed
  sql/gcalc_tools.cc
        free_list() call changed.
2011-10-05 14:45:39 +05:00
Alexey Botchkov
0edb291d3a GIS code cleanup.
GCALC_xxx macros fixed for the GCALC_DBUG_OFF case.

per-file comments:
  sql/gcalc_slicescan.h
GIS code cleanup.
2011-10-04 15:29:39 +05:00
Alexey Botchkov
e99850774b GIS library code cleanup.
GCALC_DBUG_OFF and related infrastructure defined so we can enable/disable debugging conveniently.

per-file comments:
  sql/gcalc_slicescan.cc
GIS library code cleanup.
  sql/gcalc_slicescan.h
GIS library code cleanup.
  sql/gcalc_tools.cc
GIS library code cleanup.
  sql/gcalc_tools.h
GIS library code cleanup.
2011-10-04 15:01:21 +05:00
Alexey Botchkov
5123f59ed2 fixed bugs
855485  ST_CROSSES returns different result than PostGIS for overlapping polygons
855487  ST_WITHIN returns wrong result for partially overlapping polygons
855492  ST_WITHIN returns TRUE on point on the edge of a polygon
855497  ST_ENVELOPE of GEOMETRYCOLLECTION EMPTY returns NULL and not GEOMETRYCOLLECTION EMPTY
855503  ST_EQUALS reports TRUE between a POLYGON and a MULTILINESTRING
855505  ST_TOUCHES reports TRUE for intersecting polygon and linestring

        Changed the way weird functions like Crosses or Touches treated.
        Added BORDER handling to the Gcalc_function.

per-file comments:
  mysql-test/r/gis-precise.result
        GIS bugs fixed.
        test result updated.
  mysql-test/t/gis-precise.test
        GIS bugs fixed.
        test cases added.
  sql/gcalc_slicescan.h
        GIS bugs fixed.
  sql/gcalc_tools.cc
        GIS bugs fixed.
  sql/gcalc_tools.h
        GIS bugs fixed.
  sql/item_create.cc
        GIS bugs fixed.
  sql/item_geofunc.cc
        GIS bugs fixed.
  sql/item_geofunc.h
        GIS bugs fixed.
  sql/spatial.cc
        GIS bugs fixed.
2011-09-22 18:53:36 +05:00
Alexey Botchkov
0249413a6a several bugs fixed here.
849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        849791  Fourth assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
        849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        848901   Assertion `fabs(cur_isc->x-m_cur_intersection->x) + fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis
        
per-file comments:
  mysql-test/r/gis-precise.result
        test result updated.
  mysql-test/r/gis.result
        test result updated.
  sql/gcalc_slicescan.cc
        bugfixes.
  sql/gcalc_slicescan.h
        bugfixes.
  sql/gcalc_tools.cc
        bugfixes.
  sql/gcalc_tools.h
        bugfixes.
  sql/item_geofunc.cc
        bugfixes.
  sql/spatial.cc
        bugfixes.
2011-09-21 00:04:41 +05:00
Alexey Botchkov
3882c5d62c 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.
2011-09-13 13:59:11 +05:00
Alexey Botchkov
152f3c5e28 PostGIS-style 'same point' handling. 2011-09-01 11:44:56 +05:00
Alexey Botchkov
788043cd0b Precise GIS functions added. 2011-05-04 23:20:17 +05:00