1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

A cleanup for: MDEV-18010 Add classes Inet4 and Inet6

- Moving the implementations of class Inet4 and class Inet6 into separate
  files sql_type_inet.h and sql_type_inet.cc, in order to reuse them
  for the INET6 data type and inet function collection.
- Adding a warning in the case when IS_IPV4_MAPPED() and IS_IPV4_COMPAT()
  erroneously gets an IPv4 address instead of the expected IPv6 address.
This commit is contained in:
Alexander Barkov
2019-10-07 19:23:09 +04:00
parent cbf6beba40
commit e0117f1120
6 changed files with 849 additions and 714 deletions

View File

@ -1345,6 +1345,9 @@ SELECT IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')),
IS_IPV4_COMPAT(INET6_ATON('1.2.3.4'));
IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('1.2.3.4'))
0 0
Warnings:
Warning 1292 Incorrect inet6 value: '\x01\x02\x03\x04'
Warning 1292 Incorrect inet6 value: '\x01\x02\x03\x04'
SELECT IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')),
IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4'));
IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4'))