@@ -1284,7 +1284,7 @@ wsrep_kill_victim(
1284
1284
}
1285
1285
1286
1286
wsrep_innobase_kill_one_trx (trx->mysql_thd ,
1287
- ( const trx_t *) trx, lock->trx , TRUE );
1287
+ trx, lock->trx , TRUE );
1288
1288
}
1289
1289
}
1290
1290
}
@@ -5669,22 +5669,20 @@ lock_rec_queue_validate(
5669
5669
/* impl_trx cannot be committed until lock_mutex_exit()
5670
5670
because lock_trx_release_locks() acquires lock_sys->mutex */
5671
5671
5672
- if (impl_trx != NULL ) {
5673
- const lock_t * other_lock
5674
- = lock_rec_other_has_expl_req (
5675
- LOCK_S, block, true , heap_no,
5676
- impl_trx);
5677
-
5672
+ if (!impl_trx) {
5673
+ } else if (const lock_t * other_lock
5674
+ = lock_rec_other_has_expl_req (
5675
+ LOCK_S, block, true , heap_no,
5676
+ impl_trx)) {
5678
5677
/* The impl_trx is holding an implicit lock on the
5679
5678
given record 'rec'. So there cannot be another
5680
5679
explicit granted lock. Also, there can be another
5681
5680
explicit waiting lock only if the impl_trx has an
5682
5681
explicit granted lock. */
5683
5682
5684
- if (other_lock != NULL ) {
5685
5683
#ifdef WITH_WSREP
5686
- if (wsrep_on (other_lock->trx ->mysql_thd ) && ! lock_get_wait (other_lock) ) {
5687
-
5684
+ if (wsrep_on (other_lock->trx ->mysql_thd )) {
5685
+ if (! lock_get_wait (other_lock) ) {
5688
5686
ib::info () << " WSREP impl BF lock conflict for my impl lock:\n BF:" <<
5689
5687
((wsrep_thd_is_BF (impl_trx->mysql_thd , FALSE )) ? " BF" : " normal" ) << " exec: " <<
5690
5688
wsrep_thd_exec_mode (impl_trx->mysql_thd ) << " conflict: " <<
@@ -5702,18 +5700,16 @@ lock_rec_queue_validate(
5702
5700
wsrep_thd_query (otrx->mysql_thd );
5703
5701
}
5704
5702
5705
- if (wsrep_on (other_lock-> trx -> mysql_thd ) && !lock_rec_has_expl (
5706
- LOCK_X | LOCK_REC_NOT_GAP ,
5707
- block, heap_no, impl_trx)) {
5703
+ if (!lock_rec_has_expl (LOCK_X | LOCK_REC_NOT_GAP,
5704
+ block, heap_no ,
5705
+ impl_trx)) {
5708
5706
ib::info () << " WSREP impl BF lock conflict" ;
5709
5707
}
5710
- #else /* !WITH_WSREP */
5711
- ut_a (lock_get_wait (other_lock));
5712
- ut_a (lock_rec_has_expl (
5713
- LOCK_X | LOCK_REC_NOT_GAP,
5714
- block, heap_no, impl_trx));
5708
+ } else
5715
5709
#endif /* WITH_WSREP */
5716
- }
5710
+ ut_ad (lock_get_wait (other_lock));
5711
+ ut_ad (lock_rec_has_expl (LOCK_X | LOCK_REC_NOT_GAP,
5712
+ block, heap_no, impl_trx));
5717
5713
}
5718
5714
}
5719
5715
@@ -7575,23 +7571,18 @@ DeadlockChecker::select_victim() const
7575
7571
#ifdef WITH_WSREP
7576
7572
if (wsrep_thd_is_BF (m_start->mysql_thd , TRUE )) {
7577
7573
return (m_wait_lock->trx );
7578
- } else {
7579
- #endif /* WITH_WSREP */
7580
- return (m_start);
7581
- #ifdef WITH_WSREP
7582
7574
}
7583
- #endif
7575
+ #endif /* WITH_WSREP */
7576
+ return (m_start);
7584
7577
}
7585
7578
7586
7579
#ifdef WITH_WSREP
7587
7580
if (wsrep_thd_is_BF (m_wait_lock->trx ->mysql_thd , TRUE )) {
7588
7581
return (m_start);
7589
- } else {
7590
- #endif /* WITH_WSREP */
7591
- return (m_wait_lock->trx );
7592
- #ifdef WITH_WSREP
7593
7582
}
7594
- #endif
7583
+ #endif /* WITH_WSREP */
7584
+
7585
+ return (m_wait_lock->trx );
7595
7586
}
7596
7587
7597
7588
/* * Looks iteratively for a deadlock. Note: the joining transaction may
0 commit comments