From 73688c5e218543cba0ef1ef3d69bcdafea747d50 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Wed, 14 Jan 2009 11:10:36 -0500 Subject: [PATCH 1/2] Fix comment. Boolean function returns true/false, not zero/one. --- sql/unireg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/unireg.cc b/sql/unireg.cc index b581ad4655a..0aac7873d11 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -63,8 +63,8 @@ static bool make_empty_rec(THD *thd, int file, enum db_type table_type, db_file Handler to use. May be zero, in which case we use create_info->db_type RETURN - 0 ok - 1 error + false ok + true error */ bool mysql_create_frm(THD *thd, my_string file_name, From e85a3f7bc270723112affa6557d1fa6e7482ff61 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Wed, 14 Jan 2009 11:11:31 -0500 Subject: [PATCH 2/2] 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. --- sql/parse_file.cc | 5 +++++ 1 file changed, 5 insertions(+) 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);