- 论坛徽章:
- 0
|
具体代码如下- LATEST DETECTED DEADLOCK
- ------------------------
- 100712 11:48:30
- *** (1) TRANSACTION:
- TRANSACTION 326C2, ACTIVE 0 sec, process no 12558, OS thread id 42664203 inserting
- mysql tables in use 1, locked 1
- LOCK WAIT 6 lock struct(s), heap size 1216, 5 row lock(s), undo log entries 1
- MySQL thread id 2662, query id 3361062 localhost root update
- INSERT INTO sbtest values(25177686,0,' ','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy')
- *** (1) WAITING FOR THIS LOCK TO BE GRANTED:
- RECORD LOCKS space id 0 page no 814916 n bits 152 index `PRIMARY` of table `test`.`sbtest` trx id
- 326C2 lock_mode X locks gap before rec insert intention waiting
- *** (2) TRANSACTION:
- TRANSACTION 326AB, ACTIVE 0 sec, process no 12358, OS thread id 39387198 inserting, thread declare
- d inside InnoDB 500
- mysql tables in use 1, locked 1
- 5 lock struct(s), heap size 1216, 4 row lock(s)
- MySQL thread id 2462, query id 3361009 localhost root update
- INSERT INTO sbtest values(25177668,0,' ','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy')
- *** (2) HOLDS THE LOCK(S):
- RECORD LOCKS space id 0 page no 814916 n bits 152 index `PRIMARY` of table `test`.`sbtest` trx id
- 326AB lock_mode X locks gap before rec
- *** (2) WAITING FOR THIS LOCK TO BE GRANTED:
- RECORD LOCKS space id 0 page no 814916 n bits 152 index `PRIMARY` of table `test`.`sbtest` trx id
- 326AB lock_mode X locks gap before rec insert intention waiting
- *** WE ROLL BACK TRANSACTION (2)
复制代码 为什么会产生这种情况!像这种单表并行插入应该效率很快啊!怎么也会产生死锁? |
|