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

This commit is contained in:
marko 2008-12-16 10:13:31 +00:00
parent 1ed4504b4c
commit 1297a39ffe

View file

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