diff options
author | guilhem@mysql.com <> | 2004-08-29 14:14:32 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2004-08-29 14:14:32 +0200 |
commit | 0485e5d3f061aa6d513070c20cdb78f67e93a34f (patch) | |
tree | d06e63d9c631f1149ddff7f6685594c82c7e6f30 /sql/log.cc | |
parent | 0f023b3b9b1acf4ba81dbf2178e6d435cfe10712 (diff) | |
parent | 93101561fd3d49fde9b1408f1d2b9f036fcba658 (diff) | |
download | mariadb-git-0485e5d3f061aa6d513070c20cdb78f67e93a34f.tar.gz |
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc index e9dd2e4a69b..aa45e2f77ee 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1212,12 +1212,24 @@ bool MYSQL_LOG::write(Log_event* event_info) /* Write log events to reset the 'run environment' of the SQL command */ - if (thd && thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) + if (thd) { - Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0); - e.set_log_pos(this); - if (e.write(file)) - goto err; + if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) + { + Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0); + e.set_log_pos(this); + if (e.write(file)) + goto err; + } +#if MYSQL_VERSION_ID < 40100 + if (thd->variables.convert_set) + { + Query_log_event e(thd, "SET CHARACTER SET DEFAULT", 25, 0); + e.set_log_pos(this); + if (e.write(file)) + goto err; + } +#endif } /* |