Number of records in M_SAMP table is 3524 and in MM_RVW_SAMP is 2.īelow is the result of EXPLAIN query. RECORD LOCKS space id 61569 page no 65 n bits 176 index `PRIMARY` of table `dbName`.`m_samp` trx id 13275335 lock mode S locks rec but not gap MySQL thread id 1458, OS thread handle 0xde8, query id 39664 xyz 192.168.1.108 userName updating TRANSACTION 13275335, ACTIVE 0 sec starting index readĢ54 lock struct(s), heap size 27512, 21595 row lock(s), undo log entries 7 Record lock, heap no 3 PHYSICAL RECORD: n_fields 29 compact format info bits 0 RECORD LOCKS space id 61569 page no 65 n bits 176 index `PRIMARY` of table `dbName`.`m_samp` trx id 13275344 lock_mode X waiting *** (1) WAITING FOR THIS LOCK TO BE GRANTED: UPDATE M_SAMP SET FLAG=0 WHERE M_ID IN (SELECT M_ID FROM MM_RVW_SAMP WHERE TARGET_M_ID IN(19)) MySQL thread id 1455, OS thread handle 0x11ac, query id 39660 xyz 192.168.1.108 userName Sending data LOCK WAIT 25 lock struct(s), heap size 2408, 1394 row lock(s), undo log entries 1 TRANSACTION 13275344, ACTIVE 0 sec fetching rows And this issue is repeating.Ĭan any one help me, how locks are granted because of which deadlock is happening? There is no foreign key relation defined in M_SAMP and MM_RVW_SAMP tables. The result of inner query ( SELECT M_ID FROM MM_RVW_SAMP WHERE TARGET_M_ID IN(19)) is M_ID = 3562.Ģnd thread is executing below query. UPDATE M_SAMP SET MM_Q_IND=0 WHERE M_ID IN (SELECT M_ID FROM MM_RVW_SAMP WHERE TARGET_M_ID IN(19)) I went through MySQL logs and found the reason for deadlockġst thread is trying to execute below query.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |