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,753
  • 72
  • 57
  • 129
waxical
  • 3,826
  • 8
  • 45
  • 69

1 Answers1

2

You have a double null in you statement

ALTER TABLE `projects` ADD COLUMN `cTime` INT(30) DEFAULT NULL AFTER `session` 
Steve
  • 213,761
  • 22
  • 232
  • 286
  • 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