Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23287

The INET4 data type

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.6
    • Component/s: Data types
    • Labels:
      None

      Description

      Under terms of MDEV-274 we added the INET6 data type, to store IPv6 addresses as 16-byte binary strings.

      Let's also add a data type to store IPv4 addresses, as 4-byte binary strings.

      The new data type name will be INET4.

      INET4 should be implemented in the same directory with INET6: plugin/type_inet/, so INET4 and INET6 "know" each other:

      • They should support explicit CAST between each other
      • INET6 should be a super type for INET4.

        SELECT COALEACE(inet4_expr,inet6_expr)
        

        will implicitly cast inet4_expr to INET6 and return a result of the INET6 data type.

        SELECT inet4_expr=inet6_expr)
        

        will implicitly cast inet4_expr to INET6, then compare in INET6 format.

      • They should possibly support implicit CAST between each other in some other cases. The exact list is to be defined.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: