RECORD LOCKS space id 1658 page no 541 n bits 320 index PRIMARY of table `openmarket`.`mediaplan` trx id 1767639 lock_mode X locks rec but not gap waiting *** (1) WAITING FOR THIS LOCK TO BE GRANTED: UPDATE mediaplan m SET m.startDate = IFNULL( (SELECT p.blockStartTime FROM placement p WHERE p.mediaplan_id = m.id AND p.deleted = FALSE ORDER BY p.blockStartTime ASC LIMIT 0, 1), NULL ), m.endDate = IFNULL( (SELECT p.blockStartTime FROM placement p WHERE p.mediaplan_id = m.id AND p.deleted = FALSE ORDER BY p.blockStartTime DESC LIMIT 0, 1), NULL ) WHERE m.id IN (-1,208396) LOCK WAIT 6 lock struct(s), heap size 1136, 4 row lock(s), undo log entries 2 TRANSACTION 1767639, ACTIVE 0 sec starting index read RW-sx spins 268, rounds 7782, OS waits 245 RW-excl spins 0, rounds 47629, OS waits 217 RW-shared spins 0, rounds 7370, OS waits 1740 OS WAIT ARRAY INFO: reservation count 3037 Srv_master_thread log flush and writes: 9989 Srv_master_thread loops: 124 srv_active, 0 srv_shutdown, 9865 srv_idle Per second averages calculated from the last 38 seconds M.endDate = IFNULL((SELECT p.blockStartTimeĭeadlock log (SHOW ENGINE INNODB STATUS ) = WHERE p.mediaplan_id = m.id AND p.deleted = FALSE SET m.startDate = IFNULL((SELECT p.blockStartTime It is my UPDATE with subselect: UPDATE mediaplan m Maby someone had a similar problem and can help. When I removed subselect from a query it`s solved deadlock but in my case these subqueries are necessary.īut these solutions don't solve my problem. I caught this deadlock in my application I am using Hibernate for get data from DB and in my log, I see next: Caused by: .jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock try restarting transaction When I try to make UPDATE with subselect I catch deadlocks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |