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

Changing a column name via ALTER ONLINE does not work for InnoDB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 5.5.25, 5.3.7
    • Fix Version/s: 5.5.34
    • Component/s: None
    • Labels:
      None

      Description

      I'm not sure whether it's expected behavior, filing just in case it's not.

      http://kb.askmonty.org/en/alter-table/ says that changing a column name online should work; and it does for MyISAM, but not for InnoDB:
      query 'ALTER ONLINE TABLE t1 CHANGE COLUMN i i2 INT' failed: 1915: Can't execute the given 'ALTER' command as online

      Some other CHANGE COLUMN operations do work, even for InnoDB, e.g.
      ALTER ONLINE TABLE t1 CHANGE COLUMN i i INT DEFAULT 1

      Test case:

      --source include/have_innodb.inc
      
      CREATE TABLE t1 (i INT) ENGINE=InnoDB;
      ALTER ONLINE TABLE t1 CHANGE COLUMN i i2 INT;
      
      DROP TABLE t1;
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            I suppose it makes no sense to fix it, since in 10.0 semantics of ALTER ONLINE changed anyway – it now works like ALTER .. LOCK=NONE, so the provided test case actually causes opposite results – it works for InnoDB and fails for MyISAM.

            Closing as 'Won't fix', please re-open if you think otherwise.

            Show
            elenst Elena Stepanova added a comment - I suppose it makes no sense to fix it, since in 10.0 semantics of ALTER ONLINE changed anyway – it now works like ALTER .. LOCK=NONE, so the provided test case actually causes opposite results – it works for InnoDB and fails for MyISAM. Closing as 'Won't fix', please re-open if you think otherwise.

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: