summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index d90420313a6..c55d6db3c85 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -284,8 +284,10 @@ bool mysql_create_frm(THD *thd, const char *file_name,
my_free((gptr) keybuff, MYF(0));
if (opt_sync_frm && !(create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
- my_sync(file, MYF(MY_WME)))
- goto err2;
+ (my_sync(file, MYF(MY_WME)) ||
+ my_sync_dir_by_file(file_name, MYF(MY_WME))))
+ goto err2;
+
if (my_close(file,MYF(MY_WME)))
goto err3;