--source include/have_geometry.inc

--echo #
--echo # Bug #25062396 / #83739 "Assertion `cur_shape != Gcalc_function::shape_point' failed"
--echo # fixed in 5.6.39, 5.7.21, 8.0.4
--echo # For geometry calculations, invalid input parameters could lead to an
--echo # incorrect result buffer and cause an assertion to be raised or a
--echo # server exit
--echo #

SELECT ST_ASTEXT(
  ST_DIFFERENCE(
    ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(' 'POINT(-5 -4),' 'POLYGON((-5 1,7 -7,10 0,-10 8,-7 9,-5 1)))'),
    ST_GEOMFROMTEXT('LINESTRING(5 3,7 -3,5 0,-6 -9,-4 9,-3 -8,10 1,10 -9,5 -3,4 -2,1 -3,-8 -5,4 -7,-2 -8)')
  )
);
