fixes for ma_test_recovery.pl to work in release builds too:
- bugfix in maria_zerofill_index()
- applying of LOGREC_INSERT_ROW_BLOBS now zeroes unused end of non-full
blob page (a mutation of tail page when it takes >75% of maria_block_size)
like write_full_pages() does.
storage/maria/ma_blockrec.c:
When we write a non-full blob page at run-time, we zero the rest of
it (see write_full_pages()). We now do the same in
_ma_apply_redo_insert_row_blobs(): this is consistent and helps
having log-applying produce the same page as run-time.
storage/maria/ma_check.c:
maria_zerofill_index() was wrong: it didn't zero certain bytes
because it believed that the count of relevant bytes is
_ma_get_page_used(share, buff) + share->keypage_header,
whereas it's only the first term.
storage/maria/ma_pagecache.c:
typo
storage/maria/ma_pagecache.h:
typo
storage/maria/maria_chk.c:
enable --zerofill-keep-lsn in all builds
storage/maria/unittest/ma_test_recovery.pl:
now even release builds can run ma_test_recovery.pl, because zerofill
makes tables of this test (made by run-time and by log-applying)
identical.
storage/maria/unittest/ma_test_recovery.pl:
Tell how many tables were zerofilled (just for information, a varying
number does not make the test fail).
Don't let --zerofill-keep-lsn influence next runs (which it shouldn't
do in theory anyway, but testing should not believe theory): restore
non-zerofilled tables right after comparison is finished.
in release builds, use it to fine-tune physical file comparisons in
ma_test_recovery.pl.
storage/maria/CMakeLists.txt:
build maria_dump_log under Windows too
storage/maria/maria_chk.c:
make --zerofill-keep-lsn usable in release builds too, it makes sense.
This option needn't reset state's LSNs, and it's more useful if it
does not (see added comment) as it changes less the table.
storage/maria/unittest/ma_test_recovery.pl:
- getting rid of 'cmp'
- if physical comparison of two MAD or MAI files fails, it might
be in irrelevant portions (unushed index or data page pieces):
we use --zerofill-keep-lsn and retry the comparison. This fixes
a part of test failures under Windows.
into 88-214-96-46.dialup.umc.net.ua:/Users/bell/mysql/bk/work-maria-test
storage/maria/ma_pagecache.c:
Auto merged
storage/maria/unittest/Makefile.am:
merge
storage/maria/unittest/ma_pagecache_consist.c:
merge
scheme for the same thread locking).
include/my_pthread.h:
Added variable for lock diffirentiation.
include/wqueue.h:
New release call.
mysys/wqueue.c:
New release call in case of read/write lock.
storage/maria/ma_pagecache.c:
Locking for read and write made waitimg for each other.
storage/maria/unittest/Makefile.am:
New test added.
storage/maria/unittest/ma_pagecache_consist.c:
Fixed thread initialization in the test.
storage/maria/unittest/ma_pagecache_rwconsist.c:
New BitKeeper file ``storage/maria/unittest/ma_pagecache_rwconsist.c''
into mysql.com:/home/my/mysql-maria
dbug/dbug.c:
Auto merged
mysys/lf_alloc-pin.c:
Auto merged
storage/maria/lockman.c:
Auto merged
storage/maria/ma_open.c:
Auto merged
storage/maria/ma_recovery.c:
Auto merged
storage/maria/unittest/ma_test_recovery.pl:
Manual merge
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''
make ma_test_recovery.pl return 0 if it skips itself.
storage/maria/unittest/ma_test_recovery.pl:
non-debug build should not cause ma_test_all-t to always fail
storage/maria/ma_test_recovery:
Made the shell version empty to avoid modifying
files in two places. Linked to the current one.
storage/maria/unittest/ma_test_recovery.pl:
New version of ma_test_recovery.pl
Added --help and --version, made a function
of the main part, removed all calls to unix
mv and cp
Solaris 10 Sparc 64bit.
include/my_atomic.h:
Prototypes in the non-inline (extern) case were wrong: they were
missing "U_a" i.e. "volatile *". Caused a segfault in my_atomic-t
on Solaris10 Sparc 64.
storage/maria/ma_loghandler.c:
Move "buffer" array up in the struct, to get it aligned on long-boundary
so that page cache can use bmove512() (it was not aligned and bmove512()
was used, causing SIGBUS on Solaris10 Sparc 64).
storage/maria/unittest/ma_pagecache_consist.c:
doing *(uint*)(charbuff)=something is not ok on sparc machines, we must
use int4store/uint4korr. Fixes a SIGBUS on Solaris10 Sparc 64.
dbug/dbug.c:
importing change from 6.0, which speeds up --debug on Windows (no sync)
storage/maria/unittest/ma_test_loghandler-t.c:
this test needs ~80 open files (logs)
Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value
Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
client/get_password.c:
Fixed compiler warning
cmd-line-utils/readline/bind.c:
Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
Fixed compiler warning by adding marco to be used when largest_char is 255
cmd-line-utils/readline/display.c:
Fixed compiler warnings by removing not accessed variables
cmd-line-utils/readline/histexpand.c:
Fixed compiler warnings by removing not accessed variables
cmd-line-utils/readline/history.c:
Fixed compiler warnings by adding cast
cmd-line-utils/readline/text.c:
Fixed compiler warnings by removing not accessed variables and adding casts
dbug/dbug.c:
Fixed compiler warnings by changing types
include/mysql_com.h:
Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value
libmysql/libmysql.c:
Fixed compiler warning
mysql-test/t/query_cache_debug.test:
Mark test as BIG as it uses a lot of memory
mysys/mf_iocache2.c:
Fixed compiler warnings by adding cast
sql/event_data_objects.cc:
Fixed compiler warnings by removing not used code
sql/events.cc:
Fixed compiler warnings by removing not used code
sql/field.cc:
Fixed compiler warnings by adding cast and removed not accessed variables
sql/ha_partition.cc:
Fixed compiler warnings by removing not used code
sql/item.cc:
Fixed compiler warnings by removing not accessed variables
Use IMPOSSIBLE_RESULT instead of (Item_result)-1
sql/item_cmpfunc.cc:
Fixed compiler warnings by removing not accessed variables
sql/item_func.cc:
Fixed compiler warnings by removing not used code and not accessed variables
Added IMPOSSIBLE_RESULT
sql/item_subselect.cc:
Fixed compiler warnings by removing not accessed variables
sql/item_xmlfunc.cc:
Fixed forgotten setting of xpath->error
sql/log.cc:
Fixed compiler warnings by removing not accessed variables
sql/log_event.cc:
Added IMPOSSIBLE_RESULT into switch
Fixed wrong usage of DBUG_ASSERT(1)
Removed always true DBUG_ASSERT()
sql/mysqld.cc:
Fixed compiler warnings by adding casts for ULONG_MAX
sql/opt_sum.cc:
Fixed compiler warnings by removing not used code
Removed wrong DBUG_ASSERT()
sql/partition_info.cc:
Fixed compiler warnings by removing not accessed variables
sql/rpl_injector.h:
Removed always true part from DBUG_ASSERT() to remove compiler warning
sql/spatial.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_acl.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_base.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_cache.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_class.cc:
Fixed compiler warnings by:
- Removing always true part from DBUG_ASSERT()
- Removing not used code
- Added IMPOSSIBLE_RESULT into switch
sql/sql_load.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_parse.cc:
Fixed compiler warnings by:
- Removing not accessed variables
- Removing always true part from DBUG_ASSERT()
- Removing not used code
sql/sql_plugin.cc:
Added comment
sql/sql_prepare.cc:
Fixed compiler warnings by removing not accessed variables
sql/sql_show.cc:
Fixed compiler warnings by using correct cast
sql/sql_table.cc:
Fixed compiler warnings by removing not used code and removing not accessed variables
sql/table.cc:
Fixed compiler warnings by removing not accessed variables
sql/time.cc:
Fixed wrong DBUG_ASSERT(1)
storage/maria/unittest/Makefile.am:
Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
storage/maria/unittest/ma_pagecache_consist.c:
Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
storage/maria/unittest/ma_pagecache_single.c:
Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
tests/mysql_client_test.c:
Fixed compiler warnings by removing not accessed variables and changing types
ma_test_loghandler_pagecache-t on Windows.
storage/maria/ma_control_file.c:
stat() is unreliable on Windows (does not reflect process' own writes)
storage/maria/ma_loghandler.c:
translog_set_lsn_for_files() didn't close its file descriptor; it was
a real problem as non-closed files could not be purged.
Same for translog_truncate_log() in case of error.
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
stat() is unreliable on Windows (does not reflect process' own writes)
and then maria-connect under Windows 32-bit Visual Studio 2003.
Build of all Maria unit tests under Windows.
storage/maria/ma_loghandler.c:
Assertion contributed by Sanja. Working around my_stat() bug on Windows
(st_size is long i.e. 32-bit signed, the file was slightly bigger than
2GB, so st_size was negative, TRANSLOG_PAGE_SIZE was int, so the
comparison was done using long, so st_size was still negative in
the comparison, which was incorrect). Two fixes: cast st_size to uint32
(belt) and make TRANSLOG_PAGE_SIZE unsigned (suspenders).
Of course 'long' is not enough for files >=4GB, but all log files of
Maria are <4GB. The general problem of my_stat() has been passed on to
our Windows team.
storage/maria/ma_loghandler.h:
use unsigned ints for constants which represent sizes of pages, files...
storage/maria/unittest/CMakeLists.txt:
a few unit tests were not built under Windows
into oleksandr-byelkins-powerbook-g4-15.local:/Users/bell/mysql/bk/work-maria-wrn
storage/maria/ma_blockrec.c:
Auto merged
storage/maria/ma_check.c:
Auto merged
storage/maria/ma_control_file.c:
Auto merged
storage/maria/ma_key_recover.c:
Auto merged
storage/maria/ma_page.c:
Auto merged
storage/maria/ma_pagecache.c:
Auto merged
storage/maria/ma_recovery.c:
Auto merged
include/maria.h:
mac compiler warnings fixed.
storage/maria/ma_bitmap.c:
mac compiler warnings fixed.
storage/maria/ma_blockrec.c:
mac compiler warnings fixed.
storage/maria/ma_check.c:
mac compiler warnings fixed.
storage/maria/ma_control_file.c:
mac compiler warnings fixed.
storage/maria/ma_create.c:
mac compiler warnings fixed.
storage/maria/ma_delete.c:
mac compiler warnings fixed.
storage/maria/ma_ft_boolean_search.c:
mac compiler warnings fixed.
storage/maria/ma_page.c:
mac compiler warnings fixed.
storage/maria/ma_pagecache.c:
mac compiler warnings fixed.
storage/maria/ma_recovery.c:
mac compiler warning fixed.
storage/maria/ma_rt_test.c:
mac compiler warnings fixed.
storage/maria/ma_search.c:
mac compiler warning fixed.
storage/maria/ma_write.c:
mac compiler warnings fixed.
storage/maria/unittest/ma_control_file-t.c:
mac compiler warnings fixed.
storage/maria/unittest/ma_pagecache_consist.c:
mac compiler warnings fixed.
storage/maria/unittest/ma_pagecache_single.c:
mac compiler warnings fixed.
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
mac compiler warning fixed.
storage/maria/unittest/test_file.c:
mac compiler warning fixed.
mysql-test/include/wait_until_connected_again.inc:
On Windows, mysqladmin does not wait on pid file when it has shut down
mysqld. Thus, in maria_empty_logs.inc, wait_until_connected_again.inc
can run while mysqld is shutting down (has not finished) and so
get "shutdown in progress" instead of "can't connect".
mysql-test/t/maria-recovery-big.test:
it is a big test
storage/maria/unittest/ma_test_recovery.pl:
We want to see the result of 'cmp', like in the shell version
- one which led REDO_INSERT_ROW_BLOBS to fail to apply
- one excess close ("-1 file left open")
Don't need maria-path option / environment variable.
Fixes for ma_test_all-t to run under Windows.
Port of ma_test_recovery to Perl, written by Jani.
storage/maria/unittest/ma_test_recovery.expected:
Rename: storage/maria/ma_test_recovery.expected -> storage/maria/unittest/ma_test_recovery.expected
mysys/my_pread.c:
Fix for Windows-specific bug (maria_read_log -a failed during
ma_test_all-t): Windows does not have pread() so the branch setting
HA_ERR_FILE_TOO_SHORT was not compiled in, broke applying of
REDO_INSERT_ROW_BLOBS. After fixing that, it appeared that in my
Windows machine, errno is not changed in case of EOF; as we read it
we have to reset it at start.
The changed to readbytes!=-1 is to detect EOF
mysys/my_read.c:
The change to readbytes!=-1 is to detect EOF
storage/maria/ma_loghandler.c:
Fix for Windows-specific bug: as we don't open the directory
we should not close it.
storage/maria/ma_page.c:
This is C, cannot declare variable after instruction.
storage/maria/ma_test_recovery:
ma_test_recovery.expected moved
storage/maria/unittest/ma_test_all-t:
Can now safely guess maria_path so don't need the command-line option
or environment variable. Port to Windows (.exe, different locations
of executables); can guess suffix, don't need --suffix.
storage/maria/unittest/ma_test_recovery.pl:
Perl version of ma_test_recovery, written by Jani. Will deprecate the
shell version.
storage/maria/unittest/Makefile.am:
fixed names of tests.
storage/maria/unittest/ma_pagecache_consist.c:
Some of pagecache multi-thread tests are not big.
Fixed reporting of tests end (now under mutex protection).
storage/maria/unittest/ma_test_loghandler-t.c:
fixed layout to make blocks nof parameters more visible.
Added support for delete by link.
Aded level ("hits") management functions.
storage/maria/ma_pagecache.h:
Added support for delete by link.
Aded level ("hits") management functions.
storage/maria/unittest/ma_pagecache_single.c:
Test of delete by link.
Makefile.am:
make test-unit-big
storage/maria/unittest/Makefile.am:
support big unit tests
storage/maria/unittest/ma_pagecache_consist.c:
support big unit tests and other changes
storage/maria/unittest/ma_pagecache_single.c:
support big unit tests
storage/maria/unittest/ma_test_all-t:
support big unit tests and sub skip()
storage/maria/unittest/ma_test_loghandler-t.c:
support big unit tests
unittest/unit.pl:
don't ignore existing $MYTAP_CONFIG
Fixed bug when using maria_chk --safe-recover and getting duplicated keys
Fixed bug when using maria_pack --join
storage/maria/ma_check.c:
Fixed bug when using --safe-recover with packed tables
Fixed bug when using --safe-recover and getting duplicated keys
storage/maria/maria_pack.c:
Fixed bug when using --join
storage/maria/unittest/ma_test_all-t:
Added test to check maria_pack --join
- Fix that query cache works with Maria
- Fixed wrong calculation if min_key_length which casued some tables to assert in insert if key contained NULL
- Restore auto_increment value if insert statement fails
- Fixed rare bug that caused crash in maria_pack if buffer was flushed at wrong point in time
configure.in:
Added maria extension to distribution
mysql-test/r/maria.result:
More test cases to cover bugs found by Guilhem
mysql-test/t/maria.test:
More test cases to cover bugs found by Guilhem
storage/maria/ha_maria.cc:
Fix that query cache works with Maria
storage/maria/ma_blockrec.c:
Removed duplicate functionallity (already done in ma_pagecrc.c)
storage/maria/ma_create.c:
Fixed wrong calculation if min_key_length which casued some tables to assert in insert if key contained NULL
storage/maria/ma_key_recover.c:
Restore auto_increment value if insert statement fails
storage/maria/maria_def.h:
Added variables to track auto_increment changes to be able to restore it in case of duplicate key
storage/maria/maria_pack.c:
Fixed rare bug that caused crash if buffer was flushed at wrong point in time
storage/maria/unittest/ma_test_all-t:
Added option --abort-on-error
Ordered help message
-new option WITH_MARIA_STORAGE_ENGINE for config.js
-correct build errors
-build test executables
-downport changes for atomic functions from 5.2
-remove LOCK_uuid_generator from C++ files to avoid linker errors
-new function my_uuid2str()
BitKeeper/deleted/.del-x86-msvc.h:
Delete: include/atomic/x86-msvc.h
CMakeLists.txt:
Windows fixes:
-New option WITH_MARIA_STORAGE_ENGINE
-Add unit tests
include/Makefile.am:
replace x86-msvc.h with generic-msvc.h
include/config-win.h:
my_chmod() support
include/my_atomic.h:
Downport my_atomic from 5.2 tree
include/my_bit.h:
Correct unresolved symbol errors on Windows
include/my_pthread.h:
pthread_mutex_unlock now returns 0 (was void previously)
defined PTHREAD_STACK_MIN
include/my_sys.h:
New function my_uuid2str()
define MY_UUID_STRING_LENGTH
include/atomic/nolock.h:
Downport my_atomic from 5.2 tree
libmysqld/CMakeLists.txt:
New option WITH_MARIA_STORAGE_ENGINE
mysys/CMakeLists.txt:
Add missing files
mysys/lf_dynarray.c:
Fix compiler errors on Windows
mysys/my_getncpus.c:
Windows port
mysys/my_uuid.c:
Windows fixes: there is no random() on Windows, use ANSI rand()
New function my_uuid2str()
mysys/my_winthread.c:
Downport from 5.2 tree
-Call my_thread_end() before pthread_exit()
-Avoid crash if pthread_create is called with NULL attributes
sql/CMakeLists.txt:
Link mysqld with Maria storage engine
sql/item_func.cc:
Remove LOCK_uuid_generator from C++ to avoid linker errors.
Use dedicated mutex for short uuids
sql/item_strfunc.cc:
Use my_uuid() and my_uuid2str() functions from mysys.
sql/item_strfunc.h:
Define MY_UUID_STRING_LENGTH in my_sys.h
sql/mysql_priv.h:
LOCK_uuid_generator must be declared as extern "C"
sql/mysqld.cc:
Init and destroy LOCK_uuid_short mutex
storage/maria/CMakeLists.txt:
-Use the same source files as in Makefile.am
-Build test binaries
storage/maria/ha_maria.cc:
snprintf->my_snprintf
storage/maria/lockman.c:
Fix compiler error on Windows
storage/maria/ma_check.c:
Fix compiler error on Windows
storage/maria/ma_loghandler.c:
Fix compile errors
my_open()/my_sync() do not work for directories on Windows
storage/maria/ma_recovery.c:
Fix compile error on Windows
storage/maria/ma_test2.c:
Rename variable to avoid naming conflict with Microsoft C runtime
function
storage/maria/ma_test3.c:
Fix build errors on Windows
storage/maria/tablockman.c:
Fix build errors on Windows
storage/maria/unittest/Makefile.am:
Add CMakeLists.txt
storage/maria/unittest/ma_pagecache_consist.c:
Fix build errors on Windows
remove loop from get_len()
storage/maria/unittest/ma_pagecache_single.c:
Fix build errors on Windows
storage/maria/unittest/ma_test_loghandler-t.c:
Windows fixes
-Avoid division by 0 in expressions like
x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
Windows fixes
-Avoid division by 0 in expressions like
x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
-remove loop in get_len()
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
Windows fixes
-Avoid division by 0 in expressions like
x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
-remove loop in get_len()
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
Fix build errors on Windows
storage/maria/unittest/test_file.c:
Correct the code to get file size on Windows.
stat() information can be outdated and thus cannot be trusted.
On Vista,stat() returns file size=0 until the file is closed at the
first time.
storage/myisam/CMakeLists.txt:
Fix compiler errors on Windows
Build test executables
storage/myisam/mi_test2.c:
Rename variable to avoid naming conflict with Microsoft C runtime
function
storage/myisam/mi_test3.c:
Fix build errors on Windows
strings/CMakeLists.txt:
Add missing file
unittest/unit.pl:
Windows:
downport unittest changes from 5.2 bk tree
unittest/mysys/Makefile.am:
Windows:
downport unittest changes from 5.2 bk tree
unittest/mysys/my_atomic-t.c:
Windows:
downport unittest changes from 5.2 bk tree
unittest/mytap/Makefile.am:
Windows:
downport unittest changes from 5.2 bk tree
unittest/mytap/tap.c:
Windows:
downport unittest changes from 5.2 bk tree
win/configure.js:
Add WITH_MARIA_STORAGE_ENGINE configure option
unittest/mytap/CMakeLists.txt:
Add missing file
unittest/mysys/CMakeLists.txt:
Add missing file
storage/maria/unittest/CMakeLists.txt:
Add missing file
BitKeeper/etc/ignore:
Added comments maria-win.patch to the ignore list
include/atomic/generic-msvc.h:
Implement atomic operations with MSVC intrinsics
storage/maria/ma_pagecache.c:
Change mode to -rw-rw-r--
storage/maria/ma_open.c:
ignore 'moved' state if requested
storage/maria/maria_pack.c:
ignore 'moved' state in maria_open()
storage/maria/unittest/ma_test_all-t:
avoid a warning if $output is undefined
storage/maria/ma_test_all.sh:
Added possibility to call ma_test_all-t directly with the old script.
If any options were passed (such as --verbose) the script will
be called directly.
storage/maria/unittest/ma_test_all-t:
Added new options --number-of-tests and --run-tests=...
More verbose output
storage/maria/ma_pagecache.c:
Support of unpinning unlocked file.
storage/maria/unittest/ma_pagecache_single.c:
Fixed layout.
Added test of new schema of using pagecache:
unlocking without unpinning.
- If not in autocommit mode, delete rows one by one so that we can roll back if necessary
- bitmap->used_size was not correctly set, which caused bitmap pages to be overwritten
- Fixed bug in bitmap handling when allocation tail pages
- Ensure we reserve place for directory entry when calculation place for head and tail pages
- Fixed wrong value in bitmap->size[0]
- Fixed wrong assert in flush_log_for_bitmap
- Fixed bug in _ma_bitmap_release_unused() where tail blocks could be wrongly reset
- Mark new pages as changed (Required to get repair() to work)
- Fixed problem with advancing log horizon pointer within one page bounds
- Fixed DBUG_ASSERT() when enable_indexes failes for end_bulk_insert()
- Fixed bug in logging of rows with more than one big blob
- Fixed DBUG_ASSERTS() in pagecache to allow change of WRITE_LOCK to READ_LOCK in unlock() calls
- Flush pagecache when we change from logging to not logging (if not, pagecache code breaks)
- Ensure my_errno is set on return from write/delete/update
- Fixed bug when using FIELD_SKIP_PRESPACE
New features:
- mysql_fix_privilege_tables now first uses binaries and scripts from source distribution, then in installed distribution
- Fix that optimize works for Maria tables
- maria_check --zerofill now also clear freed blob pages
- maria_check -di now prints more information about record page utilization
Optimizations:
- Use pagecache_unlock_by_link() instead of pagecache_write() if possible. (Avoids a memory copy and a find_block)
- Simplify code to abort when we found optimal bit pattern
- Skip also full head page bit patterns when searching for tail
- Increase default repair buffer to 128M for maria_chk and maria_read_log
- Increase default sort buffer for maria_chk to 64M
- Increase size of sortbuffer and pagecache for mysqld to 64M
- VARCHAR/CHAR fields are stored in increasing length order for BLOCK_RECORD tables
Better reporting:
- Fixed test of error condition for flush (for better error code)
- More error messages to mysqld if Maria recovery fails
- Always print warning if rows are deleted in repair
- Added global function _db_force_flush() that is usable when doing debugging in gdb
- Added call to my_debug_put_break_here() in case of some errors (for debugging)
- Remove used testfiles in unittest as these was written in different directories depending on from where the test was started
This should fix the bugs found when importing a big table with many varchars and one/many blobs to Maria
dbug/dbug.c:
Added global function _db_force_flush() that is usable when doing debugging in gdbine
extra/replace.c:
Fixed memory leak
include/my_dbug.h:
Prototype for _db_force_flush()
include/my_global.h:
Added stdarg.h as my_sys.h now depends on it.
include/my_sys.h:
Make my_dbug_put_break_here() a NOP if not DBUG build
Added my_printv_error()
include/myisamchk.h:
Added entry 'lost' to be able to count space that is lost forever
mysql-test/r/maria.result:
Updated results
mysql-test/t/maria.test:
Reset autocommit after test
New test to check if delete_all_rows is used (verified with --debug)
mysys/my_error.c:
Added my_printv_error()
scripts/mysql_fix_privilege_tables.sh:
First use binaries and scripts from source distribution, then in installed distribution
This ensures that a development branch doesn't pick up wrong scripts)
sql/mysqld.cc:
Fix that one can break maria recovery with ^C when debugging
sql/sql_class.cc:
Removed #ifdef that has no effect
(The preceeding DBUG_ASSERT() ensures that the following code will not be exectued)
storage/maria/ha_maria.cc:
Increase size of sortbuffer and pagecache to 64M
Fix that optimize works for Maria tables
Fixed DBUG_ASSERT() when enable_indexes failes for end_bulk_insert()
If not in autocommit mode, delete rows one by one so that we can roll back if necessary
Fixed variable comments
storage/maria/ma_bitmap.c:
More ASSERTS to detect overwrite of bitmap pages
bitmap->used_size was not correctly set, which caused bitmap pages to be overwritten
Ensure we reserve place for directory entry when calculation place for head and tail pages
bitmap->size[0] should not include space for directory entry
Simplify code to abort when we found optimal bit pattern
Skip also full head page bit patterns when searching for tail (should speed up some common cases)
Fixed bug in allocate_tail() when block->used was not aligned on 6 bytes
Fixed wrong assert in flush_log_for_bitmap
Fixed bug in _ma_bitmap_release_unused() where tail blocks could be wrongly reset
storage/maria/ma_blockrec.c:
Ensure my_errno is set on return
Fixed not optimal setting of row->min_length if we don't have variable length fields
Use pagecache_unlock_by_link() instead of pagecache_write() if possible. (Avoids a memory copy and a find_block)
Added DBUG_ASSERT() if we read or write wrong VARCHAR data
Added DBUG_ASSERT() to find out if row sizes are calculated wrong
Fixed bug in logging of rows with more than one big blob
storage/maria/ma_check.c:
Disable logging while normal repair is done to avoid logging of index changes
Fixed bug that caused CHECKSUM part of key page to be used
Fixed that deleted of wrong records also works for BLOCK_RECORD
Clear unallocated pages:
- BLOB pages are not automaticly cleared on delete, so we need to use the bitmap to know if page is used or not
Better error reporting
More information about record page utilization
Change printing of file position to printing of pages to make output more readable
Always print warning if rows are deleted
storage/maria/ma_create.c:
Calculate share.base_max_pack_length more accurately for BLOCK_RECORD pages (for future)
Fixed that FIELD_SKIP_PRESPACE is recorded as FIELD_NORMAL; Fixed bug where fields could be used in wrong order
Store FIELD_SKIP_ZERO fields before CHAR and VARCHAR fields (optimization)
Store other fields in length order (to get better utilization of head block)
storage/maria/ma_delete.c:
Ensure my_errno is set on return
storage/maria/ma_dynrec.c:
Indentation fix
storage/maria/ma_locking.c:
Set changed if open_count is counted down.
(To avoid getting error "client is using or hasn't closed the table properly" with transactional tables
storage/maria/ma_loghandler.c:
Fixed problem with advancing log horizon pointer within one page bounds (Patch from Sanja)
Added more DBUG
Indentation fixes
storage/maria/ma_open.c:
Removed wrong casts
storage/maria/ma_page.c:
Fixed usage of PAGECACHE_LOCK_WRITE_UNLOCK with _ma_new()
Mark new pages as changed (Required to get repair() to work)
storage/maria/ma_pagecache.c:
Fixed test of error condition for flush
Fixed problem when using PAGECACHE_LOCK_WRITE_TO_READ with unlock()
Added call to my_debug_put_break_here() in case of errors (for debugging)
storage/maria/ma_pagecrc.c:
Ensure we get same crc for 32 and 64 bit systems by forcing argument to maria_page_crc to uint32
storage/maria/ma_recovery.c:
Call my_printv_error() from eprint() to get critical errors to mysqld log
Removed \n from error strings to eprint() to get nicer output in mysqld
Added simple test in _ma_reenable_logging_for_table() to not do any work if not needed
storage/maria/ma_update.c:
Ensure my_errno is set on return
storage/maria/ma_write.c:
Ensure my_errno is set on return
storage/maria/maria_chk.c:
Use DEBUGGER_OFF if --debug is not use (to get slightly faster execution for debug binaries)
Added option --skip-safemalloc
Don't write exponents for rec/key
storage/maria/maria_def.h:
Increase default repair buffer to 128M for maria_chk and maria_read_log
Increase default sort buffer for maria_chk to 64M
storage/maria/unittest/Makefile.am:
Don't update files automaticly from bitkeeper
storage/maria/unittest/ma_pagecache_consist.c:
Remove testfile at end
storage/maria/unittest/ma_pagecache_single.c:
Remove testfile at end
storage/maria/unittest/ma_test_all-t:
More tests
Safer checking if test caused error