存储引擎
InnoDB
Supports transactions, row-level locking, and foreign keys
===================================== 2026-03-10 23:25:49 0x7fa4840ee700 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 53 seconds ----------------- BACKGROUND THREAD ----------------- srv_master_thread loops: 53 srv_active, 0 srv_shutdown, 548 srv_idle srv_master_thread log flush and writes: 0 ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 85 OS WAIT ARRAY INFO: signal count 89 RW-shared spins 10, rounds 14, OS waits 4 RW-excl spins 11, rounds 190, OS waits 6 RW-sx spins 1, rounds 6, OS waits 0 Spin rounds per wait: 1.40 RW-shared, 17.27 RW-excl, 6.00 RW-sx ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 2026-03-10 23:20:01 0x7fa484136700 Transaction: TRANSACTION 9893, ACTIVE 0 sec inserting mysql tables in use 1, locked 1 5 lock struct(s), heap size 1136, 2 row lock(s), undo log entries 1 MySQL thread id 1027, OS thread handle 140344567228160, query id 18881 192.168.30.20 root update insert into devedor(cod_cliente, numero_emprestimo,cod_agencia) values(1,17,1),(1,23,2),(2,15,2),(3,14,1),(4,93,3),(2,11,4),(3,12,5), (5,17,6),(6,18,3), (7,23,3),(7,17,7),(9,19,2) Foreign key constraint fails for table `banco`.`devedor`: , CONSTRAINT `devedor_ibfk_2` FOREIGN KEY (`numero_emprestimo`, `cod_agencia`) REFERENCES `emprestimo` (`numero_emprestimo`, `cod_agencia`) Trying to add in child table, in index numero_emprestimo tuple: DATA TUPLE: 3 fields; 0: len 4; hex 80000011; asc ;; 1: len 4; hex 80000001; asc ;; 2: len 4; hex 80000001; asc ;; But in parent table `banco`.`emprestimo`, in index PRIMARY, the closest match we can find is record: PHYSICAL RECORD: n_fields 1; compact format; info bits 0 0: len 8; hex 696e66696d756d00; asc infimum ;; ------------ TRANSACTIONS ------------ Trx id counter 10042 Purge done for trx's n:o < 10040 undo n:o < 0 state: running but idle History list length 20 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 421819722132072, not started 0 lock struct(s), heap size 1136, 0 row lock(s) ---TRANSACTION 421819722131200, not started 0 lock struct(s), heap size 1136, 0 row lock(s) -------- 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 (log 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 (read 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) I/O thread 9 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:, log i/o's:, sync i/o's: Pending flushes (fsync) log: 0; buffer pool: 0 1470 OS file reads, 1800 OS file writes, 709 OS fsyncs 0.04 reads/s, 16384 avg bytes/read, 0.43 writes/s, 0.34 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 2 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 1 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 4 buffer(s) Hash table size 34679, node heap has 7 buffer(s) 6388.94 hash searches/s, 5296.60 non-hash searches/s --- LOG --- Log sequence number 51190370 Log buffer assigned up to 51190370 Log buffer completed up to 51190370 Log written up to 51190370 Log flushed up to 51190370 Added dirty pages up to 51190370 Pages flushed up to 51190370 Last checkpoint at 51190370 511 log i/o's done, 0.17 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total large memory allocated 137363456 Dictionary memory allocated 780361 Buffer pool size 8192 Free buffers 6662 Database pages 1508 Old database pages 556 Modified db pages 0 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages made young 621, not young 349980 0.00 youngs/s, 0.00 non-youngs/s Pages read 1321, created 193, written 1101 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: 1508, unzip_LRU len: 0 I/O sum[12]: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=367, Main thread ID=140344235599616 , state=sleeping Number of rows inserted 356, updated 603, deleted 0, read 5215855 0.04 inserts/s, 0.04 updates/s, 0.00 deletes/s, 7856.47 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================