With MAX_INDEXIES=64(default), key_map=Bitmap<64> is just a wrapper around
ulonglong and thus "trivial" (can be bzero-ed, or memcpy-ed, and stays
valid still)
With MAX_INDEXES=128, key_map = Bitmap<128> is not a "trivial" type
anymore. The implementation uses MY_BITMAP, and MY_BITMAP contains pointers
which make Bitmap invalid, when it is memcpy-ed/bzero-ed.
The problem in 10.4 is that there are many new key_map members, inside TABLE
or KEY, and those are often memcopied and bzeroed
The fix makes Bitmap "trivial", by inlining most of MY_BITMAP functionality.
pointers/heap allocations are not used anymore.
Other things:
- Cleanup of allocated bitmaps done in open(), which
simplifies init_partition_bitmaps()
- Add needed defines in ha_spider.cc to enable new spider code
- Fixed some DBUG_PRINT() to be consistent with normal code
- Removed end space
- The changes in test cases partition_innodb, partition_range,
partition_pruning etc are becasue partitions can now more exactly
calculate the number of rows in a range.
Contains spider patches:
014,015,023,033,035,037,040,042,044,045,049,050,051,053,059
* don't issue an error for ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN
* support keyread on vcols
* callback into the server to compute vcol values from mi_check/mi_repair
* DMLs just work. Automatically.
The bitmap implementation defines two template Bitmap classes. One
optimized for 64-bit (default) wide bitmaps while the other is used for
all other widths.
In order to optimize the computations, Bitmap<64> class has defined its
own member functions for bitmap operations, the other one, however,
relies on mysys' bitmap implementation (mysys/my_bitmap.c).
Issue 1:
In case of non 64-bit Bitmap class, intersect() wrongly reset the
received bitmap while initialising a new local bitmap structure
(bitmap_init() clears the bitmap buffer) thus, the received bitmap was
getting cleared.
Fixed by initializing the local bitmap structure by using a temporary
buffer and later copying the received bitmap to the initialised bitmap
structure.
Issue 2:
The non 64-bit Bitmap class had the Iterator missing which caused
compilation failure.
Also added a cmake variable to hold the MAX_INDEXES value when supplied
from the command prompt. (eg. cmake .. -DMAX_INDEXES=128U). Checks have
been put in place to trigger build failure if MAX_INDEXES value is
greater than 128.
Test modifications:
* Introduced include/have_max_indexes_[64|128].inc to facilitate
skipping of tests for which the output differs with different
MAX_INDEXES.
* Introduced include/max_indexes.inc which would get modified by cmake
to reflect the MAX_INDEXES value used to build the server. This file
simply sets an mtr variable '$max_indexes' to show the MAX_INDEXES
value, which will then be consumed by the above introduced include file.
* Some tests (portions), dependent on MAX_INDEXES value, have been moved
to separate test files.
- Added MALLOC_LIBRARY variable to hold name of malloc library
- Back ported valgrind related fixes from jemalloc 3.4.1 to the included jemalloc 3.3.1
- Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
- Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
- Show version related variables in mysqld --help
-- Added SHOW_VALUE_IN_HELP marker
Increased back_log to 150 as the original value was a bit too small
CMakeLists.txt:
Added MALLOC_LIBRARY variable to hold name of malloc library
cmake/jemalloc.cmake:
Added MALLOC_LIBRARY variable to hold name of malloc library
config.h.cmake:
Added MALLOC_LIBRARY variable to hold name of malloc library
extra/jemalloc/ChangeLog:
Updates changelog
extra/jemalloc/include/jemalloc/internal/arena.h:
Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in:
Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/private_namespace.h:
Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/tcache.h:
Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/src/arena.c:
Backported valgrind fixes from jemalloc 3.4.1
include/my_bitmap.h:
Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
mysql-test/mysql-test-run.pl:
Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
mysql-test/valgrind.supp:
Supression of memory leak in OpenSuse 12.3
mysys/my_bitmap.c:
Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free()
sql/ha_ndbcluster_binlog.cc:
Renames
sql/ha_ndbcluster_cond.h:
Renames
sql/ha_partition.cc:
Renames
sql/handler.cc:
Renames
sql/item_subselect.cc:
Renames
sql/log_event.cc:
Renames
sql/log_event_old.cc:
Renames
sql/mysqld.cc:
Renames
Show version related variables in mysqld --help
sql/opt_range.cc:
Renames
sql/opt_table_elimination.cc:
Renames
sql/partition_info.cc:
Renames
sql/rpl_injector.h:
Renames
sql/set_var.h:
Renames
sql/slave.cc:
Renames
sql/sql_bitmap.h:
Renames
sql/sql_insert.cc:
Renames
sql/sql_lex.h:
Renames
sql/sql_parse.cc:
Renames
sql/sql_partition.cc:
Renames
sql/sql_select.cc:
Renames
sql/sql_show.cc:
Renames
sql/sql_update.cc:
Renames
sql/sys_vars.cc:
Show version related variables in mysqld --help
sql/sys_vars.h:
Added SHOW_VALUE_IN_HELP marker for variables that should be shown in --help
sql/table.cc:
Renames
sql/table.h:
Removed not used bitmap_init_value
storage/connect/ha_connect.cc:
Removed compiler warning
storage/maria/ma_open.c:
Renames
unittest/mysys/bitmap-t.c:
Renames
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
Apart from the fix, the patch also adds few more unrelated test
cases for partial matching, and fixes few typos.
Analysis:
This bug uncovered that partial matching via rowid intersection
didn't handle the case when:
- the left IN argument has some NULLs,
- there are no non-null value matches, and there is no non-null
column,
- the subquery columns that are not covered with the NULLs in
the left IN argument contain at least one row, such that it
has NULL values in all columns where the left IN operand has
no NULLs.
In this case there is a partial match.
In addition the analysis of the related code uncovered incorrect
handling of few other related cases.
Solution:
The solution for the bug is to check if there exists a row with
NULLs in all columns other than the ones having NULL in the
let IN operand.
The check is implemented via checking whether the bitmaps that
store NULL information in class Ordered_key have a non-empty
intersection for the relevant columns.
The intersection itself is implemented via the function
bitmap_exists_intersection() in my_bitmap.c.
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
- Reduced memory usage from safe_mutex.
- Fixed problem with failing tests that could not restart mysqld becasue the port was reserved
- More DBUG information
- Fixed bug where bitmap_set_prefix() wrote over buffer area.
- Initialize n_pages_flushed in xtradb which was used uninitialized.
client/mysqltest.cc:
Reduced memory usage (400K -> 80 for simple test; 400M -> 70M for some other tests)
- Smaller dynamic arrays at start
- Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root.
- Fixed that when one does --debug we get information from safemalloc in the trace
(Most of changes are changing &connect->mysql to connect->mysql
libmysql/libmysql.c:
Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init()
This is needed to get information from my_end() into the DBUG log
mysql-test/README:
Fixed wrong comment
mysql-test/mysql-test-run.pl:
Reserv 20 ports / mysql-test-run thread.
(Needed as some tests uses 9 mysqld servers)
mysys/hash.c:
More DBUG information
mysys/my_bitmap.c:
Fixed bug where bitmap_set_prefix() wrote over buffer area.
mysys/safemalloc.c:
More DBUG information
mysys/thr_mutex.c:
Initialize smaller arrays be default.
sql-common/client.c:
More DBUG_PRINT
storage/xtradb/srv/srv0srv.c:
Initialize n_pages_flushed which was used uninitialized.
Assertion `bitmap_is_set_all(&table->s->all_set)' failed in
handler::ha_reset
This assertion could be triggered if two connections simultaneously
executed two bitmap test functions on the same bitmap. For example,
the assertion could be triggered if one connection executed UPDATE
while a second connection executed SELECT on the same table.
Even if bitmap test functions have read-only semantics and have
const bitmaps as parameter, several of them modified the internal
state of the bitmap. With interleaved execution of two such functions
it was possible for one function to modify the state of the same
bitmap that the other function had just modified. This lead to an
inconsistent state and could trigger the assert.
Internally the bitmap uses 32 bit words for storage. Since bitmaps
can contain any number of bits, the last word in the bitmap may
not be fully used. A 32 bit mask is maintained where a bit is set
if the corresponding bit in the last bitmap word is unused.
The problem was that several test functions applied this mask to
the last word. Sometimes the mask was negated and used to zero out
the remainder of the last word and sometimes the mask was used as-is
to fill the remainder of the last word with 1's. This meant that if
a function first used the negated mask and another function then
used the mask as-is (or vice-versa), the first function would then
get the wrong result.
This patch fixes the problem by changing the implementation of
9 bitmap functions that modified the bitmap state even if the
bitmap was declared const. These functions now preserve the
internal state of the bitmap. This makes it possible for
two connections to concurrently execute two of these functions
on the same bitmap without issues.
The patch also removes dead testing code from my_bitmap.c.
These tests have already been moved to unittest/mysys/bitmap-t.c.
Existing test coverage of my_bitmap has been extended.
No MTR test case added as this would require adding several sync
points to the bitmap functions. The patch has been tested with
a non-deterministic test case posted on the bug report.
include/my_bit.h:
Removed my_count_bits_ushort() which is not needed anymore.
Added my_count_bits_uint32().
unittest/mysys/bitmap-t.c:
Extended test coverage of my_bitmap.
and 'THREAD_SAFE_CLIENT'.
As of MySQL 5.5, we no longer support non-threaded
builds. This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols. These were used to distinguish between
threaded and non-threaded builds.
The reason for this was that some bitmap test functions changed the bitmap, which caused problems when the same bitmap was used by multiple threads.
include/my_bitmap.h:
Changed order of elements to get better alignment.
mysys/my_bitmap.c:
Change bitmap test functions to not modify the bitmap.
Fixed compiler errors in test_bitmap
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
This was triggered by innodb.innodb_multi_update, where we had a static length row without nulls and xtradb didn't fill in the delete-marker byte
include/my_bitmap.h:
Added prototype for bitmap_union_is_set_all()
mysys/my_bitmap.c:
Added function to check if union of two bit maps covers all bits.
sql/mysql_priv.h:
Updated protype for compare_record()
sql/sql_insert.cc:
Send to compare_record() flag if all fields are used.
sql/sql_select.cc:
Set share->null_bytes_for_compare.
sql/sql_update.cc:
In compare_record() don't use the fast cmp_record() (which is basically memcmp) if we don't know that all fields exists.
Don't compare the null_bytes if there is no data there.
sql/table.cc:
Store in share->null_bytes_for_compare the number of bytes that has null or bit fields (but not delete marker)
Store in can_cmp_whole_record if we can use memcmp() (assuming all rows are read) to compare rows in compare_record()
sql/table.h:
Added two elements in table->share to speed up checking how updated rows can be compared.
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.
One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.
There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.
BUILD/SETUP.sh:
Remove flags that are implied by -Wall and -Wextra.
Do not warn about unused parameters in C++.
BUILD/check-cpu:
Print only the compiler version instead of verbose banner.
Although the option is gcc specific, the check was only
being used for GCC specific checks anyway.
client/mysql.cc:
bcmp is no longer defined.
client/mysqltest.cc:
Pass a string to function expecting a format string.
Replace use of bcmp with memcmp.
cmd-line-utils/readline/Makefile.am:
Always define _GNU_SOURCE when compiling GNU readline.
Required to make certain prototypes visible.
cmd-line-utils/readline/input.c:
Condition for the code to be meaningful.
configure.in:
Remove check for bcmp.
extra/comp_err.c:
Use appropriate type.
extra/replace.c:
Replace use of bcmp with memcmp.
extra/yassl/src/crypto_wrapper.cpp:
Do not ignore the return value of fgets. Retrieve the file
position if fgets succeed -- if it fails, the function will
bail out and return a error.
extra/yassl/taocrypt/include/blowfish.hpp:
Use a single array instead of accessing positions of the sbox_
through a subscript to pbox_.
extra/yassl/taocrypt/include/runtime.hpp:
One definition of such functions is enough.
extra/yassl/taocrypt/src/aes.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/algebra.cpp:
Rename arguments to avoid shadowing related warnings.
extra/yassl/taocrypt/src/blowfish.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/integer.cpp:
Do not define type within a anonymous union.
Use a variable to return a value instead of
leaving the result in a register -- compiler
does not know the logic inside the asm.
extra/yassl/taocrypt/src/misc.cpp:
Define handler for pure virtual functions.
Remove unused code.
extra/yassl/taocrypt/src/twofish.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/testsuite/test.hpp:
Function must have C language linkage.
include/m_string.h:
Remove check which relied on bcmp being defined -- they weren't
being used as bcmp is only visible when _BSD_SOURCE is defined.
include/my_bitmap.h:
Remove bogus helpers which were used only in a few files and
were causing warnings about dead code.
include/my_global.h:
Due to G++ bug, always silence false-positive uninitialized
variables warnings when compiling C++ code with G++.
Remove bogus helper.
libmysql/Makefile.shared:
Remove built-in implementation of bcmp.
mysql-test/lib/My/SafeProcess/safe_process.cc:
Cast pid to largest possible type for a process identifier.
mysys/mf_loadpath.c:
Leave space of the ending nul.
mysys/mf_pack.c:
Replace bcmp with memcmp.
mysys/my_bitmap.c:
Dead code removal.
mysys/my_gethwaddr.c:
Remove unused variable.
mysys/my_getopt.c:
Silence bogus uninitialized variable warning.
Do not cast away the constant qualifier.
mysys/safemalloc.c:
Cast to expected type.
mysys/thr_lock.c:
Silence bogus uninitialized variable warning.
sql/field.cc:
Replace bogus helper with a more appropriate logic which is
used throughout the code.
sql/item.cc:
Remove bogus logical condition which always evaluates to TRUE.
sql/item_create.cc:
Simplify code to avoid signedness related warnings.
sql/log_event.cc:
Replace use of bcmp with memcmp.
No need to use helpers for simple bit operations.
sql/log_event_old.cc:
Replace bmove_align with memcpy.
sql/mysqld.cc:
Move use declaration of variable to the ifdef block where it
is used. Remove now-unnecessary casts and arguments.
sql/set_var.cc:
Replace bogus helpers with simple and classic bit operations.
sql/slave.cc:
Cast to expected type and silence bogus warning.
sql/sql_class.h:
Don't use enum values as bit flags, the supposed type safety is
bogus as the combined bit flags are not a value in the enumeration.
sql/udf_example.c:
Only declare variable when necessary.
sql/unireg.h:
Replace use of bmove_align with memcpy.
storage/innobase/os/os0file.c:
Silence bogus warning.
storage/myisam/mi_open.c:
Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
char.
storage/myisam/mi_page.c:
Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
char.
strings/bcmp.c:
Remove built-in bcmp.
strings/ctype-ucs2.c:
Silence bogus warning.
tests/mysql_client_test.c:
Use a appropriate type as expected by simple_command().
Fixed bug in ma_test2 when last row in table is deleted
Fixed that ma_test_recovery.pl works on Solaris (by using digest instead of md5sum)
Fixed some compiler warnings generated by the Forte compiler
dbug/dbug.c:
Added cast to get rid of compiler warning
mysys/lf_alloc-pin.c:
Added cast to get rid of compiler warning
mysys/my_bitmap.c:
Removed impossible DBUG_ASSERT()'s to get rid of compiler warnings
mysys/my_compress.c:
Removed wrong cast to get rid of compiler warning
storage/maria/lockman.c:
Added cast to get rid of compiler warning
storage/maria/ma_open.c:
Added fix from MyISAM to allocate space in key buffer for nod pointer
storage/maria/ma_recovery.c:
Fixed initialization that caused compiler warning
storage/maria/ma_rsame.c:
More DBUG_PRINT
storage/maria/ma_scan.c:
Better comment
storage/maria/ma_statrec.c:
More DBUG_PRINT and comments
Fixed indentation
BitKeeper/etc/ignore:
added storage/maria/unittest/tmp/*
storage/maria/ma_test2.c:
Fixed bug that caused maria_rsame() to fail if test removed last row
Fixed wrong usage of longget(); Should be uint4korr()
storage/maria/unittest/ma_test_recovery.pl:
Use md5sum or digest to calculate md5.
This allows this script to be run on Linux and Solaris
storage/myisam/mi_test2.c:
Fixed wrong usage of longget(); Should be uint4korr()
strings/ctype.c:
Added casts to get rid of compiler warnings
sql-bench/myisam.cnf:
New BitKeeper file ``sql-bench/myisam.cnf''
- Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options
- Added syncing of directory when creating .frm files
- Portability fixes
- Added missing cast that could cause bugs
- Code cleanups
- Made some bit functions inline
- Moved things out of myisam.h to my_handler.h to make them more accessable
- Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM)
- Fixed bugs in error conditions
- Use compiler time asserts instead of run time
- Fixed indentation
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong
(Added a define for old value to ensure we don't break any old code)
Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong)
- Initialize error messages early to get better errors when mysqld or an engine fails to start
- Fix windows bug that query_performance_frequency was not initialized if registry code failed
- thread_stack -> my_thread_stack_size
BitKeeper/etc/ignore:
added libmysqld/scheduler.cc libmysqld/sql_connect.cc libmysqld/sql_tablespace.cc
include/Makefile.am:
Added my_bit.h
include/m_string.h:
Added bzero_if_purify() to simplify code
include/my_base.h:
Reserve options for the future
Added HA_OPTION_NULL_FIELDS, HA_OPTION_PAGE_CHECKSUM, HA_CREATE_PAGE_CHECKSUM
Added new error message HA_ERR_NEW_FILE
Added optional new row type BLOCK_RECORD
Renamed HA_EXTRA_PREPARE_FOR_DELETE to HA_EXTRA_PREPARE_FOR_DROP
Added HA_EXTRA_PREARE_FOR_RENAME to inform handler we will do a rename
(Added define to make things compatible until 6.0)
Moved invalidator_by_filename form myisam.h
include/my_dbug.h:
Poirtablity fix
include/my_global.h:
Added helper macros STATIC_INLINE and MY_ERRPTR
Added NEED_EXPLICIT_SYNC_DIR
include/my_handler.h:
Added missing casts
Moved some constants and macros out from myisam.h to make these generally available
Renamed mi_compare_text() to ha_compare_text() as this function is not myisam specific
Renamed mi_portable_sizeof_char_ptr to portable_sizeof_char_ptr
Added registering of handler messages for better error reporting during startup
include/my_sys.h:
Added my_sync_dir() and my_sync_dir_by_file()
More comments
Some indentation fixes
Moved bit functions to my_bit.h
Added prototype for crc32()
include/myisam.h:
Moved things from here to my_handler.h to make them more accessable
libmysql/Makefile.shared:
Added my_sync
mysys/array.c:
Fixed indentation and spelling errors
Split set_dynamic() to two functions
Added allocate_dynamic() as a new visiable function
(no new code, only refactoring)
mysys/mf_iocache.c:
More DBUG
mysys/mf_keycache.c:
More explicite ASSERT
Removed some casts
Fixed indentation
mysys/mf_tempfile.c:
Fixed bug with possible dangling file descriptor
mysys/my_atomic.c:
Use compile time asserts instead of run time
mysys/my_bit.c:
Make most bit functions inline
mysys/my_bitmap.c:
Added my_bit.h
mysys/my_compress.c:
Fixed indentation
mysys/my_create.c:
Added my_sync_by_dir()
mysys/my_delete.c:
Added my_sync_by_dir()
mysys/my_error.c:
init_glob_errs() is now done in my_init()
mysys/my_handler.c:
mi_compare_text() -> ha_compare_text() as this is not MyISAM specific
Added functions to initialize handler error messages
Fixed indentation
More clear usage of include files
mysys/my_init.c:
Added my_thread_stack_size to be used by other programs
Ensure that global error messages are always initialized
Fix windows bug that query_performance_frequency was not initialized if registry code failed
mysys/my_open.c:
More comments
Removed duplicate code
mysys/my_pread.c:
Ensure that my_errno is set even if errno is 0
mysys/my_realloc.c:
Added comment
mysys/my_rename.c:
Added syncing of directories
mysys/my_symlink.c:
Added my_sync_by_dir()
mysys/my_sync.c:
Added my_sync_dir()
On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync()
(see "man fsync" on Mac OS X 10.3).
my_sync_dir(): to sync a directory after a file creation/deletion/
renaming; can be called directly or via MY_SYNC_DIR in my_create/
my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux).
my_sync_dir_from_file(): same as above, just more practical when the
caller has a file name but no directory name ready.
Should the #warning even be a #error? I mean do we want to release
binaries which don't guarantee any durability?
mysys/safemalloc.c:
Added sf_malloc_report_allocated() (Debugging aid)
sql/gen_lex_hash.cc:
Remove inline for big function
sql/ha_partition.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
sql/ha_partition.h:
prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
sql/handler.cc:
ha_init_errors() is now called at startup before plugins
This allows us to get better error messages
sql/handler.h:
Reserve enum value for Maria
Add future proof enum for page checksums
sql/item_func.cc:
Include my_bit.h
sql/lex.h:
Added future proof CREATE table options
sql/log.cc:
Added comment
sql/mysql_priv.h:
thread_stack moved to mysys
sql/mysqld.cc:
thread_stack moved to mysys
thread_stack -> my_thread_stack_size
Initialize myisam key caches before plugins starts
Initialize error to allow storage engine to give better error messages if init failes.
Fixed indentation
Group all MyISAM options together
Added new status variable 'Opened_table_definitions' to allow one to monitor if table definition cache is too small
Clarified some option help messages
sql/opt_range.cc:
Removed wrong usage of SAFE_MODE (this disabled key usage for UPDATES, which was never the intention)
Removed print if total cost in a place where it didn't have any usable value
sql/set_var.cc:
thread_stack -> my_thread_stack
sql/sql_class.cc:
Intialize transaction object properly
sql/sql_parse.cc:
thread_stack -> my_thread_stack
sql/sql_select.cc:
Include my_bit.h
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
sql/sql_show.cc:
Simplify handling of ha_choice variables
Added future safe PAGE_CHECKSUM option
Addid missing 'transactional=#' in information schema
sql/sql_table.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_FORCE_REOPEN when doing reopen
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_RENAME when doing rename
Removed not needed initialization
sql/sql_test.cc:
thread_stack -> my_thread_stack
sql/sql_yacc.yy:
Simplify handling of ha_choice variables
Added future proof create table options TABLE_CHECKSUM=# & PAGE_CHECKSUM=#
sql/table.cc:
Save page_checksum in .frm
sql/table.h:
Added variable to hold create table option PAGE_CHECKSUM
sql/unireg.cc:
Added syncing of directories
storage/myisam/ft_boolean_search.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_eval.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_nlq_search.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_parser.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_stopwords.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_test1.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/ft_update.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ha_myisam.cc:
Include my_bit.h
storage/myisam/mi_check.c:
MI_MAX_POSSIBLE_KEY_BUFF -> HA_MAX_POSSIBLE_KEY_BUFF
mi_compare_text() -> ha_compare_text()
Added BLOCK_RECORD to avoid compiler warnings
storage/myisam/mi_checksum.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_create.c:
MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_dynrec.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_extra.c:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
storage/myisam/mi_open.c:
MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_packrec.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_range.c:
mi_compare_text -> ha_compare_text
storage/myisam/mi_test1.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_test2.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_unique.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/mi_write.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/myisamchk.c:
Include my_bit.h
storage/myisam/myisamdef.h:
Moved store_key_length_inc to handler.h
storage/myisam/myisampack.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/sp_test.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisammrg/ha_myisammrg.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
include/my_bit.h:
New BitKeeper file ``include/my_bit.h''