Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
commit
aaea3431d3
@ -1,2 +1,3 @@
|
|||||||
monty@tramp.mysql.fi
|
monty@tramp.mysql.fi
|
||||||
monty@donna.mysql.com
|
monty@donna.mysql.com
|
||||||
|
sasha@mysql.sashanet.com
|
||||||
|
19
sql/log.cc
19
sql/log.cc
@ -476,6 +476,25 @@ void MYSQL_LOG::write(Query_log_event* event_info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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))
|
if (event_info->write(file))
|
||||||
{
|
{
|
||||||
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
|
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user