Comment 11 for bug 1735555

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

How to fix it?

I'm not sure if my suggestion is correct because I don't fully understand the following logic:

=====================
static
void
lock_rec_inherit_to_gap()
{
...
  if (!lock_rec_get_insert_intention(lock)
      && !((srv_locks_unsafe_for_binlog
     || lock->trx->isolation_level
     <= TRX_ISO_READ_COMMITTED)
    && lock_get_mode(lock) ==
    (lock->trx->duplicates ? LOCK_S : LOCK_X))) {
   lock_rec_add_to_queue(
    LOCK_REC | LOCK_GAP | lock_get_mode(lock),
    heir_block, heir_heap_no, lock->index,
    lock->trx, FALSE);
  }
...
}
===================

What was the intention for the following condition:

lock->trx->isolation_level <= TRX_ISO_READ_COMMITTED

Why not:

lock->trx->isolation_level < TRX_ISO_READ_COMMITTED