Commit 8c9e81e8 authored by Chad MILLER's avatar Chad MILLER

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.
parent 6ab0034f
...@@ -263,6 +263,11 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name, ...@@ -263,6 +263,11 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name,
if (end_io_cache(&file)) if (end_io_cache(&file))
goto err_w_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))) if (my_close(handler, MYF(MY_WME)))
{ {
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment