ST_MakeEnvelope(pt1, pt2)

Returns the rectangle that forms the envelope around two points. The
returned geometry is a Point, LineString, or Polygon, or NULL if any
argument is NULL.

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. Either or both of pt1 and pt2 can be vertex points.

The result geometry has an SRID of 0.

ST_MakeEnvelope() requires Point geometry arguments with an SRID of 0.
An ER_WRONG_ARGUMENTS error occurs otherwise.

An ER_GIS_INVALID_DATA occurs if any argument is not a valid geometry
byte string, or if any coordinate value of the two points is infinite
(that is, NaN).

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

