mysql> SELECT * FROM information_schema.innodb_lock_waits \G
*************************** 1. row ***************************
requesting_trx_id: 360F
requested_lock_id: 360F:243:3:3
blocking_trx_id: 360E
blocking_lock_id: 360E:243:3:3
1 row in set (0.00 sec)
由于默认的 innodb_lock_wait_timeout 是 50 秒,所以 50 秒过后,Session 2 出现如下提示:
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction】
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx