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.