diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
commit | a2a2e32c02643a0cec111511220227703fda1cd5 (patch) | |
tree | 69cc2b631234c2a8e026b9cd4d72676c61c594df /storage/innobase/lock | |
parent | Releasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff) | |
download | mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip |
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index a2107007..27a0d154 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4423,7 +4423,7 @@ static void lock_rec_unlock_unmodified(hash_cell_t &cell, lock_t *lock, mtr.start(); if (buf_block_t *block= btr_block_get(*index, lock->un_member.rec_lock.page_id.page_no(), - RW_S_LATCH, true, &mtr)) + RW_S_LATCH, &mtr)) { if (UNIV_UNLIKELY(!page_is_leaf(block->page.frame))) { @@ -6967,45 +6967,3 @@ void lock_sys_t::deadlock_check() if (acquired) wr_unlock(); } - -/** Update the locks when a page is split and merged to two pages, -in defragmentation. */ -void lock_update_split_and_merge( - const buf_block_t* left_block, /*!< in: left page to which merged */ - const rec_t* orig_pred, /*!< in: original predecessor of - supremum on the left page before merge*/ - const buf_block_t* right_block) /*!< in: right page from which merged */ -{ - ut_ad(page_is_leaf(left_block->page.frame)); - ut_ad(page_is_leaf(right_block->page.frame)); - ut_ad(page_align(orig_pred) == left_block->page.frame); - - const page_id_t l{left_block->page.id()}; - const page_id_t r{right_block->page.id()}; - const rec_t *left_next_rec= page_rec_get_next_const(orig_pred); - if (UNIV_UNLIKELY(!left_next_rec)) - { - ut_ad("corrupted page" == 0); - return; - } - ut_ad(!page_rec_is_metadata(left_next_rec)); - - /* This would likely be too large for a memory transaction. */ - LockMultiGuard g{lock_sys.rec_hash, l, r}; - - /* Inherit the locks on the supremum of the left page to the - first record which was moved from the right page */ - lock_rec_inherit_to_gap(g.cell1(), l, g.cell1(), l, left_block->page.frame, - page_rec_get_heap_no(left_next_rec), - PAGE_HEAP_NO_SUPREMUM); - - /* Reset the locks on the supremum of the left page, - releasing waiting transactions */ - lock_rec_reset_and_release_wait(g.cell1(), l, PAGE_HEAP_NO_SUPREMUM); - - /* Inherit the locks to the supremum of the left page from the - successor of the infimum on the right page */ - lock_rec_inherit_to_gap(g.cell1(), l, g.cell2(), r, left_block->page.frame, - PAGE_HEAP_NO_SUPREMUM, - lock_get_min_heap_no(right_block)); -} |