diff options
author | sasha@mysql.sashanet.com <> | 2000-10-06 19:07:15 -0600 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2000-10-06 19:07:15 -0600 |
commit | 49dd5909bf1cba7438b8a0638488ff438f1640cf (patch) | |
tree | ed6ef99b6eb8af72f1ea0e7055e611d015c2a251 /sql | |
parent | f452ab6f90c1ec01bf344d2a746ea2a8cb4a44d4 (diff) | |
download | mariadb-git-49dd5909bf1cba7438b8a0638488ff438f1640cf.tar.gz |
sql/log.cc
set character set is not being logged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index bef7fd14b8d..c5e5c8ff7a1 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -475,6 +475,25 @@ void MYSQL_LOG::write(Query_log_event* event_info) goto err; } } + + if(thd->convert_set) + { + char buf[1024] = "SET CHARACTER SET "; + char* p = strend(buf); + p = strmov(p, thd->convert_set->name); + int save_query_length = thd->query_length; + // just in case somebody wants it later + thd->query_length = (uint)(p - buf); + Query_log_event e(thd, buf); + if(e.write(file)) + { + sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno); + goto err; + } + + thd->query_length = save_query_length; // clean up + + } if (event_info->write(file)) { |