Commit 4e37e2f8 authored by marko's avatar marko

branches/zip: Minor cleanup.

buf_page_get_release_on_io(): Removed this unused function.

ibuf_build_entry_from_ibuf_rec(): Justify why it is not necessary to
add system columns to the dummy table pointed to by the dummy secondary index.

page_zip_rec_set_deleted(): Add a page_zip_validate() assertion.
parent d4db2cf5
......@@ -1322,7 +1322,11 @@ ibuf_build_entry_from_ibuf_rec(
ibuf_dummy_index_add_col(index, dfield_get_type(field), len);
}
/* Fix an ut_ad() failure in page_zip_write_rec(). */
/* Prevent an ut_ad() failure in page_zip_write_rec() by
adding system columns to the dummy table pointed to by the
dummy secondary index. The insert buffer is only used for
secondary indexes, whose records never contain any system
columns, such as DB_TRX_ID. */
ut_d(dict_table_add_system_columns(index->table, index->table->heap));
*pindex = index;
......
......@@ -188,27 +188,6 @@ buf_page_optimistic_get_func(
ulint line, /* in: line where called */
mtr_t* mtr); /* in: mini-transaction */
/************************************************************************
Tries to get the page, but if file io is required, releases all latches
in mtr down to the given savepoint. If io is required, this function
retrieves the page to buffer buf_pool, but does not bufferfix it or latch
it. */
UNIV_INLINE
buf_block_t*
buf_page_get_release_on_io(
/*=======================*/
/* out: pointer to the block, or NULL
if not in buffer buf_pool */
ulint space, /* in: space id */
ulint zip_size, /* in: compressed page size in bytes
or 0 for uncompressed pages */
ulint offset, /* in: offset of the page within space
in units of a page */
buf_block_t* guess, /* in: guessed frame or NULL */
ulint rw_latch, /* in: RW_X_LATCH, RW_S_LATCH,
or RW_NO_LATCH */
ulint savepoint, /* in: mtr savepoint */
mtr_t* mtr); /* in: mtr */
/************************************************************************
This is used to get access to a known database page, when no waiting can be
done. */
......
......@@ -945,54 +945,6 @@ buf_page_peek(
return(bpage != NULL);
}
/************************************************************************
Tries to get the page, but if file io is required, releases all latches
in mtr down to the given savepoint. If io is required, this function
retrieves the page to buffer buf_pool, but does not bufferfix it or latch
it. */
UNIV_INLINE
buf_block_t*
buf_page_get_release_on_io(
/*=======================*/
/* out: pointer to the block, or NULL
if not in buffer buf_pool */
ulint space, /* in: space id */
ulint zip_size, /* in: compressed page size in bytes
or 0 for uncompressed pages */
ulint offset, /* in: offset of the page within space
in units of a page */
buf_block_t* guess, /* in: guessed block or NULL */
ulint rw_latch, /* in: RW_X_LATCH, RW_S_LATCH,
or RW_NO_LATCH */
ulint savepoint, /* in: mtr savepoint */
mtr_t* mtr) /* in: mtr */
{
buf_block_t* block;
block = buf_page_get_gen(space, zip_size, offset, rw_latch, guess,
BUF_GET_IF_IN_POOL,
__FILE__, __LINE__,
mtr);
if (block != NULL) {
return(block);
}
/* The page was not in the buffer buf_pool: release the latches
down to the savepoint */
mtr_rollback_to_savepoint(mtr, savepoint);
buf_page_get(space, zip_size, offset, RW_S_LATCH, mtr);
/* When we get here, the page is in buffer, but we release
the latches again down to the savepoint, before returning */
mtr_rollback_to_savepoint(mtr, savepoint);
return(NULL);
}
/************************************************************************
Releases a compressed-only page acquired with buf_page_get_zip(). */
UNIV_INLINE
......
......@@ -3619,6 +3619,9 @@ page_zip_rec_set_deleted(
} else {
*slot &= ~(PAGE_ZIP_DIR_SLOT_DEL >> 8);
}
#ifdef UNIV_ZIP_DEBUG
ut_a(page_zip_validate(page_zip, page_align(rec)));
#endif /* UNIV_ZIP_DEBUG */
}
/**************************************************************************
......
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