that also exists in uncompressed form in the buffer pool, pass the
compressed frame to fil_io() instead of the uncompressed one when
not using the doublewrite buffer.
page checksum of compressed-only blocks. Pass the compressed page frame
to fil_io() when needed.
page_zip_calc_checksum(): Skip also FIL_PAGE_LSN and FIL_PAGE_FILE_FLUSH_LSN.
buf_flush_init_for_writing(): Expect page to be non-NULL.
and to be flushed to disk.
buf_LRU_free_block(): Enable the freeing of uncompressed pages of
compressed tablespaces.
trx_doublewrite->buf_block_arr[]: Change the type from buf_block_t*
to buf_page_t*.
buf_flush_ready_for_flush(): Add debug assertion.
buf_flush_buffered_writes(), buf_flush_try_page(): Support blocks of type
BUF_BLOCK_ZIP_DIRTY.
buf_flush_post_to_doublewrite_buf(), buf_flush_write_block_low():
Change the type of the parameter from buf_block_t* to buf_page_t*.
buf_flush_init_for_writing(): Allow page to be NULL if page_zip_ is non-NULL.
buf_LRU_block_remove_hashed_page(): Return the new state of the block.
Only call buf_LRU_block_free_hashed_page()
if buf_LRU_block_remove_hashed_page() did not return BUF_BLOCK_ZIP_FREE,
that is, the control block was not freed.
buf_LRU_insert_zip_clean(): New function, for inserting a compressed-only
block into buf_pool->zip_clean in the LRU order.
buf_LRU_block_remove_hashed_page(), buf_LRU_free_block():
Add the flag "zip" for controlling if the compressed page of an uncompressed
page should be removed. For now, assume zip==TRUE.
buf_LRU_get_free_block(): Replace the test for UT_LIST_GET_LEN(buf_pool->free)
with a test for the return value of buf_LRU_get_free_only(). Do not
free zip.data, as it must already have been freed.
buf_flush_insert_into_flush_list(), buf_flush_insert_sorted_into_flush_list():
Remove compressed-only blocks from the buf_pool->zip_clean list.
buf_flush_remove(): Restore compressed-only blocks to
the buf_pool->zip_clean list.
buf_page_init_for_read(): Uncompress compressed-only blocks when possible.
Currently, there cannot be any compressed-only blocks in the buffer pool;
they would be inserted by buf_LRU_free_block(bpage, zip=FALSE).
buf_flush_remove(): New function, for removing a block from the flush list.
Sliced from buf_flush_write_complete().
buf_page_set_state(): Allow transitions between BUF_BLOCK_ZIP_PAGE
and BUF_BLOCK_ZIP_DIRTY.
(state == BUF_BLOCK_ZIP_PAGE). Make use of buf_page_in_file()
and buf_page_get_mutex().
buf_block_get_newest_modification(): Rename to
buf_page_get_newest_modification().
buf_block_t. Move the fields "hash" and "file_page_was_freed" from
buf_block_t to buf_page_t.
buf_page_in_file(): New function, for checking block state in assertions.
storage size from 16 to 3 bits.
page_zip_get_size(), page_zip_set_size(): New functions.
Replace direct references to page_zip_des_t:size with calls to
buf_block_get_zip_size(), page_zip_get_size(), and page_zip_set_size().
and uncompressed buffer pool pages.
buf_block_t: Replace page_zip, space, and offset with buf_page_t page.
Replace some integers with bit-fields.
enum buf_block_state: Rename to buf_page_state. Add BUF_BLOCK_ZIP_PAGE.
page_zip_des_t: Add the field "state". Make the integer fields bit-fields.
page_zip_copy(): Document which fields are copied.
and block->space with buf_block_get_state(block), buf_block_get_page_no(block),
and buf_block_get_space(block).
enum buf_block_state: Replaces the #define'd buf_block_t.state values.
buf_block_get_state(): New function.
buf_block_get_frame(): Add __attribute__((const)).
buf_flush_init_for_writing(): Remove parameters space, page_no.
fsp_init_file_page_low(): Wriet space_id and page_no to the page.
fil_create_new_single_table_tablespace(): Write space_id to the page.
with FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID and FIL_PAGE_DATA. The doublewrite
buffer needs to read the space_id in order to determine the type of the page.
Because FIL_PAGE_TYPE could contain garbage in MySQL/InnoDB 5.0 and earlier
versions, we cannot trust fil_page_get_type(). Instead, we have to always
store the space_id at the same location. This modification wastes 12 bytes
per compressed BLOB page (1.2% on 1-kilobyte pages).
buf_flush_init_for_writing(): On FIL_PAGE_TYPE_ZBLOB, write to
page_zip->data instead of page.
page_zip_write_rec(), page_zip_write_blob_ptr(), page_zip_write_node_ptr():
Add ut_ad(page_simple_validate_new()).
fil_read(), fil_write(): Make these inlined functions in fil0fil.c.
fil_write_lsn_and_arch_no_to_file(): Remove the parameter space_id and
note that this function is to be called on the system tablespace, which
is uncompressed.
page_zip instead of calling fil_space_get_zip_size(). In
fil_create_new_single_table_tablespace(), the table space has not yet
been created. Handle also FIL_PAGE_TYPE_ALLOCATED.
os_aio_simulated_handle(): Temporarily disable os_file_check_page_trailers(),
which cannot be invoked on compressed pages.
dict_table_add_system_columns(): New function, split from
dict_table_add_to_cache().
mlog_parse_index(): Add system columns to the dummy table and identify
DB_TRX_ID and DB_ROLL_PTR in the dummy index.
buf_LRU_get_free_block(): Note that page_zip->data should be allocated from
an aligned memory pool.
buf_flush_buffered_writes(): Write compressed pages to disk.
buf_flush_post_to_doublewrite_buf(): Copy compressed pages to the
doublewrite buffer. Zero fill any excess space.
buf_flush_init_for_writing(): Treat all compressed pages the same.
buf_read_page_low(): Read compressed pages from disk.
buf_page_io_complete(): Process compressed pages.
trx_sys_doublewrite_init_or_restore_page(): Process compressed pages.
mlog_write_initial_log_record_fast(): Enable a debug printout
#ifdef UNIV_LOG_DEBUG.
fsp_header_init(), fsp_fill_free_list(): Pass the compressed page size
to buf_page_create().
page_zip_compress_write_log(): Flatten the if-else if-else logic.
page_zip_parse_write_blob_ptr(): Do not test page_zip if page==NULL.
page_zip_parse_write_node_ptr(): Do not test page_zip if page==NULL.
Invoke mlog_close() correctly.
row_sel_store_row_id_to_prebuilt(): Add UNIV_UNLIKELY hint to an
assertion-like test.
a few places accordingly.
os_aio_simulated_handle(): Add TODO comments about skipping the write
checks for compressed pages.
dict_create_sys_tables_tuple(): Write the compressed page size to
the TYPE column.
open_or_create_data_files(): Simplify the fil_node_create() call.
fil_node_create(): Do not touch space->zip_size. It was already initialized
by fil_space_create().
fil_reset_too_high_lsns(), buf_flush_buffered_writes(): Add TODO comment
about compressed pages.
buf_flush_init_for_writing(): Handle pages of type FIL_PAGE_INODE,
FIL_PAGE_IBUF_BITMAP, and FIL_PAGE_TYPE_FSP_HDR as uncompressed ones.
btr_root_raise_and_insert(): When copying root to new_page byte for byte,
restore the page number of new_page afterwards.
buf_flush_init_for_writing(): For FIL_PAGE_INDEX, write the page number
and space id also to the uncompressed page.
Introduce FIL_PAGE_ZBLOB_DATA as a synonym for FIL_PAGE_FILE_FLUSH_LSN.
btr_store_big_rec_extern_fields(): Make the assertion about
dict_table_zip_size() more accurate.
buf_LRU_get_free_block(), buf_block_alloc(): Add parameter zip_size.
buf_calc_zblob_page_checksum(): Remove. Replace with page_zip_calc_checksum().
buf_page_init(): Remove parameter zip_size.
buf_page_io_complete(): Add a placeholder for handling compressed pages.
trx_doublewrite_page_inside(): Remove redundant function.
page_zip_write_rec(): Relax an overly tight assertion about blob_no.
buf_page_print(): Print also compressed pages. Add parameter zip_size.
buf_flush_init_for_writing(): Stamp the fields on a compressed B-tree index
page.
Add the header field FIL_PAGE_ZBLOB_SPACE_ID as an alias of FIL_PAGE_PREV.
page_zip_calc_checksum(): New function.
page_zip_compress(): Avoid copying the fields that are written in
buf_flush_init_for_writing().
page_zip_header_cmp(): New function for comparing those fields of the
page header that will not be written in buf_flush_init_for_writing().
buf_flush_init_for_writing(): Calculate the checksum with the actual zip_size.
buf_calc_zblob_page_checksum(): Skip the field FIL_PAGE_SPACE_OR_CHKSUM.
trx_sys_doublewrite_init_or_restore_page(): Use the actual zip_size.
page_cur_insert_rec_low(): If page_zip_alloc() fails, try compressing the
whole page afterwards.
and to the file space header (FSP_PAGE_ZIP_SIZE, renamed from
FSP_LOWEST_NO_WRITE).
fil_space_struct: Add zip_size.
dict_table_struct: Embed zip_size in flags.
dict_table_zip_size(): Infer zip_size from table->flags.
dict_sys_tables_get_zip_size(): Read zip_size from SYS_TABLES.TYPE.
fil_space_get_zip_size(): Read zip_size from the file space header.
Add the redo log entry type MLOG_ZIP_FILE_CREATE.
dict_mem_table_create(): Account for DICT_TF_COMPRESSED in a debug assertion.
btr_store_big_rec_extern_fields(), btr_free_externally_stored_field(),
btr_copy_externally_stored_field(): Implement the disk format for
compressed BLOB pages.
btr_copy_externally_stored_field(): Improve error reporting and handling
when decompressing BLOB pages.
buf_flush_init_for_writing(), buf_page_is_corrupted(), buf_page_print():
Account for compressed BLOB pages (FIL_PAGE_TYPE_ZBLOB).
buf_calc_zblob_page_checksum(): New function.