summaryrefslogtreecommitdiff
path: root/mysys/my_copy.c
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-09-03 17:59:25 +0530
committerSatya B <satya.bn@sun.com>2009-09-03 17:59:25 +0530
commit33f9066e390ba220fa79c98a1eabed169bfc82d2 (patch)
tree57ec873f6a6da89c00bdbfdf8eb6f54472c80cba /mysys/my_copy.c
parent9d82084d20b172c68fc84f2f1d0bc3a7b2ee2c2e (diff)
parent2fc9c5d19993f4af526b97153ee7363ac108831b (diff)
downloadmariadb-git-33f9066e390ba220fa79c98a1eabed169bfc82d2.tar.gz
merge mysql-5.0-bugteam to mysql-5.1-bugteam
Diffstat (limited to 'mysys/my_copy.c')
-rw-r--r--mysys/my_copy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index 64f1623aa59..418e2b6f8a2 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -88,6 +88,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 */