diff options
Diffstat (limited to 'mysys/my_copy.c')
-rw-r--r-- | mysys/my_copy.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysys/my_copy.c b/mysys/my_copy.c index 62f60e9ce95..adc891358d4 100644 --- a/mysys/my_copy.c +++ b/mysys/my_copy.c @@ -89,6 +89,13 @@ int my_copy(const char *from, const char *to, myf MyFlags) goto err; } + /* sync the destination file */ + if (MyFlags & MY_SYNC) + { + if (my_sync(to_file, MyFlags)) + goto err; + } + if (my_close(from_file,MyFlags) | my_close(to_file,MyFlags)) DBUG_RETURN(-1); /* Error on close */ |