MySQL 5.5元数据锁延迟表丢弃

时间:2014-08-22 14:48:12

标签: mysql metadata innodb locks

我正在使用表压缩进行一些测试并杀死一个大的(138M行)插入。我今天早上去了桌子,这需要很长时间。我检查了进程列表

| 39 | root | localhost | cdr3 | Killed  | 72959 | query end                       | insert into cdr3_test_4 select * from cdr3_v1 |
| 44 | root | localhost | cdr3 | Query   |  2005 | Waiting for table metadata lock | drop table cdr3_test_4                        |
| 45 | root | localhost | cdr3 | Query   |     0 | NULL                            | show processlist                              |

和InnoDB引擎状态

LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 45, OS thread handle 0x7fa3da748700, query id 170 localhost root
show engine innodb status
---TRANSACTION 0, not started
MySQL thread id 44, OS thread handle 0x7fa3da849700, query id 149 localhost root Waiting for table metadata lock
drop table cdr3_test_4
---TRANSACTION 3C05, ACTIVE 72922 sec rollback
mysql tables in use 2, locked 2
ROLLING BACK 165436 lock struct(s), heap size 26458552, 96615068 row lock(s), undo log entries 56851106
MySQL thread id 39, OS thread handle 0x7fa3da94a700, query id 131 localhost root query end
insert into cdr3_test_4 select * from cdr3_v1

我该如何解释?回滚完成后是否会发生丢弃?我试图通过线程ID和查询ID在mysql中杀死它,服务器找不到它。有没有更好的方法来杀死它?如果我杀了它会重新开始吗? 谢谢 麦克

0 个答案:

没有答案
相关问题