ST_IsClosed(ls)

For a LineString value ls, ST_IsClosed() returns 1 if ls is closed
(that is, its ST_StartPoint() and ST_EndPoint() values are the same).

For a MultiLineString value ls, ST_IsClosed() returns 1 if ls is closed
(that is, the ST_StartPoint() and ST_EndPoint() values are the same for
each LineString in ls).

ST_IsClosed() returns 0 if ls is not closed, and NULL if ls is NULL.

URL: http://dev.mysql.com/doc/refman/5.7/en/gis-linestring-property-functions.html

