mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
22
sql/log.cc
22
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 */
|
/* 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);
|
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS)
|
||||||
e.set_log_pos(this);
|
{
|
||||||
if (e.write(file))
|
Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0);
|
||||||
goto err;
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1932,8 +1932,6 @@ end:
|
|||||||
thd->query= 0; // just to be sure
|
thd->query= 0; // just to be sure
|
||||||
thd->query_length= 0;
|
thd->query_length= 0;
|
||||||
VOID(pthread_mutex_unlock(&LOCK_thread_count));
|
VOID(pthread_mutex_unlock(&LOCK_thread_count));
|
||||||
// assume no convert for next query unless set explictly
|
|
||||||
thd->variables.convert_set = 0;
|
|
||||||
close_thread_tables(thd);
|
close_thread_tables(thd);
|
||||||
free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC));
|
free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC));
|
||||||
return (thd->query_error ? thd->query_error : Log_event::exec_event(rli));
|
return (thd->query_error ? thd->query_error : Log_event::exec_event(rli));
|
||||||
|
Reference in New Issue
Block a user