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

Adding/removing non-materialized virtual column triggers table recreation

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 5.5.36, 10.0.10
    • 10.0.12
    • None
    • None
    • 32-Bit Debian 7

    Description

      When adding or removing a non-materialized virtual column to/from a MyISAM table with ALTER TABLE, MariaDB recreates the whole table although only the metadata should be affected:

      MariaDB [test]> ALTER TABLE test ADD COLUMN testcolumn INT AS (othercolumn+1) VIRTUAL;
      Stage: 1 of 2 'copy to tmp table'  0.001% of stage done

      This is especially annoying for multi-gigabyte tables, where this operation takes a long time.

      Attachments

        Issue Links

          Activity

            hsc Horst Schirmeier created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Description When adding or removing a non-materialized virtual column to/from a MyISAM table with ALTER TABLE, MariaDB recreates the whole table although only the metadata should be affected:

            MariaDB [test]> ALTER TABLE test ADD COLUMN testcolumn INT AS (othercolumn+1) VIRTUAL;
            Stage: 1 of 2 'copy to tmp table' 0.001% of stage done

            This is especially annoying for multi-gigabyte tables, where this operation takes a long time.
            When adding or removing a non-materialized virtual column to/from a MyISAM table with ALTER TABLE, MariaDB recreates the whole table although only the metadata should be affected:
            {noformat}
            MariaDB [test]> ALTER TABLE test ADD COLUMN testcolumn INT AS (othercolumn+1) VIRTUAL;
            Stage: 1 of 2 'copy to tmp table' 0.001% of stage done
            {noformat}
            This is especially annoying for multi-gigabyte tables, where this operation takes a long time.
            serg Sergei Golubchik made changes -
            Fix Version/s 10.0.11 [ 15200 ]
            Fix Version/s 5.5.38 [ 15400 ]
            serg Sergei Golubchik made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.0.12 [ 15201 ]
            Fix Version/s 10.0.11 [ 15200 ]
            serg Sergei Golubchik made changes -
            Assignee Sergey Vojtovich [ svoj ]
            svoj Sergey Vojtovich made changes -
            Attachment mdev6103.patch [ 30502 ]
            svoj Sergey Vojtovich made changes -
            Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Sergey Vojtovich [ svoj ]
            svoj Sergey Vojtovich made changes -
            Fix Version/s 5.5.38 [ 15400 ]
            svoj Sergey Vojtovich made changes -
            Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Sergey Vojtovich [ svoj ]
            svoj Sergey Vojtovich made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            svoj Sergey Vojtovich made changes -
            serg Sergei Golubchik made changes -
            Workflow defaullt [ 38918 ] MariaDB v2 [ 43917 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 43917 ] MariaDB v3 [ 63151 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 63151 ] MariaDB v4 [ 147796 ]

            People

              svoj Sergey Vojtovich
              hsc Horst Schirmeier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.