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

Indexes on expressions: support ADD INDEX(vcol_expr)

Details

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

    Description

      This is a part of MDEV-6017.

      This MDEV covers supporting creation of index on expression directly, without explicitly creating a column. It should use syntax like:

      alter table t1 add index (a+b);
      

      SHOW CREATE TABLE should display the created index.
      INFORMATION_SCHEMA tables should display the expression.

      Q: So, should this create a table column? (I guess yes). Should the added column be visible to the user?
      A: Yes, no. Like for a long unique — a "system invisible" virtual column is created automatically

      Q: which name should the created index have? (for columns, it's first column's name, with _N suffix if there's a naming conflict).
      A: Like all other auto-created columns, there's a function to create a unique name for it, it checks for collisions

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.