Drop filerne her

SQL upload ( 0 ) x -

Tast Ctrl+Enter for at udføre forespørgsel Tast Enter for at udføre forespørgsel
Stigende
Faldende
Rækkefølge:
Ret fejl i SQL
Antal
Rækkefølge for udførelse
Tidsforbrug
Rækkefølge:
Gruppér SQL-forespørgsler
Opløs gruppering af SQL-forespørgsler
Fold sammen Fold ud Vis sporing Skjul sporing Antal: Tidsforbrug:
Indstillinger
Restore default values
Fold sammen Fold ud Genforespørg Ret Forklar Profilering Forespørgslen mislykkedes Database: Tid på forespørgsel:

Storage engines

InnoDB Dokumentation

Supports transactions, row-level locking, and foreign keys

[ Variable | Bufferpool | InnoDB status ]


=====================================
2026-04-05 22:51:32 0x7f74601ee700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 38 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 29 srv_active, 0 srv_shutdown, 314 srv_idle
srv_master_thread log flush and writes: 0
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 287
OS WAIT ARRAY INFO: signal count 312
RW-shared spins 72, rounds 133, OS waits 61
RW-excl spins 274, rounds 1337, OS waits 17
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 1.85 RW-shared, 4.88 RW-excl, 0.00 RW-sx
------------------------
LATEST FOREIGN KEY ERROR
------------------------
2026-04-05 22:48:36 0x7f746015e700 Transaction:
TRANSACTION 10380, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
3 lock struct(s), heap size 1136, 1 row lock(s), undo log entries 1
MySQL thread id 1409, OS thread handle 140137804982016, query id 18298 192.168.30.20 root update
INSERT IGNORE INTO `Receipt` (`Receipt_id`, `Receipt_Number`, `Shift_Number`, `Sale_DateTime`, `Place_of_Calculation_Address`, `Calculation_Sign`, `Payment_Form`, `Cash_Amount`, `NonCash_Amount`, `Total_Amount_Before_Discount`, `Total_Discount_Amount`, `Total_Tax_Amount`, `Total_Amount_Due`, `Payment_Status`, `Customer_id`, `Seller_id`, `Organization_id`, `Seller_Signature`) 
VALUES (2, '0002', 1, '2025-04-03 15:45:00', 'г. Москва, ул. Хлебная, д. 1', 'Приход', 'Безналичные', 0.00, 200.00, 200.00, 0.00, 33.33, 200.00, 'Оплачен', 2, 2, 1, 'Петров 
Foreign key constraint fails for table `bakery_sales`.`Receipt`:
,
  CONSTRAINT `Receipt_ibfk_1` FOREIGN KEY (`Seller_id`) REFERENCES `Seller` (`Seller_id`)
Trying to add in child table, in index Seller_id tuple:
DATA TUPLE: 2 fields;
 0: len 4; hex 80000002; asc     ;;
 1: len 4; hex 80000002; asc     ;;

But in parent table `bakery_sales`.`Seller`, 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 10389
Purge done for trx's n:o < 10388 undo n:o < 0 state: running but idle
History list length 35
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421612841699944, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 421612841699072, 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
1251 OS file reads, 3377 OS file writes, 1044 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 1 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 5 buffer(s)
Hash table size 34679, node heap has 3 buffer(s)
Hash table size 34679, node heap has 3 buffer(s)
Hash table size 34679, node heap has 6 buffer(s)
1543.59 hash searches/s, 1117.34 non-hash searches/s
---
LOG
---
Log sequence number          52768997
Log buffer assigned up to    52768997
Log buffer completed up to   52768997
Log written up to            52768997
Log flushed up to            52768997
Added dirty pages up to      52768997
Pages flushed up to          52768997
Last checkpoint at           52768997
1814 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 137363456
Dictionary memory allocated 530668
Buffer pool size   8192
Free buffers       6802
Database pages     1366
Old database pages 497
Modified db pages  0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 5, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 1124, created 242, written 1411
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: 1366, 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=366, Main thread ID=140137355753216 , state=sleeping
Number of rows inserted 566, updated 3165, deleted 1799, read 891982
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 1766.93 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================