#检查是否存在锁
show PROCESSLIST;
#检查是否存在事务锁
SELECT * FROM information_schema.INNODB_TRX; SHOW ENGINE INNODB STATUS;
SELECT trx_id, trx_started, trx_state, trx_query, trx_operation_state, trx_tables_in_use, trx_tables_locked, trx_lock_structs, trx_weight, trx_mysql_thread_id, trx_query FROM INFORMATION_SCHEMA.INNODB_TRX;