sync_array_object_signalled(): Add a (void) cast to eliminate a gcc warning
about the return value of os_atomic_increment() being ignored.
rw_lock_create_func(): Properly indent the preprocessor directives.
rw_lock_x_lock_low(), rw_lock_x_lock_func_nowait(): Split lines correctly.
rw_lock_set_writer_id_and_recursion_flag(): Silence a Valgrind warning.
Do not mix statements and variable declarations.
To the files touched by the Google patch from c4144 (excluding
include/os0sync.ic because later we removed Google code from that file):
* Remove the Google license
* Remove old Innobase copyright lines
* Add a reference to the Google license and to the GPLv2 license at the top,
as recommended by the lawyers at Oracle Legal.
(followup to r4145) Non-functional change:
Change the os_atomic_increment() and os_compare_and_swap() functions
to macros to avoid artificial limitations on the types of those
functions' arguments. As a consequence typecasts from the source
code can be removed.
Also remove Google's copyright from os0sync.ic because that file no longer
contains code from Google.
Approved by: Marko (rb://88), also ok from Inaam via IM
This patch changes the innodb mutexes and rw_locks implementation.
On supported platforms it uses GCC builtin atomics. These changes
are based on the patch sent by Mark Callaghan of Google under BSD
license. More technical discussion can be found at rb://30
Approved by: Heikki
btr_search_disabled: Rename to btr_search_enabled and change the type
to char, so that it can be directly linked to the MySQL parameters.
Note that the variable is protected by btr_search_latch and
btr_search_enabled_mutex, a new mutex introduced in this patch.
btr_search_enabled_mutex: A new mutex, to protect btr_search_enabled
together with btr_search_latch.
buf_pool_drop_hash_index(): New function, to be called from
btr_search_disable().
btr_search_disable(), btr_search_enable(): Fix bugs. These functions
were previously unused.
btr_search_guess_on_hash(), btr_search_build_page_hash_index():
Check btr_search_enabled once more, while holding btr_search_latch.
btr_cur_search_to_nth_level(): Note that the reads of btr_search_enabled
may be dirty and explain why it should not be a problem.
innobase_adaptive_hash_index: Remove. The variable btr_search_enabled will be used directly instead.
innodb_adaptive_hash_index_update(): New function, an update callback for
innodb_adaptive_hash_index. This will call either btr_search_disable()
or btr_search_enable() when the value is assigned. The functions will
be called even if the value does not appear to be changed, e.g., when
setting from TRUE to TRUE or FALSE to FALSE.
rb://85 approved by Heikki Tuuri. This addresses Issue #163.
Implement the system tablespace tagging described on the wiki:
https://svn.innodb.com/innobase/InnoDB_version_and_feature_compatibility
A brief description of the changes:
* The file format tag will be saved in the trx system page, starting at
(UNIV_PAGE_SIZE - 16) for 8 bytes.
* The configuration parameter innodb_file_format_check is introduced.
This variable can be set to on/off and any of the supported file
formats in the configuration file, but can only be set to any of
the supported file formats during runtime. The default is on.
* During table create/open, check the current file format against
the max in file_format_max. If the current file format is newer,
update file_format_max and tag the system tablespace with the
newer one in a normal mtr.
* During startup, write the tag to the error log and check it against
DICT_TF_FORMAT_MAX. Refuse to start with error, if
-- DICT_TF_FORMAT_MAX < the tag, and
-- innodb_file_format_check is ON
Print out a warning , if
-- DICT_TF_FORMAT_MAX < the tag, but
-- innodb_file_format_check is off
* The system tablespace tag is re-settable using:
set innodb_file_format_check = <file_format>
Approved by: Sunny
SYNC_LEVEL_VARYING would cause an assertion failure when a thread tried
to release it. We still have to check because it's a varying lock and
could have been added later, so if the lookup fails then we simply ignore
it and return TRUE.
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.
now that all of InnoDB code is built from a single Makefile and it should
not be possible to build the modules with mutually incompatible options.
#define INSIDE_HA_INNOBASE_CC: Remove.
srv_sizeof_trx_t_in_ha_innodb_cc: Remove.
dict_table_get_low_noninlined(): Remove. This function was unused.
Remove all _noninline functions. Remove the _noninline suffix from
all function calls in ha_innodb.cc.
Do not break the latching order in TRUNCATE TABLE.
dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur. Reposition pcur before calling btr_create().
sync_thread_add_level(): Remove the relaxation of the assertion added in r968.