(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().
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.
LRU_position and possibly freed_page_clock. All these fields are
protected by buf_pool->mutex rather than buf_page_get_mutex().
buf_page_set_accessed(): Add a mutex_own() assertion.
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.
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.
buf_block_get_space(), buf_block_get_page_no():
Remove ut_ad(block->buf_fix_count > 0), because since r1052
these functions are also used in low-level code.
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)).
buf0buf.ic: Remove the extern declaration of buf_dbg_counter.
It was declared static in buf0buf.c in r1025.
ha0ha.c: #include "btr0sea.h" #ifdef UNIV_SYNC_DEBUG. Assertions on
btr_search_latch were added in r1041.
hash index, because it might occupy the chunk we would like to free.
TODO: In btr_search_check_free_space_in_heap(), release the block if
btr_search_latch is not immediately available.
buf_pool_shrink(): Split from buf_pool_resize().
btr_search_disabled: New variable, similar to srv_use_adaptive_hash_indexes
that was removed earlier.
btr_search_disable(): New function: disable and purge the adaptive hash index.
btr_search_enable(): New function: enable the adaptive hash index.
ha_clear(): New function: Empty a hash table and free the memory heaps.
assume that non-file pages are free. After trying to free or flush
file pages, do not proceed to buf_chunk_free(), because the calls will
temporarily release buf_pool->mutex. Do not flush if there are non-free
blocks, because it would not achieve anything.
enclose all related debug code in #ifdef UNIV_DEBUG_FILE_ACCESSES.
This should have no effect on the behaviour, as the symbol is
not defined by default. It only reduces the size of buf_block_t
and removes some assignments and debug functions.
buf_LRU_block_free_non_file_page(): Deallocate block->page_zip.data
to avoid ut_a(!block->page_zip.data) in buf_chunk_free().
buf_chunk_free(): Add the assertion ut_a(!block->in_LRU_list).
buf_pool_resize(): When shrinking the buffer pool and there are
non-free blocks in the candidate chunk, free the clean blocks
and move the dirty blocks to the end of the LRU list and request a flush.
Proceed if the chunk becomes free, and retry otherwise.
mysql.patch: Patch to change or add variables to MySQL
innodb.patch: Patch to make the master thread poll requests to resize
the buffer pool.
Replace srv_pool_size and innobase_buffer_pool_size
with srv_buf_pool_size, srv_buf_pool_old_size,
and srv_buf_pool_curr_size.
Add buf_chunk_t, a collection of buf_block_t.
when assigning node->data.
ha_delete(), ha_search_and_delete_if_found(), ha_remove_all_nodes_to_page():
Remove the parameter buf_block_t* block, now that it is stored within the
hash data structure in debug builds.
an assertion failure in debug builds when a context switch occurred in
buf_LRU_search_and_free_block() before the call to
btr_search_drop_page_hash_index() managed to acquire the mutexes again.
ha_node_t: Add the field buf_block_t* block.
ha_search_and_update_if_found(): Rename to ha_search_and_update_if_found_func()
with added buf_block_t* parameter in debug builds. Define the wrapper macro
ha_search_and_update_if_found() that always takes the buf_block_t* parameter.
ha_insert_for_fold(): Rename to ha_insert_for_fold_func()
with added buf_block_t* parameter in debug builds. Define the wrapper macro
ha_insert_for_fold() that always takes the buf_block_t* parameter.
buf_LRU_block_remove_hashed_page(): Overwrite (space_id,page_no)
when freeing a buffer block. This will help catching non-file
pages being passed to buf_block_align().