mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Merge 10.3 into 10.4
This commit is contained in:
commit
68d9d512e9
59 changed files with 669 additions and 550 deletions
|
|
@ -7331,29 +7331,19 @@ btr_blob_free(
|
|||
mtr_t* mtr) /*!< in: mini-transaction to commit */
|
||||
{
|
||||
buf_pool_t* buf_pool = buf_pool_from_block(block);
|
||||
ulint space = block->page.id.space();
|
||||
ulint page_no = block->page.id.page_no();
|
||||
|
||||
const page_id_t page_id(block->page.id);
|
||||
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
|
||||
|
||||
mtr_commit(mtr);
|
||||
|
||||
buf_pool_mutex_enter(buf_pool);
|
||||
|
||||
/* Only free the block if it is still allocated to
|
||||
the same file page. */
|
||||
|
||||
if (buf_block_get_state(block)
|
||||
== BUF_BLOCK_FILE_PAGE
|
||||
&& block->page.id.space() == space
|
||||
&& block->page.id.page_no() == page_no) {
|
||||
|
||||
if (!buf_LRU_free_page(&block->page, all)
|
||||
&& all && block->page.zip.data) {
|
||||
if (buf_page_t* bpage = buf_page_hash_get(buf_pool, page_id)) {
|
||||
if (!buf_LRU_free_page(bpage, all)
|
||||
&& all && bpage->zip.data) {
|
||||
/* Attempt to deallocate the uncompressed page
|
||||
if the whole block cannot be deallocted. */
|
||||
|
||||
buf_LRU_free_page(&block->page, false);
|
||||
buf_LRU_free_page(bpage, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue