ST_IsValid(g)

Returns 1 if the argument is syntactically well-formed and is
geometrically valid, 0 if the argument is not syntactically well-formed
or is not geometrically valid. If the argument is NULL, the return
value is NULL. Geometry validity is defined by the OGC specification.

The only valid empty geometry is represented in the form of an empty
geometry collection value. ST_IsValid() returns 1 in this case.

ST_IsValid() works only for the Cartesian coordinate system and
requires a geometry argument with an SRID of 0. An ER_WRONG_ARGUMENTS
(https://dev.mysql.com/doc/mysql-errors/5.7/en/server-error-reference.h
tml#error_er_wrong_arguments) error occurs otherwise.

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

