diff options
Diffstat (limited to 'sql/discover.cc')
-rw-r--r-- | sql/discover.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/discover.cc b/sql/discover.cc index c9dea535727..3df777c19ba 100644 --- a/sql/discover.cc +++ b/sql/discover.cc @@ -21,7 +21,7 @@ Functions for discover of frm file from handler */ -#include <my_global.h> +#include "mariadb.h" #include "sql_priv.h" #include "unireg.h" #include "discover.h" @@ -127,7 +127,7 @@ int writefrm(const char *path, const char *db, const char *table, File file= mysql_file_create(key_file_frm, file_name, CREATE_MODE, create_flags, MYF(0)); - if ((error= file < 0)) + if (unlikely((error= file < 0))) { if (my_errno == ENOENT) my_error(ER_BAD_DB_ERROR, MYF(0), db); @@ -136,7 +136,7 @@ int writefrm(const char *path, const char *db, const char *table, } else { - error= mysql_file_write(file, frmdata, len, MYF(MY_WME | MY_NABP)); + error= (int)mysql_file_write(file, frmdata, len, MYF(MY_WME | MY_NABP)); if (!error && !tmp_table && opt_sync_frm) error= mysql_file_sync(file, MYF(MY_WME)) || |