Commit a4f7d859 authored by Alexey Botchkov's avatar Alexey Botchkov

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.
parent 6c5e4c9b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment