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

LP:1024312 - cancelled ALTER TABLE operation hangs indefinitely

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Here's exactly what I tried:

      MariaDB> alter table fb_likes modify column user bigint unsigned not null;
      Stage: 1 of 2 'copy to tmp table'  0.057% of stage done
      ^CCtrl-C -- query killed. Continuing normally.
      ^Z
      [1]+  Stopped                 mysql
      

      It seems that operation has switched to enabling keys in the meantime...

      From show processlist;

      | 2477097 | dragonscale | localhost            | customer_com | Killed      |     792 | Enabling keys                                                         | alter table fb_likes modify column user bigint unsigned not null                      |    0.000 |
      

      Initial table structure:

      Create Table: CREATE TABLE `fb_likes` (
        `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `user` char(255) NOT NULL DEFAULT '',
        `name` char(255) NOT NULL DEFAULT '',
        `category` char(255) NOT NULL DEFAULT '',
        `object_id` char(255) NOT NULL DEFAULT '',
        `created_time` datetime NOT NULL,
        `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        `pushBrand` tinyint(4) DEFAULT NULL,
        PRIMARY KEY (`id`),
        UNIQUE KEY `user` (`user`,`object_id`),
        KEY `updatedAt` (`updatedAt`),
        KEY `pushBrand` (`pushBrand`)
      ) ENGINE=InnoDB AUTO_INCREMENT=131182304 DEFAULT CHARSET=utf8
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Re: cancelled ALTER TABLE operation hangs indefinitely
            Hi,

            How many rows do you have in the table? I went up to 4M, but still haven't got the described effect. I did see the status briefly changing to "Enablling keys" when I was interrupting the query, but the query disappeared from the processlist without a delay.

            Is the problem reproducible, or did you see it only once?
            If it's reproducible, could you maybe upload the contents of the table, so I could try on the real data?

            Thanks

            Show
            elenst Elena Stepanova added a comment - Re: cancelled ALTER TABLE operation hangs indefinitely Hi, How many rows do you have in the table? I went up to 4M, but still haven't got the described effect. I did see the status briefly changing to "Enablling keys" when I was interrupting the query, but the query disappeared from the processlist without a delay. Is the problem reproducible, or did you see it only once? If it's reproducible, could you maybe upload the contents of the table, so I could try on the real data? Thanks
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 1024312

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 1024312
            Hide
            elenst Elena Stepanova added a comment -

            Not enough information to proceed, and no feedback from the reporter.

            Show
            elenst Elena Stepanova added a comment - Not enough information to proceed, and no feedback from the reporter.

              People

              • Assignee:
                Unassigned
                Reporter:
                guillaumelefranc Guillaume Lefranc
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: