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.

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.

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.

ST_Buffer() handles its arguments as described in the introduction to
this section, with these exceptions:

o For a negative distance for Point, MultiPoint, LineString, and
  MultiLineString values, and for geometry collections not containing
  any Polygon or MultiPolygon values, an ER_WRONG_ARGUMENTS error
  occurs.

o If multiple strategies of a given type are specified, an
  ER_WRONG_ARGUMENTS error occurs.

URL: https://dev.mysql.com/doc/refman/8.0/en/spatial-operator-functions.html

