Returns 1 if the argument is a valid IPv4 address specified as a string, 0 otherwise. Returns NULL if expr is NULL.
SELECT IS_IPV4('10.0.5.9'), IS_IPV4('10.0.5.256');
1, 0
For a given argument, if IS_IPV4() returns 1, INET_ATON() (and INET6_ATON()) returns non-NULL. The converse statement is not true: In some cases, INET_ATON() returns non-NULL when IS_IPV4() returns 0.
SELECT IS_IPV4('10.0.5.9'), IS_IPV4('10.0.5.256');
1, 0