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

Adding/removing non-materialized virtual column triggers table recreation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.36, 10.0.10
    • Fix Version/s: 10.0.12
    • Component/s: None
    • Labels:
      None
    • Environment:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              svoj Sergey Vojtovich added a comment -

              Sergei Golubchik, please review fix for this bug.

              Show
              svoj Sergey Vojtovich added a comment - Sergei Golubchik , please review fix for this bug.
              Hide
              serg Sergei Golubchik added a comment -

              ok to push!

              Show
              serg Sergei Golubchik added a comment - ok to push!
              Hide
              svoj Sergey Vojtovich added a comment -

              Fixed in 10.0.12:

              revno: 4218
              revision-id: svoj@mariadb.org-20140603125729-k5htqiobnba0wqsj
              parent: psergey@askmonty.org-20140603202627-ior1c69y85kz1ggd
              committer: Sergey Vojtovich <svoj@mariadb.org>
              branch nick: 10.0-mdev6103
              timestamp: Tue 2014-06-03 16:57:29 +0400
              message:
                MDEV-6103 - Adding/removing non-materialized virtual column triggers
                            table recreation
              
                Relaxed InnoDB/XtraDB checks to allow online add/drop of
                non-materialized virtual columns.
              
              Show
              svoj Sergey Vojtovich added a comment - Fixed in 10.0.12: revno: 4218 revision-id: svoj@mariadb.org-20140603125729-k5htqiobnba0wqsj parent: psergey@askmonty.org-20140603202627-ior1c69y85kz1ggd committer: Sergey Vojtovich <svoj@mariadb.org> branch nick: 10.0-mdev6103 timestamp: Tue 2014-06-03 16:57:29 +0400 message: MDEV-6103 - Adding/removing non-materialized virtual column triggers table recreation Relaxed InnoDB/XtraDB checks to allow online add/drop of non-materialized virtual columns.
              Hide
              hsc Horst Schirmeier added a comment -

              Shouldn't this bug be split? As I understand, this issue is now fixed for InnoDB. I saw this issue with MyISAM, which is still affected.

              Show
              hsc Horst Schirmeier added a comment - Shouldn't this bug be split? As I understand, this issue is now fixed for InnoDB. I saw this issue with MyISAM, which is still affected.
              Hide
              svoj Sergey Vojtovich added a comment -

              See MDEV-6303.

              Show
              svoj Sergey Vojtovich added a comment - See MDEV-6303 .

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: