Commit 1297a39f authored by marko's avatar marko

branches/zip: buf_page_init_for_read(): Use common code for error exit.

parent 1ed4504b
......@@ -2604,15 +2604,8 @@ buf_page_init_for_read(
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 @@ buf_page_init_for_read(
/* 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 @@ buf_page_init_for_read(
}
buf_pool->n_pend_reads++;
func_exit:
buf_pool_mutex_exit();
if (mode == BUF_READ_IBUF_PAGES_ONLY) {
......@@ -2736,7 +2732,7 @@ buf_page_init_for_read(
mtr_commit(&mtr);
}
ut_ad(buf_page_in_file(bpage));
ut_ad(!bpage || buf_page_in_file(bpage));
return(bpage);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment