我正在尝试使用drop table <tablename>
删除数据库中的一个表,但是它无法正常工作,而是进入等待状态,并在show processlist
上给出了此输出结果
mysql> show processlist;
+---------+------+-----------+-----------------+------------+------+---------------------------------+--------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+---------+------+-----------+-----------------+------------+------+---------------------------------+--------------------------------------------------+
| 4076315 | root | localhost | mydb | Query | 4467 | Opening tables | SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS' |
| 4076519 | root | localhost | mydb | Field List | 4240 | Waiting for table flush | |
| 4076538 | root | localhost | mydb | Field List | 4185 | Waiting for table flush | |
| 4076579 | root | localhost | mydb | Field List | 4154 | Waiting for table flush | |
| 4079111 | root | localhost | mydb | Query | 497 | Waiting for table metadata lock | drop table cc_dropbox_mapping |
| 4079706 | root | localhost | mydb | Query | 0 | starting | show processlist |
+---------+------+-----------+-----------------+------------+------+---------------------------------+--------------------------------------------------+
6 rows in set (0.00 sec)