List:Replication« Previous MessageNext Message »
From:Artem Koltsov Date:January 24 2005 3:12pm
Subject:RE: Session variables replication bug?
View as plain text  
Thanks Lars,

The problem came up in replicated environment (both servers 4.1.8) when I tried to update
user on the master using MySQL administrator. In order to update a user MySQL Admin
deletes user completely from mysql db using session variables, and add the same user with
updated permissions. I don't know if it can be mysql db problem. Will check it later when
database is not so loaded.

Regards,

Artem

> -----Original Message-----
> From: Lars Thalmann [mailto:lars@stripped]
> Sent: Saturday, January 22, 2005 11:09 PM
> To: Artem Koltsov
> Cc: replication@stripped
> Subject: Re: Session variables replication bug?
> 
> 
> Hi Artem,
> 
> No, that should work.  Try to execute 'mysqlbinlog' on both your 
> master binlog file and on your slave relay log file, it should 
> give some result similar to this (in both files):
> 
> #050123  4:59:32 server id 1  log_pos 132       Query   
> thread_id=1     exec_time=0     error_code=0
> use testdb;
> SET TIMESTAMP=1106452772;
> create table foo (a int);
> # at 229
> #050123  4:59:45 server id 1  log_pos 190       Query   
> thread_id=1     exec_time=1     error_code=0
> SET TIMESTAMP=1106452785;
> insert into foo values (3);
> # at 289
> #050123  5:01:11 server id 1  log_pos 250       User_var
> SET @`testvar`:=3;
> # at 337
> #050123  5:01:10 server id 1  log_pos 298       Query   
> thread_id=1     exec_time=1     error_code=0
> SET TIMESTAMP=1106452870;
> delete from foo where a=@testvar;
> 
> Best wishes,
> Lars
> 
> 
> On Tue, Jan 11, 2005 at 09:26:03AM -0800, Artem Koltsov wrote:
> > I have mysql master-slave 4.1.8 setup. I am having problem 
> with the using session variables in SQL expressions. For 
> example, the following won't be replicated on the slave:
> > 
> > set @testvar='somevalue';
> > delete from testtable where id=@testvar;
> > 
> > Is it correct behavior or I need to change some settings to 
> make it work? Anybody had the same problem?
> > 
> > Thanks!
> >  
> > Attention:
> > Any views expressed in this message are those of the 
> individual sender, except where the message states otherwise 
> and the sender is authorized to state them to be the views of 
> any such entity. The information contained in this message 
> and or attachments is intended only for the person or entity 
> to which it is addressed and may contain confidential and/or 
> privileged material.  If you received this in error, please 
> contact the sender and delete the material from any system 
> and destroy any copies.
> > 
> > -- 
> > MySQL Replication Mailing List
> > For list archives: http://lists.mysql.com/replication
> > To unsubscribe:    
> http://lists.mysql.com/replication?unsub=1
> > 
> 
> -- 
> Dr. Lars Thalmann
> MySQL AB, www.mysql.com
> 
 
Attention:
Any views expressed in this message are those of the individual sender, except where the
message states otherwise and the sender is authorized to state them to be the views of
any such entity. The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain confidential and/or
privileged material.  If you received this in error, please contact the sender and delete
the material from any system and destroy any copies.
Thread
Session variables replication bug?Artem Koltsov11 Jan
  • Re: Session variables replication bug?Lars Thalmann23 Jan
RE: Session variables replication bug?Artem Koltsov24 Jan