diff options
Diffstat (limited to 'mysys/my_sync.c')
-rw-r--r-- | mysys/my_sync.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mysys/my_sync.c b/mysys/my_sync.c index 1b8420c034e..967a6ae6c78 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -17,6 +17,8 @@ #include "mysys_err.h" #include <errno.h> +ulong my_sync_count; /* Count number of sync calls */ + /* Sync data in file to disk @@ -46,6 +48,7 @@ int my_sync(File fd, myf my_flags) DBUG_ENTER("my_sync"); DBUG_PRINT("my",("fd: %d my_flags: %d", fd, my_flags)); + statistic_increment(my_sync_count,&THR_LOCK_open); do { #if defined(F_FULLFSYNC) @@ -100,14 +103,15 @@ static const char cur_dir_name[]= {FN_CURLIB, 0}; RETURN 0 if ok, !=0 if error */ -int my_sync_dir(const char *dir_name, myf my_flags) +int my_sync_dir(const char *dir_name __attribute__((unused)), + myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR - DBUG_ENTER("my_sync_dir"); - DBUG_PRINT("my",("Dir: '%s' my_flags: %d", dir_name, my_flags)); File dir_fd; int res= 0; const char *correct_dir_name; + DBUG_ENTER("my_sync_dir"); + DBUG_PRINT("my",("Dir: '%s' my_flags: %d", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* @@ -141,7 +145,8 @@ int my_sync_dir(const char *dir_name, myf my_flags) RETURN 0 if ok, !=0 if error */ -int my_sync_dir_by_file(const char *file_name, myf my_flags) +int my_sync_dir_by_file(const char *file_name __attribute__((unused)), + myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR char dir_name[FN_REFLEN]; |