diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
commit | 76f0b94bb0b2994d639353530c5b251d0f1a204b (patch) | |
tree | 9ed50628aac34f89a37637bab2fc4915b86b5eb4 /mysys/my_sync.c | |
parent | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff) | |
parent | 5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff) | |
download | mariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz |
merge with 5.3
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
Diffstat (limited to 'mysys/my_sync.c')
-rw-r--r-- | mysys/my_sync.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/mysys/my_sync.c b/mysys/my_sync.c index f39b10253dd..4d187631786 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -123,7 +123,6 @@ int my_sync(File fd, myf my_flags) static const char cur_dir_name[]= {FN_CURLIB, 0}; - /* Force directory information to disk. @@ -136,10 +135,10 @@ static const char cur_dir_name[]= {FN_CURLIB, 0}; 0 if ok, !=0 if error */ -#ifdef NEED_EXPLICIT_SYNC_DIR - -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 File dir_fd; int res= 0; const char *correct_dir_name; @@ -161,19 +160,11 @@ int my_sync_dir(const char *dir_name, myf my_flags) else res= 1; DBUG_RETURN(res); -} - -#else /* NEED_EXPLICIT_SYNC_DIR */ - -int my_sync_dir(const char *dir_name __attribute__((unused)), - myf my_flags __attribute__((unused))) -{ +#else return 0; +#endif } -#endif /* NEED_EXPLICIT_SYNC_DIR */ - - /* Force directory information to disk. @@ -186,23 +177,15 @@ int my_sync_dir(const char *dir_name __attribute__((unused)), 0 if ok, !=0 if error */ -#ifdef NEED_EXPLICIT_SYNC_DIR - -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]; size_t dir_name_length; dirname_part(dir_name, file_name, &dir_name_length); return my_sync_dir(dir_name, my_flags); -} - -#else /* NEED_EXPLICIT_SYNC_DIR */ - -int my_sync_dir_by_file(const char *file_name __attribute__((unused)), - myf my_flags __attribute__((unused))) -{ +#else return 0; +#endif } - -#endif /* NEED_EXPLICIT_SYNC_DIR */ - |