mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
Don't take unnecessary locks on supremum records when the
srv_locks_unsafe_for_binlog option is enabled. Fixes an assertion failure in the innodb_unsafe_binlog testcase when compiled with UNIV_DEBUG.
This commit is contained in:
parent
870edae7e4
commit
85cd21bf65
1 changed files with 13 additions and 0 deletions
|
@ -1359,6 +1359,12 @@ rec_loop:
|
|||
|
||||
if (srv_locks_unsafe_for_binlog
|
||||
|| trx->isolation_level == TRX_ISO_READ_COMMITTED) {
|
||||
|
||||
if (page_rec_is_supremum(next_rec)) {
|
||||
|
||||
goto skip_lock;
|
||||
}
|
||||
|
||||
lock_type = LOCK_REC_NOT_GAP;
|
||||
} else {
|
||||
lock_type = LOCK_ORDINARY;
|
||||
|
@ -1377,6 +1383,7 @@ rec_loop:
|
|||
}
|
||||
}
|
||||
|
||||
skip_lock:
|
||||
if (page_rec_is_infimum(rec)) {
|
||||
|
||||
/* The infimum record on a page cannot be in the result set,
|
||||
|
@ -1407,6 +1414,12 @@ rec_loop:
|
|||
|
||||
if (srv_locks_unsafe_for_binlog
|
||||
|| trx->isolation_level == TRX_ISO_READ_COMMITTED) {
|
||||
|
||||
if (page_rec_is_supremum(rec)) {
|
||||
|
||||
goto next_rec;
|
||||
}
|
||||
|
||||
lock_type = LOCK_REC_NOT_GAP;
|
||||
} else {
|
||||
lock_type = LOCK_ORDINARY;
|
||||
|
|
Loading…
Add table
Reference in a new issue