summaryrefslogtreecommitdiff
path: root/mysys/my_sync.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2010-08-09 20:05:42 +0300
committerMichael Widenius <monty@mysql.com>2010-08-09 20:05:42 +0300
commit12648015b322e885923f87d919c07529423a0eca (patch)
tree1c7544239d141efc12ba3d8ebe0b5a1d4ef1292d /mysys/my_sync.c
parentf6d226f5f77cd5b45fe54d2125018fee15e5ffcc (diff)
downloadmariadb-git-12648015b322e885923f87d919c07529423a0eca.tar.gz
Added --sync-sys=0 option for mysqld to skip sync() calls for faster testing
Fixed LP#613418 (M)aria recovery failure: ma_key_recover.c:981: _ma_apply_redo_index: Assertion `check_page_length == page_length' failed include/my_sys.h: Added my_disable_sync mysql-test/mysql-test-run.pl: Added --sync-sys=0 to run test suite faster mysys/my_static.c: Added my_disable_sync mysys/my_sync.c: Added my_disable_sync sql/mysqld.cc: Added -sync-sys=0 option for mysqld to skip sync() calls for faster testing storage/maria/ma_key_recover.c: More DBUG_ASSERT() Added logging of KEY_OP_DEBUG to make examening of logs easier Fixed testing of page length in recovery to ensure we don't overwrite checksum (previous tests was too relaxed) Fixed bug in recovery logging of split pages which caused failure during recovery: - Length was not adjusted properly for pages to be split - Added KEY_OP_MAX_PAGELENGTH to tell recovery that page is now full length - This fixed LP#613418 storage/maria/ma_key_recover.h: Changed prototype for ma_log_change() for KEY_OP_DEBUG storage/maria/ma_loghandler.h: Added new enums for better debugging of recovery logs storage/maria/ma_rt_index.c: Added debugging information to calls to ma_log_change() storage/maria/ma_write.c: Added debugging information to calls to ma_log_change() and ma_log_split()
Diffstat (limited to 'mysys/my_sync.c')
-rw-r--r--mysys/my_sync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/my_sync.c b/mysys/my_sync.c
index 967a6ae6c78..9f6c55f4fb6 100644
--- a/mysys/my_sync.c
+++ b/mysys/my_sync.c
@@ -48,6 +48,9 @@ int my_sync(File fd, myf my_flags)
DBUG_ENTER("my_sync");
DBUG_PRINT("my",("fd: %d my_flags: %d", fd, my_flags));
+ if (my_disable_sync)
+ DBUG_RETURN(0);
+
statistic_increment(my_sync_count,&THR_LOCK_open);
do
{