summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-08-29 14:14:32 +0200
committerunknown <guilhem@mysql.com>2004-08-29 14:14:32 +0200
commitd84b42b6e4cc4dd4f662f0bcdf74545a33c74c7c (patch)
treed06e63d9c631f1149ddff7f6685594c82c7e6f30 /sql/log.cc
parenta90c14b6f4f3a88b191d93b6c7de68403e2dffc9 (diff)
parent4014c093e2ababc8436f83ef2b3f4c946a13795d (diff)
downloadmariadb-git-d84b42b6e4cc4dd4f662f0bcdf74545a33c74c7c.tar.gz
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0 sql/log.cc: Auto merged
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc22
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
}
/*