// 表示事務4641對表`sys`.`new_table`持有了IX鎖
TABLE LOCK table `sys`.`new_table` trx id 4641 lock mode IX
// space id=38,space id可以唯一確定一張表,表示了鎖所在的表
// page no 3,表示鎖所在的頁號
// index PRIMARY 表示鎖位于名為PRIMARY的索引上
// lock_mode X locks rec but not gap 表示x record lock
// 下方的數據表示了被鎖定的索引數據,最上面一行代表索引列的十六進制值,在這里表示的就是id=3的數據
RECORD LOCKS space id 38 page no 3 n bits 80 index PRIMARY of table `sys`.`new_table` trx id 4641 lock_mode X locks rec but not gap
Record lock, heap no 4 PHYSICAL RECORD: n_fields 8; compact format; info bits 0
0: len 4; hex 00000003; asc ;;
1: len 6; hex 0000000011e9; asc ;;
2: len 7; hex a70000011b0128; asc (;;
3: len 4; hex 8000012c; asc ,;;
4: len 1; hex 63; asc c;;
5: len 4; hex 80000006; asc ;;
6: len 3; hex 636363; asc ccc;;
7: len 2; hex 3333; asc 33;;
// lock_mode X表示的是next-key lock,即當前記錄的record lock+前一個間隙的gap lock
// 這個鎖在名為idx1的索引上,對應的索引列的值為100(hex 64對應十進制),對應聚簇索引的值為1
RECORD LOCKS space id 38 page no 5 n bits 80 index idx1 of table `sys`.`new_table` trx id 4643 lock_mode X
Record lock, heap no 2 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 4; hex 00000064; asc d;;
1: len 4; hex 00000001; asc ;;
// lock_mode X locks gap before rec表示的是對應索引記錄前一個間隙的gap lock
RECORD LOCKS space id 38 page no 5 n bits 80 index idx1 of table `sys`.`new_table` trx id 4643 lock_mode X locks gap before rec
Record lock, heap no 3 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 4; hex 800000c8; asc ;;
1: len 4; hex 00000002; asc ;;