Hi, ...the sysntax it's not quite normal.You should try : select @a:=max(id)+1 from t1; To test if the variable @a is "loaded" with what you expect, you can do: select @a; ...if the result is NULL something is working wrong.
Anyhow, i wonder how it works on the master ? Regards, Gelu _____________________________________________________ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] ----- Original Message ----- From: "Scott Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 6:53 PM Subject: Doing select @a does not work in replication. I'm not sure if this is a feature or not so i'll just report it as a possible bug. I couldnt find anything in the documentation. How to repeat: create table t1(id int); insert into t1 set id=0; select @a:max(id)+1 from t1; insert into t1 [EMAIL PROTECTED]; Result on master: mysql> select * from t1; +------+ | id | +------+ | 0 | | 1 | +------+ 2 rows in set (0.00 sec) result on slave: mysql> select * from t1; +------+ | id | +------+ | 0 | | NULL | +------+ Binlog shows insert into t1 set [EMAIL PROTECTED]; on both master and slave. Fix:? Thank you for your time, Scott Wong Meiko America, INC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]