summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-11-02 15:55:02 +0200
committerunknown <monty@mysql.com>2003-11-02 15:55:02 +0200
commitc97a38c4d3b2afd4c93771fca61eede965fe71cf (patch)
treecb9bb7181d68f8c4f3d892367e08536d2f609a19 /isam
parent116cf0102464ce330a758fa3bec2239bfc5872d5 (diff)
downloadmariadb-git-c97a38c4d3b2afd4c93771fca61eede965fe71cf.tar.gz
Call my_sync() after all data is written to .frm file
Added my_sync() to mysys which will do fsync/fdatasync/_commit() on a file. VC++Files/mysys/mysys.dsp: Added my_sync.c configure.in: Added testing of fsync and fdatasync include/my_sys.h: Added my_sync() include/mysys_err.h: Added my_sync() isam/extra.c: Added my_sync() myisam/mi_extra.c: Added my_sync() myisam/mi_locking.c: Added my_sync() mysql-test/mysql-test-run.sh: Added option --valgrind-all mysys/Makefile.am: Added my_sync.c mysys/errors.c: Added my_sync() mysys/my_symlink.c: Removed compiler warning mysys/thr_alarm.c: Fix for link error on windows sql/unireg.cc: Call my_sync() after all data is written to .frm file BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'isam')
-rw-r--r--isam/extra.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/isam/extra.c b/isam/extra.c
index e2f13532ddf..3bf1dd012ed 100644
--- a/isam/extra.c
+++ b/isam/extra.c
@@ -250,17 +250,15 @@ int nisam_extra(N_INFO *info, enum ha_extra_function function)
pthread_mutex_unlock(&THR_LOCK_isam);
break;
case HA_EXTRA_FLUSH:
-#ifdef __WIN__
if (info->s->not_flushed)
{
info->s->not_flushed=0;
- if (_commit(info->s->kfile))
- error=errno;
- if (_commit(info->dfile))
- error=errno;
+ if (my_sync(info->s->kfile, MYF(0)))
+ error= my_errno;
+ if (my_sync(info->dfile, MYF(0)))
+ error= my_errno;
}
break;
-#endif
case HA_EXTRA_NORMAL: /* Theese isn't in use */
case HA_EXTRA_QUICK:
case HA_EXTRA_KEY_CACHE: