Skip to content
Permalink
Browse files
MDEV-18920 Prepared statements with st_convexhull hang and eat 100% cpu.
In the case of error when object shapes are half-collected we need
to set the NULL at the vertice's list.
  • Loading branch information
Alexey Botchkov committed Apr 22, 2019
1 parent 6c5e4c9 commit a4f7d85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
@@ -505,6 +505,10 @@ GEOMETRYFROMTEXT('POINT(4599 60359)'),
) as relate_res;
relate_res
0
prepare s from 'do st_convexhull(st_aswkb(multipoint(point(-11702,15179),point(-5031,27960),point(-30557,11158),point(-27804,30314))))';
execute s;
execute s;
deallocate prepare s;
DROP TABLE IF EXISTS p1;
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
BEGIN
@@ -381,5 +381,11 @@ SELECT ST_RELATE(
'F*FFFF**F'
) as relate_res;

# MDEV-18920 Prepared statements with st_convexhull hang and eat 100% cpu.
prepare s from 'do st_convexhull(st_aswkb(multipoint(point(-11702,15179),point(-5031,27960),point(-30557,11158),point(-27804,30314))))';
execute s;
execute s;
deallocate prepare s;

--source include/gis_debug.inc

@@ -982,6 +982,8 @@ void Gcalc_heap::reset()
{
if (m_n_points)
{
if (m_hook)
*m_hook= NULL;
free_list(m_first);
m_n_points= 0;
}

0 comments on commit a4f7d85

Please sign in to comment.