|
|
@ -89,6 +89,8 @@ int my_sync(File fd, myf my_flags) |
|
|
|
|
|
|
|
|
|
|
|
static const char cur_dir_name[]= {FN_CURLIB, 0}; |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
Force directory information to disk. |
|
|
|
|
|
|
@ -100,7 +102,9 @@ static const char cur_dir_name[]= {FN_CURLIB, 0}; |
|
|
|
RETURN |
|
|
|
0 if ok, !=0 if error |
|
|
|
*/ |
|
|
|
|
|
|
|
#ifdef NEED_EXPLICIT_SYNC_DIR |
|
|
|
|
|
|
|
int my_sync_dir(const char *dir_name, myf my_flags) |
|
|
|
{ |
|
|
|
File dir_fd; |
|
|
@ -125,12 +129,15 @@ int my_sync_dir(const char *dir_name, myf my_flags) |
|
|
|
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))) |
|
|
|
myf my_flags __attribute__((unused))) |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
#endif /* NEED_EXPLICIT_SYNC_DIR */ |
|
|
|
|
|
|
|
|
|
|
@ -145,7 +152,9 @@ int my_sync_dir(const char *dir_name __attribute__((unused)), |
|
|
|
RETURN |
|
|
|
0 if ok, !=0 if error |
|
|
|
*/ |
|
|
|
|
|
|
|
#ifdef NEED_EXPLICIT_SYNC_DIR |
|
|
|
|
|
|
|
int my_sync_dir_by_file(const char *file_name, myf my_flags) |
|
|
|
{ |
|
|
|
char dir_name[FN_REFLEN]; |
|
|
@ -153,10 +162,14 @@ int my_sync_dir_by_file(const char *file_name, myf my_flags) |
|
|
|
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))) |
|
|
|
myf my_flags __attribute__((unused))) |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
#endif /* NEED_EXPLICIT_SYNC_DIR */ |
|
|
|
|