summaryrefslogtreecommitdiff
path: root/sql/gcalc_slicescan.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.4' into 10.5Oleksandr Byelkin2020-08-041-1/+1
|\
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-1/+1
| |\
| | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-1/+1
| | |\
| | | * Code comment spellfixesIan Gilfillan2020-07-221-1/+1
| | | |
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-1/+1
|/ / /
* | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\ \ | | |/
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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' {} \;
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-04-251-0/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-04-251-0/+2
| |\ \ \ | | |/ /
| | * | MDEV-18920 Prepared statements with st_convexhull hang and eat 100% cpu.Alexey Botchkov2019-04-221-0/+2
| | | | | | | | | | | | | | | | | | | | In the case of error when object shapes are half-collected we need to set the NULL at the vertice's list.
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-0/+11
|\ \ \ \ | |/ / /
| * | | MDEV-16050 cte + geometry functions lead to crash.Alexey Botchkov2018-09-161-0/+11
| |/ / | | | | | | | | | | | | Structures based on Gcalc_dyn_list need to be treated properly when copied in Item::get_copy().
* | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+1
|/ / | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | Correct FSF addressiangilfillan2017-03-101-1/+1
| |
* | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-231-133/+133
|\ \ | |/
| * compilation errors on sparc sun studio 10Sergei Golubchik2016-02-151-133/+133
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | MDEV-4045 Missing OGC Spatial functions.Alexey Botchkov2014-11-281-2/+2
|/ | | | | | | | | | | | Missing GIS functions added: IsRing() PointOnSurface PointOnSurface Relate Distance Intersection ConvexHull Other old OpenGis standard inconsistencies fixed.
* bug #977021 ST_BUFFER fails with the negative D.Alexey Botchkov2012-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* 5.3 mergeSergei Golubchik2012-01-131-38/+70
|\
| * GIS issues fixed.Alexey Botchkov2011-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failures on SUN Solaris. Buggy compiler there required some extra initialization for variables. Then the 02 optimization leads to bugs when values set through the pointer are not always taken into account. Finally, the (long long) / (long) crashes there, the explicit typeconverstion added. Failing innodb_plunin.innodb_gis.test fixed. per-file comments: mysql-test/suite/innodb_plugin/t/innodb_gis.test GIS issues fixed. sql/gcalc_slicescan.cc GIS issues fixed. sql/gcalc_tools.cc GIS issues fixed.
| * bug #901655 ST_BUFFER asserts with a coplicated shape.Alexey Botchkov2011-12-081-37/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 5.3->5.5 mergeSergei Golubchik2011-11-271-2/+4
|/
* Small fixes to make compilers happy.Alexey Botchkov2011-11-221-3/+3
|
* Windows has no 'nearbyint' in libraries.Alexey Botchkov2011-11-221-2/+1
| | | | | So removed.
* Fix for bug #809849 spatial operations must be KILL-able.Alexey Botchkov2011-11-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* small fixes to make compiler happy.Alexey Botchkov2011-11-171-1/+1
|
* code cleanup.Alexey Botchkov2011-10-161-48/+0
|
* GIS code cleanup.Alexey Botchkov2011-10-161-414/+426
|
* #define addedAlexey Botchkov2011-10-141-0/+2
|
* repeating calcualtions eliminated.Alexey Botchkov2011-10-141-15/+136
|
* GIS code.Alexey Botchkov2011-10-141-908/+860
| | | | | | | | | | | | 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
* Copyright notices fixed.Alexey Botchkov2011-10-061-0/+1
|
* Valgrind warning fixed.Alexey Botchkov2011-10-051-38/+82
| | | | | | | | | | | | | | | 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.
* GIS library code cleanup.Alexey Botchkov2011-10-041-413/+244
| | | | | | | | | | | | | | | 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.
* bugs fixedAlexey Botchkov2011-09-211-1/+1
| | | | | | | | | | | | | | | | | | 855253 Compiler error: gcalc_slicescan.cc:2036: error: suggest parentheses around comparison in operand of .|. in maria-5.3-gis 850775 ST_AREA does not work on GEOMETRYCOLLECTIONs in maria-5.3-gis per-file comments: mysql-test/r/gis.result test result updated. mysql-test/t/gis.test test case added for 850775. sql/gcalc_slicescan.cc compiler error fixed. sql/spatial.cc ST_AREA implementation for GEOMETRY_COLLECTION, POINT and LINESTRING. sql/spatial.h area() declarations added.
* several bugs fixed here.Alexey Botchkov2011-09-211-137/+1189
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix for bug #848901 Assertion `fabs(cur_isc->x-m_cur_intersection->x) + ↵Alexey Botchkov2011-09-131-1/+1
| | | | | | | | | | | | | | | | | | fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis That assertion's check was too tight. Released it a bit. per-file comments: mysql-test/r/gis-precise.result Fix for bug #848901 test result updated. mysql-test/t/gis-precise.test Fix for bug #848901 test case added. sql/gcalc_slicescan.cc Fix for bug #848901 The DBUG_ASSERT check is too tight here.
* Fix for few similar bugs:Alexey Botchkov2011-09-131-32/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #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.
* PostGIS-style 'same point' handling.Alexey Botchkov2011-09-011-259/+409
|
* Fix for bug #804324 Assertion 0 in ↵Alexey Botchkov2011-07-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Precise GIS functions added.Alexey Botchkov2011-05-041-0/+762