symbols. Use it for all definitions of non-static variables and functions.
lexyy.c, make_flex.sh: Declare yylex as UNIV_INTERN, not static. It is
referenced from pars0grm.c.
Actually, according to
nm .libs/ha_innodb.so|grep -w '[ABCE-TVXYZ]'
the following symbols are still global:
* The vtable for class ha_innodb
* pars0grm.c: The function yyparse() and the variables yychar, yylval, yynerrs
The required changes to the Bison-generated file pars0grm.c will be addressed
in a separate commit, which will add a script similar to make_flex.sh.
The class ha_innodb is renamed from class ha_innobase by a #define. Thus,
there will be no clash with the builtin InnoDB. However, there will be some
overhead for invoking virtual methods of class ha_innodb. Ideas for making
the vtable hidden are welcome. -fvisibility=hidden is not available in GCC 3.
UNIV_PAGE_SIZE than the default 16384.
MEM_BLOCK_STANDARD_SIZE: Cap to MEM_MAX_ALLOC_IN_BUF when UNIV_PAGE_SIZE
is less than 16384.
ha_create_func(): Invoke mem_heap_create_in_btr_search() with
ut_min(4096, MEM_MAX_ALLOC_IN_BUF) instead of 4096. The memory
will be allocated from the buffer pool, and with UNIV_PAGE_SIZE
defined to 4096, there would not be any space for the mem_heap
data structure overhead.
Implement a limit on the memory used by the INNODB_TRX, INNODB_LOCKS and
INNODB_LOCK_WAITS tables. The maximum allowed memory is defined with the
macro TRX_I_S_MEM_LIMIT.
Approved by: Marko (via IM)
Add a type that stores chunks of data in its own storage and avoids
duplicates. Supported methods:
ha_storage_create()
Allocates new storage object.
ha_storage_put()
Copies a given data chunk into the storage and returns pointer to the
copy. If the data chunk is already present, a pointer to the existing
object is returned and the given data chunk is not copied.
ha_storage_empty()
Clears (empties) the storage from all data chunks that are stored in it.
ha_storage_free()
Destroys a storage object. Opposite to ha_storage_create().
Approved by: Marko
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.
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.
Instead, get buf_block_t* as a parameter.
Without this patch, buf_page_hash_get() would return NULL in
buf_block_align(). The function buf_LRU_search_and_free_block()
invokes buf_LRU_block_remove_hashed_page(), which removes the
hash mapping needed by buf_page_hash_get().
rec_get_nth_field_offs_old(): Split from rec_get_nth_field_old().
rec_get_nth_field_old(): Reimplement as a constness-preserving macro.
dict_drop_index_tree(), dict_truncate_index_tree(): Note that rec is
an in/out parameter, as the B-tree root page number will be updated.
passed as TRUE.
Enclose hash_table_t::adaptive and buf_block_t::n_pointers in
#ifdef UNIV_DEBUG.
btr_search_drop_page_hash_index(): Enclose the corruption check
(which depends on buf_block_t::n_pointers) in #ifdef UNIV_DEBUG.
ut_is_2pow(): New function for testing if a number is zero or a power of two.
Use this function instead of bitwise arithmetics or ut_2_power_up() where
possible.