1

I'm trying to add a column to a live database, that's constantly being accessed:-

ALTER TABLE `projects` ADD COLUMN `cTime` INT(30) NULL DEFAULT NULL AFTER `session`

It ALWAYS hangs. This is a MyISAM table and I'm guessing it's trying to lock the table. I've tried IGNORE, but is there anyway to force this?

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
waxical
  • 3,736
  • 8
  • 43
  • 66

1 Answers1

2

You have a double null in you statement

ALTER TABLE `projects` ADD COLUMN `cTime` INT(30) DEFAULT NULL AFTER `session` 
Steve
  • 208,592
  • 21
  • 221
  • 278
  • 1
    Found this link: [Alter a table without locking the table](http://stackoverflow.com/questions/463677/alter-table-without-locking-the-table), hope it helps – Steve Aug 09 '12 at 15:52