/*********************************
comments to Doxygen /** style like this:
/*****************************//**
This conversion was performed by the following command:
perl -i -e 'while(<ARGV>){if (m|^/\*{30}\**$|) {
s|\*{4}$|//**| if ++$com>1; $_ .= "\@file $ARGV\n" if $com==2}
print; if(eof){$.=0;undef $com}}' */*[ch] include/univ.i
This patch was created by running the following commands:
for i in */*[ch]; do doxygenify.pl $i; done
perl -i -pe 's#\*{3} \*/$#****/#' */*[ch]
where doxygenify.pl is
https://svn.innodb.com/svn/misc/trunk/tools/doxygenify.pl r510
Verified the consistency as follows:
(0) not too many /* in: */ or /* out: */ comments left in the code:
grep -l '/\*\s*\(in\|out\)[,:/]' */*[ch]
(1) no difference when ignoring blank lines, after stripping all
C90-style /* comments */, including multi-line ones, before and after
applying this patch:
perl -i -e 'undef $/;while(<ARGV>){s#/\*(.*?)\*/##gs;print}' */*[ch]
diff -I'^\s*$' --exclude .svn -ru TREE1 TREE2
(2) after stripping @return comments and !<, generated a diff and omitted
the hunks where /* out: */ function return comments were removed:
perl -i -e'undef $/;while(<ARGV>){s#!<##g;s#\n\@return\t.*?\*/# \*/#gs;print}'\
*/*[ch]
svn diff|
perl -e 'undef $/;$_=<>;s#\n-\s*/\* out[:,]([^\n]*?)(\n-[^\n]*?)*\*/##gs;print'
Some unintended changes were left. These will be removed in a
subsequent patch.
access
Mapping the atomic operations to Windows Interlocked functions:
os_compare_and_swap_* to InterlockedCompareExchange(64)
os_atomic_increment_* to InterlockedExchangeAdd(64)
os_atomic_test_and_set_byte to InterlockedExchange
In this patch, the legacy code under UNIV_CAN_USE_X86_ASSEMBLER is
removed all together, and add HAVE_WINDOWS_ATOMICS and
INNODB_RW_LOCKS_USE_ATOMICS to CMakeLists.txt
This is to address mantis issue#194.
rb://113
Approved by: Marko
Enable atomics on solaris (using the libc functions as defined in
atomic.h) if GCC atomic builtins are not present.
There still remains some work to be done (by Vasil?). This patch
makes changes to plug.in to check pthread_t size and presence of
atomic functions when running on solaris. The same has to become
a part of the generated Makefile.in when we bake our source.
Reviewed by: Heikki rb://106
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.
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
in *.h files, so that the function signatures in the *.h and *.c files fully
match each other.
ut_dulint_sort(): Add a UNIV_INTERN qualifier also to the function definition.
file has been redundant since r2278.
include/innodb_redefine.h: Remove.
include/sync0sync.h: Remove the definition of mutex_free that was added
because of innodb_redefine.h.
include/univ.i: Remove references to innodb_redefine.h. Explain why
the C++ classes need to be renamed.
scripts/build-plugin.sh: Build InnoDB only once. The file
innodb_redefine.h is no longer needed.
defined in innodb_redefine.h must not be undefined. After this change,
innodb_redefine.h will define mutex0_free instead of mutex_free, and
everything is fine.
innodb_lock_waits. See
https://svn.innodb.com/innobase/InformationSchema/TransactionsAndLocks
for design notes.
Things that need to be resolved before this goes live:
* MySQL must add thd_get_thread_id() function to their code
http://bugs.mysql.com/30930
* Allocate memory from mem_heap instead of using mem_alloc()
* Copy table name and index name into the cache because they may be
freed later which will result in referencing freed memory
Approved by: Marko
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.