The followin mysql-tests failed (and they are known to fail):
main.information_schema [ fail ]
main.innodb_file_per_table_basic[ fail ]
main.type_bit_innodb [ fail ]
Tested against : MYSQL_SERVER_VERSION "5.1.28"
in *.h files, so that the function signatures in the *.h and *.c files fully
match each other.
ut_dulint_sort(): Add a UNIV_INTERN qualifier also to the function definition.
ha_innodb.cc: Add the columns COMPRESSED, COMPRESSED_OK, DECOMPRESSED
to INFORMATION_SCHEMA.INNODB_BUDDY.
page_zip_compress_count[], page_zip_compress_ok[]: New statistic counters,
incremented in page_zip_compress().
page_zip_decompress_count[]: New statistic counter,
incremented in page_zip_decompress().
introduced ib_longlong and %ll length specifier are not C89.)
row_ext_t: Change char* buf to byte* buf to avoid signedness warnings.
Change the type of all bit fields to unsigned.
rec_get_next_ptr(): Add (byte*) casts to avoid arithmetics on void*.
page_zip_decompress_clust(): Do not mix declarations and code.
Add m_nonempty for facilitating the test in page_zip_alloc(). This
reduces the combined size of the bit-fields to 32 bits. Thus,
sizeof(page_zip_des_t) == 2 machine words on 32-bit and wider systems.
decompression from page_zip_des_t to buf_page_t, because the fields
needed in compression are modified without holding the block mutex.
All writes to bit-fields sharing a machine word must be protected
by the same mutex or rw-lock.
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.
mlog_parse_string(): Remove an off-by-one error in an assertion.
fil_extend_space_to_desired_size(): fsp_header_get_free_limit(),
fsp_try_extend_data_file(): Replace UNIV_PAGE_SIZE with the actual page size.
PAGE_ZIP_MIN_SIZE: New constant, to be used in assertions.
FSP_SEG_INODES_PER_PAGE: Add parameter zip_size.
fsp_seg_inode_page_get_nth_inode(), fsp_seg_inode_page_find_used(),
fsp_seg_inode_page_find_free(): Add parameter zip_size.
operations on BLOB columns. There are some bugs in the code, because
test-insert and a few other tests fail.
page_mem_free(): Add parameter index. Decrement PAGE_N_RECS here.
Move some operations to page_zip_dir_delete().
page_zip_clear_rec(): Make this a static function.
page_zip_dir_delete(): Add parameters index and offsets.
Decrement PAGE_N_RECS and clear info_bits and n_owned.
page_zip_get_n_prev_extern(): Correct the synopsis and the algorithm.
Add parameter page_zip. Search the records in heap_no order instead
of collation order.
page_zip_compress(), page_zip_decompress(): Only copy BLOB pointers
and increment n_blobs for records that have not been deleted.
page_zip_clear_rec(): Clear trx_id and roll_ptr on the compressed page.
page_zip_dir_delete(): Decrement PAGE_N_RECS. Shift the array of
BLOB pointers. Call page_zip_clear_rec().
page_zip_dir_add_slot(): Shift the array of BLOB pointers to make
space of roll_ptr and trx_id.
page_cur_delete_rec(): Do not decrement PAGE_N_RECS or call
page_zip_clear_rec(), as page_mem_free() already does it.
of clustered indexes. Previously, parts of the code assumed that these
columns would exist on all leaf pages. Simplify the update-in-place of
these columns.
Add inline function dict_index_is_clust() to replace all tests
index->type & DICT_CLUSTERED.
Remove the redo log entry types MLOG_ZIP_WRITE_TRX_ID and
MLOG_ZIP_WRITE_ROLL_PTR, because the modifications to these columns
are covered by logical logging.
Fuse page_zip_write_trx_id() and page_zip_write_roll_ptr() into
page_zip_write_trx_id_and_roll_ptr().
page_zip_dir_add_slot(), page_zip_available(): Add flag "is_clustered",
so that no space will be reserved for TRX_ID and ROLL_PTR on leaf pages
of secondary indexes.
page_zip_apply_log(): Flag an error when val==0 is encoded with two bytes.
page_zip_write_rec(): Add debug assertions that there is enough space
available for the entry before copying the data bytes of the record.
btr_root_raise_and_insert(): Because btr_page_set_level() must not
change level from non-zero to zero on compressed pages, invoke
btr_page_set_level() with page_zip==NULL and compress the entire
root page after creating it from the scratch.
btr_attach_half_pages(): Simplify the computation of lower_page_zip
and upper_page_zip. Invoke btr_node_ptr_set_child_page_no() with
the correct page_zip.
page0page.h: Add __attribute__((const)) to functions testing for
infimum or supremum.
page_zip_dir_delete(): Note that the third parameter may be NULL.
Correct offset errors.
page_zip_available(): Use n_heap instead of n_recs.
page_zip_dir_find(), page_zip_dir_find_free(): Fix off-by-one error.
page_zip_fields_encode(), page_zip_fields_decode(): Encode and decode
index->n_nullable for non-leaf pages.
page_zip_apply_log(): Write REC_NEW_HEAP_NO before calling
rec_offs_make_valid().
page_zip_write_node_ptr(): Correct off-by-one error.
page_cur_search_with_match(): Make use of page_is_leaf().
page_dir_add_slots(): Replaced with page_dir_add_slot(). Use memmove().
row_upd_rec_in_place(), page_zip_write_rec(): Add parameter "index".
page_dir_set_n_heap(): Add a debug assertion that on compressed
pages, n_heap will always be incremented by one. Improve code formatting.
page_zip_dir_add_slot(): New function, called from
page_cur_insert_rec_low() after page_mem_alloc_heap().
rec_set_n_owned_new(): Do not call page_zip_rec_set_owned()
on the supremum record.
rec_offs_make_valid(): Add debug assertions.
page_zip_dir_user_size(): Correct an off-by-one error in the debug assertion.
page_zip_apply_log(): Add parameter trx_id_col. Skip trx_id and roll_ptr.
page_zip_decompress(): Simplify the handling of "storage" in the loop that
copies the uncompressed fields.
page_zip_write_rec(): Store trx_id and roll_ptr separately.
page_zip_write_trx_id(), page_zip_write_roll_ptr(): Fix off-by-one errors.
page_cur_insert_rec_low(): Call page_zip_dir_add_slot() after
page_mem_alloc_heap(). Remove some redundant assertions.
Pass page_zip to page_dir_split_slot().
compressed pages.
btr_root_raise_and_insert(): Distinguish root_page_zip and new_page_zip.
btr_cur_set_ownership_of_extern_field(): Do not log the write on the
uncompressed page if it will be logged for page_zip.
lock_rec_insert_check_and_lock(), lock_sec_rec_modify_check_and_lock():
Update the max_trx_id field also on the compressed page.
mlog_write_ulint(): Add UNIV_UNLIKELY hints. Remove trailing white space.
mlog_log_string(): Remove trailing white space.
rec_set_field_extern_bits(): Remove parameter mtr, as the write will either
occur in the heap, or it will be logged at a higher level.
recv_parse_or_apply_log_rec_body(),
page_zip_write_header(): Add log record type MLOG_ZIP_WRITE_HEADER.
page_header_set_field(): Pass mtr=NULL to page_zip_write_header().
page_header_reset_last_insert(): Pass mtr to page_zip_write_header().
btr_page_set_index_id(), btr_page_set_level(),
btr_page_set_next(), btr_page_set_prev(): Pass mtr to page_zip_write_header().
row_upd_rec_sys_fields(): Pass mtr=NULL to page_zip_write_trx_id() and
page_zip_write_roll_ptr(), since the write will be logged at a higher level.
page_zip_write_header(): Add parameter mtr.
page_zip_write_header_log(): New function.
Remove rec_set_nth_field_extern_bit().
Make rec_set_nth_field_extern_bit_old() static.
Rename rec_set_nth_field_extern_bit_new()
to rec_set_field_extern_bits_new() and make it static.
row_ins_index_entry_low(): Remove bogus TODO comment.
BLOB pointers, trx_id, and roll_ptr.
btr_empty(), btr_create(), page_create(): Add parameter "index", as some
index information will be encoded on the compressed page.
Define REC_NODE_PTR_SIZE as 4.
Allow btr_page_reorganize() and btr_page_reorganize_low() to fail.
Define the error code DB_ZIP_OVERFLOW.
Make row_ins_index_entry_low() static.
page0zip: Encode the index, log reorganized records, and store uncompressed
fields separately from the compressed data stream.