enum trx_dict_op: dictionary operation modes
trx_get_dict_operation(), trx_set_dict_operation(): Accessors for
trx->dict_operation.
lock_table_enqueue_waiting(), lock_rec_enqueue_waiting(): Do not complain
about lock waits if the dictionary mode is TRX_DICT_OP_INDEX_MAY_WAIT.
row_merge_lock_table(): Remove the work-around for avoiding the warning
in lock_table_enqueue_waiting().
trx_undo_mark_as_dict_operation(): Do not write trx->table_id to the
undo log unless the dict_operation is TRX_DICT_OP_TABLE.
ha_innobase::add_index(): Set the dict_operation mode initially to
TRX_DICT_OP_INDEX_MAY_WAIT, then lock the table exclusively, and set the
mode to TRX_DICT_OP_INDEX, and optionally to TRX_DICT_OP_TABLE when
creating a temporary table.
page_cur_set_before_first(), page_cur_set_after_last(),
page_cur_position(): Add const qualifiers to buf_block_t and rec.
A better solution would be to define a const_page_cur_t and a
set of accessors, but it would lead to severe code duplication.
page_rec_get_n_recs_before(): Add const qualifiers.
page_dir_get_nth_slot(): Define as a const-preserving macro.
page_dir_slot_get_rec(), page_dir_slot_get_n_owned(),
page_dir_find_owner_slot(), page_check_dir(): Add const qualifiers.
page_rec_get_next_low(): Add const qualifiers.
page_rec_get_next_const(), page_rec_get_prev_const(): New functions,
based on the const-less page_rec_get_next() and page_rec_get_prev().
page_cur_get_page(), page_cur_get_block(), page_cur_get_page_zip(),
page_cur_get_rec(): Define as const-preserving macros.
page_cur_try_search_shortcut(), page_cur_search_with_match():
Add const qualifiers.
buf_page_get_mutex(): Add a const qualifier to buf_page_t*.
rec_get_next_ptr_const(): Const variant of rec_get_next_ptr().
For some reason, GCC 4.2.1 ignores casts (for removing constness)
in calls to inline functions.
page_align(), ut_align_down(): Make the parameter const void*, but still
return a non-const pointer. This is ugly, but these functions cannot be
replaced with a const-preserving macro in a portable way, given that
the pointer argument is not always pointing to bytes.
buf_block_get_page_zip(): Implement as a const-preserving macro.
buf_frame_get_page_zip(), buf_block_align(): Add const qualifiers.
lock_rec_get_prev(): Silence GCC 4.2.1 warnings.
mlog_write_initial_log_record(), mlog_write_initial_log_record_fast(),
mtr_memo_contains(): Add const qualifier to the pointer.
page_header_get_ptr(): Rewrite as page_header_get_offs(), and
implement as a macro that calls this function.
buf_block_hash_get(): New function, similar to buf_page_hash_get().
buf_page_get_block(): Remove the const qualifiers. This is a low-level
function, and the operations on block->mutex are non-const.
buf_page_try_get_func(): Implement with lower-level predicates, somewhat
similar to buf_page_get_known_nowait().
lock_rec_print(): Remove the unused variable zip_size and the
call to fil_space_get_zip_size(). Adapt to buf_page_try_get() returning
a const pointer.
offsets_[] arrays, as suggested by Vasil.
rec_offs_set_n_alloc(): Declare as a public function. Assert that
n_alloc > REC_OFFS_HEADER_SIZE.
rec_offs_get_n_alloc(): Assert that n_alloc > REC_OFFS_HEADER_SIZE.
Move part of the code from lock_rec_print() in a separate function
buf_page_try_get() because the same functionality is needed in
INFORMATION SCHEMA code.
Approved by: Heikki
is inline and accesses lock_t members.
As advised by Marko rename lock_get_type() to lock_get_type_low() and
create a public non-inline function lock_get_type() which calls
lock_get_type_low().
Approved by: Marko
created in fast index creation.
dict_load_indexes(): Always complain if the first index is not clustered.
lock_table_enqueue_waiting(): Always complain about lock waits in
a dictionary operation.
row_merge_rename_tables(): Add an assertion that dict_sys->mutex is
being held.
row_undo_mod_del_unmark_sec_and_undo_update(): Make the test about
temporary indexes more readable.
row_create_table_for_mysql(): Do not retry creating a temporary table
in fast index creation. Orphaned temporary tables will have to be dropped
in crash recovery.
buf_page_get_gen(). This saves one mutex operation per block request.
buf_page_get_gen(), various macros and functions: Add parameter zip_size.
btr_node_ptr_get_child(): Add parameter index.
fil_space_get_latch(): Add optional output parameter zip_size.
fil_space_get_zip_size(): Return 0 for space id==0, because the
system tablespace is never compressed.
fsp_header_init(): Remove the parameter zip_size.
ibuf_free_excess_pages(): Remove the parameter zip_size.
trx_rseg_t, trx_undo_t: Add field zip_size.
xdes_lst_get_next(): Remove, unused.
Replace all page_t* parameters with buf_block_t*, and replace many
rec_t* parameters with heap_no. This eliminates also many
rec_get_heap_no() calls, which became more expensive with the
introduction of ROW_FORMAT=COMPACT in MySQL/InnoDB 5.0.3.
page_rec_get_heap_no(), lock_get_min_heap_no(): New functions.
page_set_max_trx_id(): Replace page_t* parameter with buf_block_t*,
to avoid a buf_block_align() call.
Replace some occurrences of page_get_page_no() with buf_block_get_page_no().
page_cur_delete_rec(): Replace buf_block_align() with page_cur_get_block().
btr_cur_t: Move page_block to page_cur_t::block.
page_cur_get_block(), page_cur_get_page_zip(): New functions.
page_cur_position(): Add parameter block.
Remove many page_zip parameters, now that there is page_cur_get_page_zip().
Replace some page, page_zip parameters with block.
Add some const qualifiers to function parameters and remove casts.
PAGE_HEAP_NO_INFIMUM, PAGE_HEAP_NO_SUPREMUM, PAGE_HEAP_NO_USER_LOW:
New constants.
Replace some cursor code in low-level diagnostic functions with
direct management of rec, because buf_block_t::buf_fix_count may be 0
when the functions are called, and debug assertions would fail.
with page_get_page_no() and page_get_space_id(). We want to avoid
buf_block_align() calls, and the page_no and space_id are now stamped
on the pages early on.
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().
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.