List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:June 19 2012 11:30am
Subject:bzr push into mysql-trunk branch (alexander.barkov:4019 to 4020)
Bug#13832749 Bug#13833019
View as plain text  
 4020 Alexander Barkov	2012-06-19
      Bug#13833019
      Bug#13832749
      Adding files forgotten in the previous push.

    added:
      mysql-test/include/gis_debug.inc
      mysql-test/r/gis-debug.result
      mysql-test/t/gis-debug.test
 4019 Vasil Dimov	2012-06-19
      Non-functional change - use bool instead of ibool in dict0stats.cc

    modified:
      storage/innobase/dict/dict0stats.cc
=== added file 'mysql-test/include/gis_debug.inc'
--- a/mysql-test/include/gis_debug.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/gis_debug.inc	2012-06-19 11:29:53 +0000
@@ -0,0 +1,139 @@
+#
+# This is a shared file included from t/gis-precise.test and t/gis-debug.test
+#
+# - gis-precise.test is executed both in debug and production builds
+# and makes sure that the checked GIS functions return the expected results.
+# 
+# - gis-debug.test is executed only in debug builds
+# (and is skipped in production builds).
+# gis-debug.test activates tracing of the internal GIS routines.
+# The trace log is printed to the client side warnings.
+# So gis-debug.test makes sure not only that the correct results are returned,
+# but also check *how* these results were generated - makes sure that
+# the internal GIS routines went through the expected data and code flow paths.
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS p1;
+--enable_warnings
+
+DELIMITER |;
+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|
+DELIMITER ;|
+
+--disable_query_log
+
+--echo #
+--echo # Testing ST_BUFFER with positive distance
+--echo #
+
+CALL p1(1, 'POINT(0 0))');
+CALL p1(1, 'LineString(0 1, 1 1))');
+CALL p1(1, 'LineString(9 9,8 1,1 5,0 0)');
+CALL p1(1, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
+CALL p1(1, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
+CALL p1(1, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
+CALL p1(1, 'MultiPoint(9 9,8 1,1 5)');
+CALL p1(1, 'MultiLineString((0 0,2 2))');
+CALL p1(1, 'MultiLineString((0 0,2 2,0 4))');
+CALL p1(1, 'MultiLineString((0 0,2 2),(0 2,2 0))');
+CALL p1(1, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
+CALL p1(1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
+CALL p1(1, '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)))');
+CALL p1(1, 'GeometryCollection(Point(0 0))');
+CALL p1(1, 'GeometryCollection(LineString(0 0, 2 2)))');
+CALL p1(1, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
+CALL p1(1, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
+CALL p1(1, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
+CALL p1(1, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
+CALL p1(1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
+
+
+--echo #
+--echo # Testing ST_BUFFER with zero distance
+--echo #
+
+CALL p1(0, 'POINT(0 0))');
+CALL p1(0, 'LineString(0 1, 1 1))');
+CALL p1(0, 'LineString(9 9,8 1,1 5,0 0)');
+CALL p1(0, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
+CALL p1(0, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
+CALL p1(0, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
+CALL p1(0, 'MultiPoint(9 9,8 1,1 5)');
+CALL p1(0, 'MultiLineString((0 0,2 2))');
+CALL p1(0, 'MultiLineString((0 0,2 2,0 4))');
+CALL p1(0, 'MultiLineString((0 0,2 2),(0 2,2 0))');
+CALL p1(0, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
+CALL p1(0, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
+CALL p1(0, '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)))');
+CALL p1(0, 'GeometryCollection(Point(0 0))');
+CALL p1(0, 'GeometryCollection(LineString(0 0, 2 2)))');
+CALL p1(0, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
+CALL p1(0, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
+CALL p1(0, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
+CALL p1(0, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
+CALL p1(0, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
+
+
+--echo #
+--echo # Testing ST_BUFFER with negative distance
+--echo #
+
+CALL p1(-1, 'POINT(0 0))');
+CALL p1(-1, 'LineString(0 1, 1 1))');
+CALL p1(-1, 'LineString(9 9,8 1,1 5,0 0)');
+CALL p1(-1, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
+#
+# Wrong shape
+# CALL p1(-1, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
+# Wrong shape
+# CALL p1(-1, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
+#
+CALL p1(-1, 'MultiPoint(9 9,8 1,1 5)');
+CALL p1(-1, 'MultiLineString((0 0,2 2))');
+CALL p1(-1, 'MultiLineString((0 0,2 2,0 4))');
+CALL p1(-1, 'MultiLineString((0 0,2 2),(0 2,2 0))');
+CALL p1(-1, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
+#
+# Wrong shape
+#CALL p1(-1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
+#CALL p1(-1, '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)))');
+#
+CALL p1(-1, 'GeometryCollection(Point(0 0))');
+CALL p1(-1, 'GeometryCollection(LineString(0 0, 2 2)))');
+CALL p1(-1, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
+CALL p1(-1, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
+CALL p1(-1, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
+#
+# Wrong shape
+# CALL p1(-1, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
+#
+CALL p1(-1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
+
+
+--enable_query_log
+
+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)'));
+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)')));
+
+DROP PROCEDURE p1;
+
+--echo #
+--echo # Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
+--echo #
+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));
+
+--echo #
+--echo # Bug #13832749 	HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
+--echo #
+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));

=== added file 'mysql-test/r/gis-debug.result'
--- a/mysql-test/r/gis-debug.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/gis-debug.result	2012-06-19 11:29:53 +0000
@@ -0,0 +1,493 @@
+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	MULTIPOLYGON	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	MULTIPOLYGON	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	MULTIPOLYGON	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

=== added file 'mysql-test/t/gis-debug.test'
--- a/mysql-test/t/gis-debug.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/gis-debug.test	2012-06-19 11:29:53 +0000
@@ -0,0 +1,6 @@
+--source include/have_geometry.inc
+--source include/have_debug.inc
+
+SET @tmp=ST_GIS_DEBUG(1);
+
+--source include/gis_debug.inc

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alexander.barkov:4019 to 4020)Bug#13832749 Bug#13833019Alexander Barkov19 Jun