ST_ConvexHull(g)

Returns a geometry that represents the convex hull of the geometry
value g. If the argument is NULL, the return value is NULL.

This function computes a geometry's convex hull by first checking
whether its vertex points are colinear. The function returns a linear
hull if so, a polygon hull otherwise. This function processes geometry
collections by extracting all vertex points of all components of the
collection, creating a MultiPoint value from them, and computing its
convex hull. If the argument is an empty geometry collection, the
return value is NULL.

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

