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