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

External ENUM Field definition

    XMLWordPrintable

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

          Activity

            People

              Unassigned Unassigned
              rspadim roberto spadim
              Votes:
              2 Vote for this issue
              Watchers:
              7 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.