ST_MakeEnvelope(pt1, pt2)

Returns the rectangle that forms the envelope around two points, as a
Point, LineString, or Polygon.

Calculations are done using the Cartesian coordinate system rather than
on a sphere, spheroid, or on earth.

Given two points pt1 and pt2, ST_MakeEnvelope() creates the result
geometry on an abstract plane like this:

o If pt1 and pt2 are equal, the result is the point pt1.

o Otherwise, if (pt1, pt2) is a vertical or horizontal line segment,
  the result is the line segment (pt1, pt2).

o Otherwise, the result is a polygon using pt1 and pt2 as diagonal
  points.

The result geometry has an SRID of 0.

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

o If the arguments are not Point values, an ER_WRONG_ARGUMENTS error
  occurs.

o An ER_GIS_INVALID_DATA error occurs for the additional condition that
  any coordinate value of the two points is infinite or NaN.

o If any geometry has an SRID value for a geographic spatial reference
  system (SRS), an ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS error occurs.

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

