TO_IPV6_OR_DEFAULT
SinceVersion dev
TO_IPV6_OR_DEFAULT
description
Syntax
IPV6 TO_IPV6_OR_DEFAULT(STRING ipv6_str)
与to_ipv6函数类似,但如果IPv6地址的格式非法,则返回::。
notice
入参ipv6_str如果为NULL,则返回::。
example
mysql> select to_ipv6_or_default('.');
+-------------------------+
| to_ipv6_or_default('.') |
+-------------------------+
| :: |
+-------------------------+
mysql> select to_ipv6_or_default(NULL);
+--------------------------+
| to_ipv6_or_default(NULL) |
+--------------------------+
| :: |
+--------------------------+
keywords
TO_IPV6_OR_DEFAULT, IP