Hi,
On Fri, Jul 13, 2007 at 06:55:41PM +0500, Sergey Vojtovich wrote:
> ChangeSet@stripped, 2007-07-13 18:55:36+05:00, svoj@stripped +1 -0
> BUG#29734 - thread_id=0 in binary log which leads to temporary table conflicts
>
> thread_id was not reset properly after mysql_change_user() command, which
> may cause replication failure when replicating temporary tables.
>
> Fixed by resetting thread_id to proper value after mysql_change_user().
wrong cset comment
> sql/sql_class.cc@stripped, 2007-07-13 18:55:34+05:00, svoj@stripped +1 -0
> Fixed that pseudo_thread_id was set to 0 after mysql_change_user().
>
> diff -Nrup a/sql/sql_class.cc b/sql/sql_class.cc
> --- a/sql/sql_class.cc 2007-07-06 03:43:02 +05:00
> +++ b/sql/sql_class.cc 2007-07-13 18:55:34 +05:00
> @@ -328,6 +328,7 @@ void THD::init(void)
> variables.date_format);
> variables.datetime_format= date_time_format_copy((THD*) 0,
> variables.datetime_format);
> + variables.pseudo_thread_id= thread_id;
> pthread_mutex_unlock(&LOCK_global_system_variables);
> server_status= SERVER_STATUS_AUTOCOMMIT;
> if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
>
Ok to push.
Please remove "variables.pseudo_thread_id= 0" from THD::THD(), because
THD::THD() calls THD::init(), and you have now added a setting of
pseudo_thread_id in THD::init().
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Guilhem Bichot <guilhem@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Lead Software Engineer
/_/ /_/\_, /___/\___\_\___/ Bordeaux, France
<___/ www.mysql.com