Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Based in a table, KEY-VALUE, we could expand the ENUM field from limited size (65535 values) to a unlimited size (64bits), this is a new field type
ENUM_EXTERNAL(database,table,key column,value column)
the internal value of ENUM_EXTERNAL is a bigint, the string representation is a blob (or maybe a varchar(255) or a text)
the point is:
the storage engine will save a bitint
the mysql core will convert the STRING to BIGINT using the database/table/key column/value, using a SELECT like this:
SELECT <value_column> FROM <database>.<table> WHERE <value_column>="FIELD VALUE SEND VIA INSERT/UPDATE/DELETE"
UNION
SELECT <key_column> FROM <database>.<table> WHERE <key_column>="FIELD VALUE SEND VIA INSERT/UPDATE/DELETE"
LIMIT 1
this solve the problem of .FRM file don't allowing a big definition of ENUM/SET, and add an feature to developer of an avoid of alter table to change enum definition (it can use the external table to define the key-values of enum)
Attachments
Issue Links
- is blocked by
-
MDEV-4912 Data type plugin API version 1
-
- Closed
-
Activity
Priority | Major [ 3 ] | Trivial [ 5 ] |
Priority | Trivial [ 5 ] | Blocker [ 1 ] |
Priority | Blocker [ 1 ] | Minor [ 4 ] |
Workflow | defaullt [ 28428 ] | MariaDB v2 [ 44338 ] |
Workflow | MariaDB v2 [ 44338 ] | MariaDB v3 [ 63656 ] |
Epic Link | MDEV-21086 [ 80548 ] |
Workflow | MariaDB v3 [ 63656 ] | MariaDB v4 [ 130148 ] |
Why wouldn't you just use an int/bigint column and a dictionary table by yourself? Why complicate the server code?