ST_Validate(g)

Validates a geometry according to the OGC specification. ST_Validate()
returns the geometry if it is a valid geometry byte string and is
geometrically valid, NULL if the argument is not a valid geometry byte
string or is not geometrically valid or is NULL.

A geometry can be a valid geometry byte string (WKB value plus SRID)
but geometrically invalid. For example, this polygon is geometrically
invalid: POLYGON((0 0, 0 0, 0 0, 0 0, 0 0))

ST_Validate() can be used to filter out invalid geometry data, although
at a cost. For applications that require more precise results not
tainted by invalid data, this penalty may be worthwhile.

If the geometry argument is valid, it is returned as is, except that if
an input Polygon or MultiPolygon has clockwise rings, those rings are
reversed before checking for validity. If the geometry is valid, the
value with the reversed rings is returned.

The only valid empty geometry is represented in the form of an empty
geometry collection value. ST_Validate() returns it directly without
further checks in this case.

ST_Validate() works only for the Cartesian coordinate system and
requires a geometry argument with an SRID of 0. An ER_WRONG_ARGUMENTS
error occurs otherwise.

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

