TO_IPV6

SinceVersion dev

TO_IPV6

description

Syntax

IPV6 TO_IPV6(STRING ipv6_str)

Convert a string form of IPv6 address to IPv6 type. If the IPv6 address has an invalid format, throw an exception. Similar to ipv6_string_to_num function, which converts IPv6 address to binary format.

notice

Input cannot be NULL. If it is NULL, an exception will be thrown.

example

1. mysql> select to_ipv6('::');
2. +---------------+
3. | to_ipv6('::') |
4. +---------------+
5. | ::            |
6. +---------------+

keywords

TO_IPV6, IP