Home > database >  Consult a mysql deadlock problem
Consult a mysql deadlock problem

Time:09-21

Consult a mysql deadlock problem, different database table between the deadlock, completely didn't force, specific error below
LATEST DETECTED DEADLOCK
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The 2019-05-20 13:43:40 0 x6040
* * * (1) the TRANSACTION:
TRANSACTION 2470496, ACTIVE 1 SEC inserting
Mysql tables in use 1, locked 1
The LOCK WAIT 6 LOCK struct (s), the heap size of 1136, 3 row LOCK (s), the undo log entries 2
MySQL thread id 191670, OS thread handle 9860, query id 2378993 00701 e0000fb root update
INSERT INTO ` order ` (
Serailnumber,
Total_fee,
Phone,
Product_id,
Recommendation_code,
The STATUS,
Order_source,
User_id,
Create_time,
IDcard,
Product_full_title,
Product_title,
Product_type_id,
Scene_id,
Company_id,
Is_all,
Sys_user_id
) values (
'116279777588936704',

50.0,'13944603315',
263,
'1141',
0,
'0',
64711,
Now (),
"',
"',
"',
9,
40,
6,
0,
0)
* * * (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD the LOCKS space id 170 page no 2085 n bits 152 index PRIMARY of table ` CDZTC `. ` order ` TRX id 2470496 lock_mode X insert intention waiting
Record the lock, heap the no 1 PHYSICAL Record: n_fields 1; Compact format. The info bits (0
Zero: len 8; Hex 73757072656 d756d; Asc supremum;;

* * * (2) the TRANSACTION:
TRANSACTION 2470493, ACTIVE 3 SEC starting index read, thread declared inside the InnoDB 5000
Mysql tables in use 1, locked 1
3761 the lock struct (s), the heap size of 401616, 528334 row lock (s), the undo log entries 7
MySQL thread id 189106, OS thread handle 24640, query id 2379008 00701 e0000fb root updating
The update the cw. Car_sch
Set
Lock_seat=lock_seat - 2
Where sch_id=39881 and lock_seat & gt;=2
Doesn * * * (2) THE LOCK (S) :
RECORD the LOCKS space id 170 page no 2085 n bits 152 index PRIMARY of table ` CDZTC `. ` order ` TRX id 2470493 lock mode S
Record the lock, heap the no 1 PHYSICAL Record: n_fields 1; Compact format. The info bits (0
Zero: len 8; Hex 73757072656 d756d; Asc supremum;;

CodePudding user response:

The cw. Car_sch is a reference ` CDZTC `. ` order ` view

CodePudding user response:

Checked the database view, there is no view references about the two tables

CodePudding user response:

The cw. Car_sch and ` CDZTC `. ` order ` any foreign key link
  • Related