INET6

Overview

In 10.6 ES, 10.5 ES:

Stores an INET6 or mapped INET4 network address as a BINARY(16) internally while translating it into a CHAR(39) to the user.

In 10.4 ES:

Not present

See also: Data Types in 10.6 ES, in 10.5 ES, and in 10.4 ES

EXAMPLES

CREATE TABLE inet6_example (
  description VARCHAR(20),
  example INET6
);
INSERT INTO inet6_example VALUES
  ('Normal', '2001:db8::ac43:20e5'),
  ('Long', '2001:0db8:0000:0000:0000:0000:ac43:20e5'),
  ('Hex', 0x20010db80000000000000000ac4320e5),
  ('IPv4 mapped', '::ffff:192.0.2.42'),
  ('IPv4 compatible', '::192.0.2.42');
SELECT * FROM inet6_example;
+-----------------+---------------------+
| description     | example             |
+-----------------+---------------------+
| Normal          | 2001:db8::ac43:20e5 |
| Long            | 2001:db8::ac43:20e5 |
| Hex             | 2001:db8::ac43:20e5 |
| IPv4 mapped     | ::ffff:192.0.2.42   |
| IPv4 compatible | ::192.0.2.42        |
+-----------------+---------------------+

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.5 Enterprise

  • Added in MariaDB Enterprise Server 10.5.3-1.

10.4 Enterprise

  • Not present.

EXTERNAL REFERENCES