将文件拖动至此

SQL 上传 ( 0 ) x -

按 Ctrl+Enter 键执行查询 按 Enter 执行查询
递增排序
递减排序
命令:
调试 SQL
数量
运行顺序
用时
排序条件:
联合查询
不使用联合查询
崩溃 扩展 显示跟踪 隐藏跟踪 记录数: 用时:
书签
刷新
添加
没有书签
添加书签
选项
还原为默认值
崩溃 扩展 重新查询 编辑 解析 性能分析 书签 查询失败 数据库: 查询时间:

存储引擎

InnoDB 文档

Supports transactions, row-level locking, foreign keys and encryption for tables

[ 变量 | 缓冲池 | InnoDB 状态 ]


=====================================
2026-01-22 12:26:36 0x7fe0f4915700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 45 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 7161 srv_active, 0 srv_shutdown, 6818 srv_idle
srv_master_thread log flush and writes: 13979
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 22561
OS WAIT ARRAY INFO: signal count 19535
RW-shared spins 0, rounds 9775, OS waits 4845
RW-excl spins 0, rounds 2573, OS waits 87
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 9775.00 RW-shared, 2573.00 RW-excl, 0.00 RW-sx
------------------------
LATEST FOREIGN KEY ERROR
------------------------
2026-01-22 10:33:23 0x7fe0f48e3700 Transaction:
TRANSACTION 57094, 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 81111, OS thread handle 140604152362752, query id 2903623 192.168.30.20 root Update
INSERT INTO `borrow` (`borrow_id`, `book_id`, `reader_id`, `borrow_date`, `return_date`) VALUES
(1, 1, 1, '2024-01-10', '2024-01-20'),
(2, 2, 2, '2024-01-12', '2024-01-25'),
(3, 3, 3, '2024-01-15', '2024-01-30'),
(4, 4, 4, '2024-02-01', '2024-02-15'),
(5, 5, 5, '2024-02-05', '2024-02-20'),
(6, 6, 1, '2024-02-10', '2024-02-22'),
(7, 7, 2, '2024-02-12', '2024-02-28'),
(8, 8, 3, '2024-03-01', '2024-03-15'),
(9, 9, 4, '2024-03-05', '2024-03-20'),
(10, 10, 5, '2024-03-10', '2024-03-25'),
(11, 11, 6, '2024-03-15', '2024-03-30'),
(12, 12, 7, '2024-04-01', '2024-04-15'),
(13, 13, 8, '2024
Foreign key constraint fails for table `Library`.`borrow`:
,
  CONSTRAINT `borrow_ibfk_2` FOREIGN KEY (`reader_id`) REFERENCES `readers` (`reader_id`) in parent table, in index reader_id tuple:
DATA TUPLE: 2 fields;
 0: len 4; hex 80000001; asc     ;;
 1: len 4; hex 80000001; asc     ;;

But in parent table `Library`.`readers`, 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 71051
Purge done for trx's n:o < 71050 undo n:o < 0 state: running but idle
History list length 2
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 422079135044248, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422079135039992, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422079135035736, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422079135031480, 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
882 OS file reads, 107787 OS file writes, 53386 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 3.76 writes/s, 1.89 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 1 merges
merged operations:
 insert 1, delete mark 1, delete 1
discarded operations:
 insert 0, delete mark 0, delete 0
Hash table size 69257, node heap has 1 buffer(s)
Hash table size 69257, node heap has 9 buffer(s)
Hash table size 69257, node heap has 2 buffer(s)
Hash table size 69257, node heap has 25 buffer(s)
Hash table size 69257, node heap has 1 buffer(s)
Hash table size 69257, node heap has 3 buffer(s)
Hash table size 69257, node heap has 25 buffer(s)
Hash table size 69257, node heap has 0 buffer(s)
1.98 hash searches/s, 0.38 non-hash searches/s
---
LOG
---
Log sequence number 31126771
Log flushed up to   31126771
Pages flushed up to 31126771
Last checkpoint at  31123405
0 pending log flushes, 0 pending chkp writes
33234 log i/o's done, 1.22 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 285212672
Dictionary memory allocated 138944
Buffer pool size   16024
Free buffers       15071
Database pages     887
Old database pages 347
Modified db pages  0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 723, created 164, written 66951
0.00 reads/s, 0.00 creates/s, 2.31 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: 887, unzip_LRU len: 0
I/O sum[0]:cur[7], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=910, Main thread ID=140603388057344, state: sleeping
Number of rows inserted 42, updated 16084, deleted 1, read 2261108
0.00 inserts/s, 0.40 updates/s, 0.00 deletes/s, 1.02 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 5215
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================