summaryrefslogtreecommitdiff
path: root/sql/parse_file.cc
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2009-01-14 11:11:31 -0500
committerChad MILLER <chad@mysql.com>2009-01-14 11:11:31 -0500
commite85a3f7bc270723112affa6557d1fa6e7482ff61 (patch)
tree4aef626dc5304561a7028bd7210edaa6656ce11a /sql/parse_file.cc
parent73688c5e218543cba0ef1ef3d69bcdafea747d50 (diff)
downloadmariadb-git-e85a3f7bc270723112affa6557d1fa6e7482ff61.tar.gz
Bug#38145: .frm file isn't sync'd with sync_frm enabled
Views weren't sync()d the same way other structures were. In creating the FRM for views, obey the same rules for variable "sync_frm" as for everything else.
Diffstat (limited to 'sql/parse_file.cc')
-rw-r--r--sql/parse_file.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 2b947fcac4f..c9bbdfd417e 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -263,6 +263,11 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name,
if (end_io_cache(&file))
goto err_w_file;
+ if (opt_sync_frm) {
+ if (my_sync(handler, MYF(MY_WME)))
+ goto err_w_file;
+ }
+
if (my_close(handler, MYF(MY_WME)))
{
DBUG_RETURN(TRUE);