SET @tmp=ST_GIS_DEBUG(1);
DROP TABLE IF EXISTS p1;
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
BEGIN
DECLARE g GEOMETRY;
SET g=GeomFromText(geom);
SELECT geom AS `-----`;
SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area;
END|
#
# Testing ST_BUFFER with positive distance
#
-----
POINT(0 0))
dist	buffer	buf_area
1	POLYGON	3.14
Warnings:
Warning	1105	[0] op_shape[0]shape_polygon
-----
LineString(0 1, 1 1))
dist	buffer	buf_area
1	POLYGON	5.14
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_shape[0]shape_polygon
-----
LineString(9 9,8 1,1 5,0 0)
dist	buffer	buf_area
1	POLYGON	44.63
Warnings:
Warning	1105	[0] op_union[3]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
-----
Polygon((2 2,2 8,8 8,8 2,2 2))
dist	buffer	buf_area
1	POLYGON	63.14
Warnings:
Warning	1105	[0] op_union[5]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
Warning	1105	[4] op_shape[3]shape_polygon
Warning	1105	[5] op_shape[4]shape_polygon
-----
Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
dist	buffer	buf_area
1	POLYGON	95.14
Warnings:
Warning	1105	[0] op_union[9]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
Warning	1105	[4] op_shape[3]shape_polygon
Warning	1105	[5] op_shape[4]shape_polygon
Warning	1105	[6] op_shape[5]shape_polygon
Warning	1105	[7] op_shape[6]shape_polygon
Warning	1105	[8] op_shape[7]shape_polygon
Warning	1105	[9] op_shape[8]shape_polygon
-----
Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
dist	buffer	buf_area
1	POLYGON	174.93
Warnings:
Warning	1105	[0] op_union[7]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
Warning	1105	[4] op_shape[3]shape_polygon
Warning	1105	[5] op_shape[4]shape_polygon
Warning	1105	[6] op_shape[5]shape_polygon
Warning	1105	[7] op_shape[6]shape_polygon
-----
MultiPoint(9 9,8 1,1 5)
dist	buffer	buf_area
1	MULTIPOLYGON	9.42
Warnings:
Warning	1105	[0] op_union[3]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
-----
MultiLineString((0 0,2 2))
dist	buffer	buf_area
1	POLYGON	8.80
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[1]
Warning	1105	[2] op_shape[0]shape_polygon
-----
MultiLineString((0 0,2 2,0 4))
dist	buffer	buf_area
1	POLYGON	14.24
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
-----
MultiLineString((0 0,2 2),(0 2,2 0))
dist	buffer	buf_area
1	POLYGON	13.59
Warnings:
Warning	1105	[0] op_union[2]
Warning	1105	[1] op_union[1]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_union[1]
Warning	1105	[4] op_shape[1]shape_polygon
-----
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
dist	buffer	buf_area
1	MULTIPOLYGON	70.06
Warnings:
Warning	1105	[0] op_union[3]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_union[1]
Warning	1105	[5] op_shape[2]shape_polygon
Warning	1105	[6] op_union[1]
Warning	1105	[7] op_shape[3]shape_polygon
-----
MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
dist	buffer	buf_area
1	POLYGON	73.18
Warnings:
Warning	1105	[0] op_union[2]
Warning	1105	[1] op_union[5]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
Warning	1105	[7] op_union[4]
Warning	1105	[8] op_shape[5]shape_polygon
Warning	1105	[9] op_shape[6]shape_polygon
Warning	1105	[10] op_shape[7]shape_polygon
Warning	1105	[11] op_shape[8]shape_polygon
-----
MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
dist	buffer	buf_area
1	POLYGON	73.18
Warnings:
Warning	1105	[0] op_union[2]
Warning	1105	[1] op_union[9]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
Warning	1105	[7] op_shape[5]shape_polygon
Warning	1105	[8] op_shape[6]shape_polygon
Warning	1105	[9] op_shape[7]shape_polygon
Warning	1105	[10] op_shape[8]shape_polygon
Warning	1105	[11] op_union[4]
Warning	1105	[12] op_shape[9]shape_polygon
Warning	1105	[13] op_shape[10]shape_polygon
Warning	1105	[14] op_shape[11]shape_polygon
Warning	1105	[15] op_shape[12]shape_polygon
-----
GeometryCollection(Point(0 0))
dist	buffer	buf_area
1	POLYGON	3.14
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_shape[0]shape_polygon
-----
GeometryCollection(LineString(0 0, 2 2)))
dist	buffer	buf_area
1	POLYGON	8.80
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[1]
Warning	1105	[2] op_shape[0]shape_polygon
-----
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
dist	buffer	buf_area
1	POLYGON	63.14
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[5]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
-----
GeometryCollection(MultiPoint(9 9,8 1,1 5))
dist	buffer	buf_area
1	MULTIPOLYGON	9.42
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[3]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
-----
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
dist	buffer	buf_area
1	MULTIPOLYGON	10.28
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_union[1]
Warning	1105	[3] op_shape[0]shape_polygon
Warning	1105	[4] op_union[1]
Warning	1105	[5] op_shape[1]shape_polygon
-----
GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
dist	buffer	buf_area
1	MULTIPOLYGON	48.28
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_union[5]
Warning	1105	[3] op_shape[0]shape_polygon
Warning	1105	[4] op_shape[1]shape_polygon
Warning	1105	[5] op_shape[2]shape_polygon
Warning	1105	[6] op_shape[3]shape_polygon
Warning	1105	[7] op_shape[4]shape_polygon
Warning	1105	[8] op_union[5]
Warning	1105	[9] op_shape[5]shape_polygon
Warning	1105	[10] op_shape[6]shape_polygon
Warning	1105	[11] op_shape[7]shape_polygon
Warning	1105	[12] op_shape[8]shape_polygon
Warning	1105	[13] op_shape[9]shape_polygon
-----
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
dist	buffer	buf_area
1	POLYGON	75.92
Warnings:
Warning	1105	[0] op_union[3]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_union[1]
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_union[5]
Warning	1105	[5] op_shape[2]shape_polygon
Warning	1105	[6] op_shape[3]shape_polygon
Warning	1105	[7] op_shape[4]shape_polygon
Warning	1105	[8] op_shape[5]shape_polygon
Warning	1105	[9] op_shape[6]shape_polygon
#
# Testing ST_BUFFER with zero distance
#
-----
POINT(0 0))
dist	buffer	buf_area
0	POINT	0.00
-----
LineString(0 1, 1 1))
dist	buffer	buf_area
0	LINESTRING	0.00
-----
LineString(9 9,8 1,1 5,0 0)
dist	buffer	buf_area
0	LINESTRING	0.00
-----
Polygon((2 2,2 8,8 8,8 2,2 2))
dist	buffer	buf_area
0	POLYGON	36.00
-----
Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
dist	buffer	buf_area
0	POLYGON	48.00
-----
Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
dist	buffer	buf_area
0	POLYGON	116.00
-----
MultiPoint(9 9,8 1,1 5)
dist	buffer	buf_area
0	MULTIPOINT	0.00
-----
MultiLineString((0 0,2 2))
dist	buffer	buf_area
0	MULTILINESTRING	0.00
-----
MultiLineString((0 0,2 2,0 4))
dist	buffer	buf_area
0	MULTILINESTRING	0.00
-----
MultiLineString((0 0,2 2),(0 2,2 0))
dist	buffer	buf_area
0	MULTILINESTRING	0.00
-----
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
dist	buffer	buf_area
0	MULTILINESTRING	0.00
-----
MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
dist	buffer	buf_area
0	MULTIPOLYGON	66.00
-----
MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
dist	buffer	buf_area
0	MULTIPOLYGON	62.00
-----
GeometryCollection(Point(0 0))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	0.00
-----
GeometryCollection(LineString(0 0, 2 2)))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	0.00
-----
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	36.00
-----
GeometryCollection(MultiPoint(9 9,8 1,1 5))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	0.00
-----
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	0.00
-----
GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	18.00
-----
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
dist	buffer	buf_area
0	GEOMETRYCOLLECTION	36.00
#
# Testing ST_BUFFER with negative distance
#
-----
POINT(0 0))
dist	buffer	buf_area
-1	NULL	NULL
-----
LineString(0 1, 1 1))
dist	buffer	buf_area
-1	NULL	NULL
-----
LineString(9 9,8 1,1 5,0 0)
dist	buffer	buf_area
-1	NULL	NULL
-----
Polygon((2 2,2 8,8 8,8 2,2 2))
dist	buffer	buf_area
-1	POLYGON	16.00
Warnings:
Warning	1105	[0] op_difference[5]
Warning	1105	[1] op_shape[0]shape_polygon
Warning	1105	[2] op_shape[1]shape_polygon
Warning	1105	[3] op_shape[2]shape_polygon
Warning	1105	[4] op_shape[3]shape_polygon
Warning	1105	[5] op_shape[4]shape_polygon
-----
MultiPoint(9 9,8 1,1 5)
dist	buffer	buf_area
-1	NULL	NULL
-----
MultiLineString((0 0,2 2))
dist	buffer	buf_area
-1	NULL	NULL
-----
MultiLineString((0 0,2 2,0 4))
dist	buffer	buf_area
-1	NULL	NULL
-----
MultiLineString((0 0,2 2),(0 2,2 0))
dist	buffer	buf_area
-1	NULL	NULL
-----
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
dist	buffer	buf_area
-1	NULL	NULL
-----
GeometryCollection(Point(0 0))
dist	buffer	buf_area
-1	NULL	NULL
Warnings:
Warning	1105	[0] op_union[0]
-----
GeometryCollection(LineString(0 0, 2 2)))
dist	buffer	buf_area
-1	NULL	NULL
Warnings:
Warning	1105	[0] op_union[0]
-----
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
dist	buffer	buf_area
-1	POLYGON	16.00
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_difference[5]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
-----
GeometryCollection(MultiPoint(9 9,8 1,1 5))
dist	buffer	buf_area
-1	NULL	NULL
Warnings:
Warning	1105	[0] op_union[0]
-----
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
dist	buffer	buf_area
-1	NULL	NULL
Warnings:
Warning	1105	[0] op_union[0]
-----
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
dist	buffer	buf_area
-1	POLYGON	16.00
Warnings:
Warning	1105	[0] op_union[1]
Warning	1105	[1] op_difference[5]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
SELECT ST_CONTAINS(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)'));
ST_CONTAINS(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)'))
0
Warnings:
Warning	1105	[0] op_backdifference[2]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_point
SELECT AsText(ST_UNION(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)')));
AsText(ST_UNION(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)')))
GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),POLYGON((6 6,6 11,11 11,11 6,6 6)),POINT(5 10))
Warnings:
Warning	1105	[0] op_union[2]
Warning	1105	[1] op_union[2]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_point
DROP PROCEDURE p1;
#
# Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
#
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3));
GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3))
POLYGON
Warnings:
Warning	1105	[0] op_union[2]
Warning	1105	[1] op_union[4]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_union[4]
Warning	1105	[7] op_shape[4]shape_polygon
Warning	1105	[8] op_shape[5]shape_polygon
Warning	1105	[9] op_shape[6]shape_polygon
Warning	1105	[10] op_shape[7]shape_polygon
#
# Bug #13832749 	HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
#
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1))
POLYGON
Warnings:
Warning	1105	[0] op_union[3]
Warning	1105	[1] op_union[5]
Warning	1105	[2] op_shape[0]shape_polygon
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
Warning	1105	[6] op_shape[4]shape_polygon
Warning	1105	[7] op_union[9]
Warning	1105	[8] op_shape[5]shape_polygon
Warning	1105	[9] op_shape[6]shape_polygon
Warning	1105	[10] op_shape[7]shape_polygon
Warning	1105	[11] op_shape[8]shape_polygon
Warning	1105	[12] op_shape[9]shape_polygon
Warning	1105	[13] op_shape[10]shape_polygon
Warning	1105	[14] op_shape[11]shape_polygon
Warning	1105	[15] op_shape[12]shape_polygon
Warning	1105	[16] op_shape[13]shape_polygon
Warning	1105	[17] op_union[4]
Warning	1105	[18] op_shape[14]shape_polygon
Warning	1105	[19] op_shape[15]shape_polygon
Warning	1105	[20] op_shape[16]shape_polygon
Warning	1105	[21] op_shape[17]shape_polygon
#
# Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
#
DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
SELECT ST_WITHIN(
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) '))));
ST_WITHIN(
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) ')
0
Warnings:
Warning	1105	[0] op_difference[2]
Warning	1105	[1] op_shape[0]shape_line
Warning	1105	[2] op_union[3]
Warning	1105	[3] op_shape[1]shape_polygon
Warning	1105	[4] op_shape[2]shape_polygon
Warning	1105	[5] op_shape[3]shape_polygon
SELECT ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))));
ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))))
2
SELECT ST_NUMINTERIORRINGS(
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))));
ST_NUMINTERIORRINGS(
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))))
0
SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))))
POLYGON((9 9,5 2,4 5,9 9))
