diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index dfa5eba955e..c1e328b9e7a 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -2024,15 +2024,11 @@ static bool row_allow_duplicates(que_thr_t *thr) { goto end_scan; } lock_type = LOCK_REC_NOT_GAP; - } else if (is_supremum) { - /* We use next key lock to possibly combine the locks in bitmap. - Equivalent to LOCK_GAP. */ - lock_type = LOCK_ORDINARY; } else if (is_next) { /* Only gap lock is required on next record. */ lock_type = LOCK_GAP; } else { - /* Next key lock for all equal keys. */ + /* Next key lock for all equal keys including supremum. */ lock_type = LOCK_ORDINARY; } /* We only need to lock locations where duplicates could occur, which