diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_priv.h | 7 | ||||
-rw-r--r-- | sql/sql_base.cc | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 6676d994cfa..aab65bca82f 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1275,6 +1275,13 @@ inline int hexchar_to_int(char c) return -1; } +inline void write_binlog_with_system_charset(THD * thd, Query_log_event * qinfo) +{ + CHARSET_INFO * cs_save= thd->variables.character_set_client; + thd->variables.character_set_client= system_charset_info; + mysql_bin_log.write(qinfo); + thd->variables.character_set_client= cs_save; +} /* Some functions that are different in the embedded library and the normal diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 60e91aff3f9..6365b8c8e40 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -615,7 +615,7 @@ void close_temporary_tables(THD *thd) rightfully causing the slave to stop. */ qinfo.error_code= 0; - mysql_bin_log.write(&qinfo); + write_binlog_with_system_charset(thd, &qinfo); } else { |