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

Add MAC Address datatype (macaddr/macaddr8)

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None

    Description

      Mariadb should implement the column data type macaddr, possibly also macaddr8 (EUI-64 format). These are not currently supported in MySQL but are stored commonly enough that it makes sense to support them.

      Basic implementation steps are simple:

      • Support inserting as strings (e.g. '0a:0a:0a:0a:0a:0a', '0a-0a-0a-0a-0a-0a' or '0a0a0a0a0a0a') or as hex, similar to the UUID column type
      • Add a typecheck - macaddr8 should allow standard mac addresses or EUI-64
      • Select in standard format with colon separators

      For compatibility with PG, trunc() should set the last 3 bytes of a macaddr to 0, or the last 5 bytes if macaddr8, and macaddr8_set7bit() should set bit 7 to one (for ipv6 address usage). Their reference is here: https://www.postgresql.org/docs/14/functions-net.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            tgross35 Trevor Gross
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.