[MDEV-661] LP:1024312 - cancelled ALTER TABLE operation hangs indefinitely Created: 2012-07-13  Updated: 2013-03-26  Resolved: 2013-03-26

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Guillaume Lefranc (Inactive) Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug1024312.xml    

 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



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-07-17 ]

Launchpad bug id: 1024312

Comment by Elena Stepanova [ 2012-07-17 ]

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

Comment by Elena Stepanova [ 2013-03-26 ]

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

Generated at Thu Feb 08 06:30:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.