Syntax
IS_IPV4_COMPAT(expr)
Purpose
If the INET6_ATON() function is used to return the binary string equivalent of a numeric IPv6 address.
Returns 1 if the argument is a valid IPv4-compatible IPv6 address, and 0 otherwise. An IPv4-compatible address has the format ::ipv4_address. The IPv4 part of an IPv4-compatible address can also be represented in hexadecimal.
Examples
obclient> SELECT IS_IPV4_COMPAT(INET6_ATON('::10.x.x.x'));
+------------------------------------------+
| IS_IPV4_COMPAT(INET6_ATON('::10.x.x.x')) |
+------------------------------------------+
| 1 |
+------------------------------------------+
1 row in set
obclient> SELECT HEX(INET6_ATON('10.10.10.10'));
+---------------------------------+
| HEX(INET6_ATON('10.10.10.10')) |
+---------------------------------+
| C6336501 |
+---------------------------------+
1 row in set
