INET6

In 10.5 ES, 10.5 CS:

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, 10.4 CS, 10.3 ES, 10.3 CS, 10.2 ES, 10.2 CS:

Not present

See also: Data Types in 10.5 ES, in 10.5 CS, in 10.4 ES, in 10.4 CS, in 10.3 ES, in 10.3 CS, in 10.2 ES, and in 10.2 CS

DETAILS

CHANGE HISTORY

Release Series

History

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.5 Community

  • Added in MariaDB Community Server 10.5.0.

10.4 Enterprise

  • Not present.

10.4 Community

  • Not present.

10.3 Enterprise

  • Not present.

10.3 Community

  • Not present.

10.2 Enterprise

  • Not present.

10.2 Community

  • Not present.

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        |
+-----------------+---------------------+

EXTERNAL REFERENCES