ST_Buffer(g, d[, strategy1[, strategy2[, strategy3]]])

Returns a geometry that represents all points whose distance from the
geometry value g is less than or equal to a distance of d, or NULL if
any argument is NULL. The SRID of the geometry argument must be 0
because ST_Buffer() supports only the Cartesian coordinate system. If
any geometry argument is not a syntactically well-formed geometry, an
ER_GIS_INVALID_DATA error occurs.

If the geometry argument is empty, ST_Buffer() returns an empty
geometry.

If the distance is 0, ST_Buffer() returns the geometry argument
unchanged:

mysql> SET @pt = ST_GeomFromText('POINT(0 0)');
mysql> SELECT ST_AsText(ST_Buffer(@pt, 0));
+------------------------------+
| ST_AsText(ST_Buffer(@pt, 0)) |
+------------------------------+
| POINT(0 0)                   |
+------------------------------+

ST_Buffer() supports negative distances for Polygon and MultiPolygon
values, and for geometry collections containing Polygon or MultiPolygon
values. The result may be an empty geometry. An ER_WRONG_ARGUMENTS
error occurs for ST_Buffer() with a negative distance for Point,
MultiPoint, LineString, and MultiLineString values, and for geometry
collections not containing any Polygon or MultiPolygon values.

As of MySQL 5.7.7, ST_Buffer() permits up to three optional strategy
arguments following the distance argument. Strategies influence buffer
computation. These arguments are byte string values produced by the
ST_Buffer_Strategy() function, to be used for point, join, and end
strategies:

o Point strategies apply to Point and MultiPoint geometries. If no
  point strategy is specified, the default is
  ST_Buffer_Strategy('point_circle', 32).

o Join strategies apply to LineString, MultiLineString, Polygon, and
  MultiPolygon geometries. If no join strategy is specified, the
  default is ST_Buffer_Strategy('join_round', 32).

o End strategies apply to LineString and MultiLineString geometries. If
  no end strategy is specified, the default is
  ST_Buffer_Strategy('end_round', 32).

Up to one strategy of each type may be specified, and they may be given
in any order. If multiple strategies of a given type are specified, an
ER_WRONG_ARGUMENTS error occurs.

URL: http://dev.mysql.com/doc/refman/5.7/en/spatial-operator-functions.html

