mysql> select * from t where a < 4 for update;
+---+
| a |
+---+
| 1 |
| 2 |
+---+
2 rows in set (0.12 sec)
# 会话B
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t select 5;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
默认的是REPEATABLE-READ, 为什么insert id =5 会被block呢?按理说使用的Next-key Lock,a<4锁定的区间应该是(无穷小, 4],求指教。