From 4668b54837f3cd0a4ee71b16841c41a6bdc44c06 Mon Sep 17 00:00:00 2001 From: "monty@mysql.com" <> Date: Sun, 2 Nov 2003 15:55:02 +0200 Subject: 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. --- isam/extra.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'isam') 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: -- cgit v1.2.1