Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
5.5.37
-
None
-
None
Description
mariadb-5.5/storage/xtradb/row/row0sel.c line 4137
if (set_also_gap_locks
|
&& !(srv_locks_unsafe_for_binlog
|
|| trx->isolation_level <= TRX_ISO_READ_COMMITTED)
|
&& prebuilt->select_lock_type != LOCK_NONE) {
|
|
/* Try to place a lock on the index record */
|
|
/* If innodb_locks_unsafe_for_binlog option is used
|
or this session is using a READ COMMITTED isolation
|
level we do not lock gaps. Supremum record is really
|
a gap and therefore we do not set locks there. */
|
I was getting really confused about the comment and its relation to the code and I've come to the conclusion that the comment should say "this session is not using a REPEATABLE READ" and perhaps the condition could be isolation_level < TRX_ISO_REPEATABLE_READ to match.
Of course I've looked at this too long and just may be wrong.