Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä 2020-06-05 18:05:22 +03:00
commit 68d9d512e9
59 changed files with 669 additions and 550 deletions

View file

@ -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);
}
}