mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
branches/zip: buf_page_init_for_read(): Use common code for error exit.
This commit is contained in:
parent
1ed4504b4c
commit
1297a39ffe
1 changed files with 7 additions and 11 deletions
|
@ -2604,15 +2604,8 @@ err_exit:
|
|||
mutex_exit(&block->mutex);
|
||||
}
|
||||
|
||||
err_exit2:
|
||||
buf_pool_mutex_exit();
|
||||
|
||||
if (mode == BUF_READ_IBUF_PAGES_ONLY) {
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
bpage = NULL;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
if (fil_tablespace_deleted_or_being_deleted_in_mem(
|
||||
|
@ -2692,7 +2685,9 @@ err_exit2:
|
|||
/* The block was added by some other thread. */
|
||||
buf_buddy_free(bpage, sizeof *bpage);
|
||||
buf_buddy_free(data, zip_size);
|
||||
goto err_exit2;
|
||||
|
||||
bpage = NULL;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
page_zip_des_init(&bpage->zip);
|
||||
|
@ -2729,6 +2724,7 @@ err_exit2:
|
|||
}
|
||||
|
||||
buf_pool->n_pend_reads++;
|
||||
func_exit:
|
||||
buf_pool_mutex_exit();
|
||||
|
||||
if (mode == BUF_READ_IBUF_PAGES_ONLY) {
|
||||
|
@ -2736,7 +2732,7 @@ err_exit2:
|
|||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
ut_ad(buf_page_in_file(bpage));
|
||||
ut_ad(!bpage || buf_page_in_file(bpage));
|
||||
return(bpage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue