IS_IPV6() has been available since MariaDB 10.0.12.
IS_IPV6(expr)
Returns 1 if the expression is a valid IPv6 address specified as a string, otherwise returns 0. Does not consider IPv4 addresses to be valid IPv6 addresses.
SELECT IS_IPV6('48f3::d432:1431:ba23:846f'); +--------------------------------------+ | IS_IPV6('48f3::d432:1431:ba23:846f') | +--------------------------------------+ | 1 | +--------------------------------------+ 1 row in set (0.02 sec) SELECT IS_IPV6('10.0.1.1'); +---------------------+ | IS_IPV6('10.0.1.1') | +---------------------+ | 0 | +---------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/is_ipv6/