root@localhost: 19:37: [demo]> select * from performance_schema.data_locks \G *************************** 1. row *************************** ENGINE: INNODB ENGINE_LOCK_ID: 139666835081072:1935:139666901151008 ENGINE_TRANSACTION_ID: 389172 THREAD_ID: 50 EVENT_ID: 10 OBJECT_SCHEMA: demo OBJECT_NAME: t1 PARTITION_NAME: NULL SUBPARTITION_NAME: NULL INDEX_NAME: NULL OBJECT_INSTANCE_BEGIN: 139666901151008 LOCK_TYPE: TABLE LOCK_MODE: IX LOCK_STATUS: GRANTED LOCK_DATA: NULL *************************** 2. row *************************** ENGINE: INNODB ENGINE_LOCK_ID: 139666835081072:661:4:8:139667195062304 ENGINE_TRANSACTION_ID: 389172 THREAD_ID: 50 EVENT_ID: 10 OBJECT_SCHEMA: demo OBJECT_NAME: t1 PARTITION_NAME: NULL SUBPARTITION_NAME: NULL INDEX_NAME: PRIMARY OBJECT_INSTANCE_BEGIN: 139667195062304 LOCK_TYPE: RECORD LOCK_MODE: X,REC_NOT_GAP LOCK_STATUS: WAITING LOCK_DATA: 10 *************************** 3. row *************************** ENGINE: INNODB ENGINE_LOCK_ID: 139666835080264:1935:139666901150240 ENGINE_TRANSACTION_ID: 389171 THREAD_ID: 49 EVENT_ID: 10 OBJECT_SCHEMA: demo OBJECT_NAME: t1 PARTITION_NAME: NULL SUBPARTITION_NAME: NULL INDEX_NAME: NULL OBJECT_INSTANCE_BEGIN: 139666901150240 LOCK_TYPE: TABLE LOCK_MODE: IX LOCK_STATUS: GRANTED LOCK_DATA: NULL *************************** 4. row *************************** ENGINE: INNODB ENGINE_LOCK_ID: 139666835080264:661:4:8:139667195059232 ENGINE_TRANSACTION_ID: 389171 THREAD_ID: 49 EVENT_ID: 10 OBJECT_SCHEMA: demo OBJECT_NAME: t1 PARTITION_NAME: NULL SUBPARTITION_NAME: NULL INDEX_NAME: PRIMARY OBJECT_INSTANCE_BEGIN: 139667195059232 LOCK_TYPE: RECORD LOCK_MODE: X,REC_NOT_GAP LOCK_STATUS: GRANTED LOCK_DATA: 10 4 rows in set (0.00 sec) root@localhost: 19:40: [demo]> show engine innodb status\G; *************************** 1. row *************************** Type: InnoDB Name: Status: ===================================== 2024-05-22 19:40:32 139666203002624 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 10 seconds ----------------- BACKGROUND THREAD ----------------- srv_master_thread loops: 9 srv_active, 0 srv_shutdown, 706 srv_idle srv_master_thread log flush and writes: 0 ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 5 OS WAIT ARRAY INFO: signal count 5 RW-shared spins 0, rounds 0, OS waits 0 RW-excl spins 0, rounds 0, OS waits 0 RW-sx spins 0, rounds 0, OS waits 0 Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx ------------ TRANSACTIONS ------------ Trx id counter 389173 Purge done for trx's n:o < 389166 undo n:o < 0 state: running but idle History list length 0 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 421141811792536, not started 0 lock struct(s), heap size 1128, 0 row lock(s) ---TRANSACTION 421141811790112, not started 0 lock struct(s), heap size 1128, 0 row lock(s) ---TRANSACTION 421141811789304, not started 0 lock struct(s), heap size 1128, 0 row lock(s) ---TRANSACTION 389172, ACTIVE 37 sec starting index read mysql tables in use 1, locked 1 LOCK WAIT 2 lock struct(s), heap size 1128, 1 row lock(s) MySQL thread id 15, OS thread handle 139666253866752, query id 72 localhost root executing SELECT * FROM t1 WHERE ID >= 7 AND ID <= 8 FOR UPDATE ------- TRX HAS BEEN WAITING 37 SEC FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 661 page no 4 n bits 80 index PRIMARY of table `demo`.`t1` trx id 389172 lock_mode X locks rec but not gap waiting Record lock, heap no 8 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 8000000a; asc ;; 1: len 6; hex 00000005f028; asc (;; 2: len 7; hex 81000000f0015e; asc ^;; 3: len 5; hex 99b36d3777; asc m7w;; ------------------ ---TRANSACTION 389171, ACTIVE 47 sec 2 lock struct(s), heap size 1128, 1 row lock(s) MySQL thread id 14, OS thread handle 139666262791936, query id 69 localhost root -------- FILE I/O -------- I/O thread 0 state: waiting for completed aio requests (insert buffer thread) I/O thread 1 state: waiting for completed aio requests (read thread) I/O thread 2 state: waiting for completed aio requests (read thread) I/O thread 3 state: waiting for completed aio requests (read thread) I/O thread 4 state: waiting for completed aio requests (read thread) I/O thread 5 state: waiting for completed aio requests (write thread) I/O thread 6 state: waiting for completed aio requests (write thread) I/O thread 7 state: waiting for completed aio requests (write thread) I/O thread 8 state: waiting for completed aio requests (write thread) Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] , ibuf aio reads: Pending flushes (fsync) log: 0; buffer pool: 0 1141 OS file reads, 669 OS file writes, 124 OS fsyncs 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s ------------------------------------- INSERT BUFFER AND ADAPTIVE HASH INDEX ------------------------------------- Ibuf: size 1, free list len 0, seg size 2, 0 merges merged operations: insert 0, delete mark 0, delete 0 discarded operations: insert 0, delete mark 0, delete 0 Hash table size 34679, node heap has 3 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) 0.00 hash searches/s, 0.00 non-hash searches/s --- LOG --- Log sequence number 447204970 Log buffer assigned up to 447204970 Log buffer completed up to 447204970 Log written up to 447204970 Log flushed up to 447204970 Added dirty pages up to 447204970 Pages flushed up to 447204970 Last checkpoint at 447204970 Log minimum file id is 106 Log maximum file id is 106 91 log i/o's done, 0.00 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total large memory allocated 0 Dictionary memory allocated 505717 Buffer pool size 8191 Free buffers 6923 Database pages 1263 Old database pages 486 Modified db pages 0 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages made young 1, not young 0 0.00 youngs/s, 0.00 non-youngs/s Pages read 1115, created 148, written 361 0.00 reads/s, 0.00 creates/s, 0.00 writes/s Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s LRU len: 1263, unzip_LRU len: 0 I/O sum[0]:cur[0], unzip sum[0]:cur[0] -------------- ROW OPERATIONS -------------- 0 queries inside InnoDB, 0 queries in queue 0 read views open inside InnoDB Process ID=906616, Main thread ID=139666339383040 , state=sleeping Number of rows inserted 7, updated 2, deleted 0, read 14 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s Number of system rows inserted 49, updated 342, deleted 89, read 6149 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================ 1 row in set (0.00 sec) ERROR: No query specified root@localhost: 19:40: [demo]>