Details
-
Type:
Task
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: None
-
Labels: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)
Gliffy Diagrams
Attachments
Issue Links
- is blocked by
-
MDEV-4912 Add a plugin to field types (column types)
-
- In Progress
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Why wouldn't you just use an int/bigint column and a dictionary table by yourself? Why complicate the server code?