pt-online-schema-change --execute --alter "ADD COLUMN xxx TINYINT(4) DEFAULT NULL" D=db,t=tbl
------------------------
LATEST DETECTED DEADLOCK
------------------------
140624 15:38:54
*** (1) TRANSACTION:
TRANSACTION C092E7AC, ACTIVE 1 sec setting auto-inc lock
mysql tables in use 2, locked 2
LOCK WAIT 4 lock struct(s), heap size 1248, 1 row lock(s), undo log entries 2
MySQL thread id 1190466, OS thread handle 0x7f3273731700, query id 10521593868 ip-10-123-10-133.ec2.internal 10.123.10.133 admin update
REPLACE INTO `db`.`_tbl_new` (`stuff`) VALUES (NEW.`stuff`)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
TABLE LOCK table `db`.`_tbl_new` trx id C092E7AC lock mode AUTO-INC waiting
*** (2) TRANSACTION:
TRANSACTION C092E66D, ACTIVE 1 sec inserting
mysql tables in use 2, locked 2
12 lock struct(s), heap size 3112, 7 row lock(s), undo log entries 15
MySQL thread id 1190115, OS thread handle 0x7f327895a700, query id 10521592449 ip-10-6-126-45.ec2.internal 10.6.126.45 admin update
REPLACE INTO `db`.`_tbl_new` (`stuff`) VALUES (NEW.`stuff`)
*** (2) HOLDS THE LOCK(S):
TABLE LOCK table `db`.`_tbl_new` trx id C092E66D lock mode AUTO-INC
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 277 page no 229622 n bits 336 index `id_auto_inc` of table `db`.`_tbl_new` trx id C092E66D lock_mode X waiting
Record lock, heap no 270 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 8; hex 800000000cde28dc; asc ( ;;
1: len 8; hex 800000000006eb25; asc %;;
Any help would be greatly appreciated, I really want to alter that table.(╯°□°)╯︵ ┻━┻
------------------------
LATEST DETECTED DEADLOCK
------------------------
140626 16:01:16
*** (1) TRANSACTION:
TRANSACTION C3127E01, ACTIVE 0 sec inserting
mysql tables in use 2, locked 2
LOCK WAIT 10 lock struct(s), heap size 3112, 15 row lock(s), undo log entries 19
MySQL thread id 87, OS thread handle 0x7f6d2103e700, query id 2824608 ip-10-6-126-45.ec2.internal 10.6.126.45 admin update
REPLACE INTO `db`.`_tbl_new` (`stuff`) VALUES (NEW.`stuff`)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 281 page no 3129 n bits 400 index `id_auto_inc` of table `db`.`_tbl_new` trx id C3127E01 lock_mode X waiting
Record lock, heap no 325 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 8; hex 800000000d05c9cc; asc ;;
1: len 8; hex 80000000000590e3; asc ;;
*** (2) TRANSACTION:
TRANSACTION C3127DFA, ACTIVE 0 sec setting auto-inc lock
mysql tables in use 2, locked 2
5 lock struct(s), heap size 1248, 1 row lock(s), undo log entries 10
MySQL thread id 155, OS thread handle 0x7f6d20e23700, query id 2824746 ip-10-6-126-45.ec2.internal 10.6.126.45 admin update
REPLACE INTO `db`.`_tbl_new` (`stuff`) VALUES (NEW.`stuff`)
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 281 page no 3129 n bits 400 index `id_auto_inc` of table `db`.`_tbl_new` trx id C3127DFA lock_mode X locks rec but not gap
Record lock, heap no 325 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 8; hex 800000000d05c9cc; asc ;;
1: len 8; hex 80000000000590e3; asc ;;
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
TABLE LOCK table `db`.`_tbl_new` trx id C3127DFA lock mode AUTO-INC waiting
*** WE ROLL BACK TRANSACTION (2)