Re: Replication script pb

2004-07-27 Thread Philippe Poelvoorde
_id i -Original Message- From: Philippe Poelvoorde To: Victor Pendleton Cc: ''[EMAIL PROTECTED] ' ' Sent: 7/27/04 9:56 AM Subject: Re: Replication script pb I feed the table with : INSERT INTO table ( SELECT @backup_id, col1. col2 FROM table_to_backup) How can i do w

RE: Replication script pb

2004-07-27 Thread Victor Pendleton
: ''[EMAIL PROTECTED] ' ' Sent: 7/27/04 9:56 AM Subject: Re: Replication script pb I feed the table with : INSERT INTO table ( SELECT @backup_id, col1. col2 FROM table_to_backup) How can i do with a temp table ? Victor Pendleton wrote: > Ugly, but you could try using a

Re: Replication script pb

2004-07-27 Thread Philippe Poelvoorde
EMAIL PROTECTED] ' Sent: 7/27/04 5:54 AM Subject: Re: Replication script pb Paul DuBois wrote: At 8:20 -0500 7/26/04, Victor Pendleton wrote: Have you tried using the last insert id function instead? SET @backup_id = last_insert_id() That'll give him the same result. I suspect the problem mig

Re: Replication script pb

2004-07-27 Thread Paul DuBois
have two INSERT to do with the same id... any workaround for that ? None that I know of other than upgrading to 4.1, in which the problem is fixed. -Original Message- From: Philippe Poelvoorde To: [EMAIL PROTECTED] Sent: 7/26/04 7:03 AM Subject: Replication script pb Hi, We have an environ

RE: Replication script pb

2004-07-27 Thread Victor Pendleton
Ugly, but you could try using a temp table to store the last_insert_id(). -Original Message- From: Philippe Poelvoorde To: '[EMAIL PROTECTED] ' Sent: 7/27/04 5:54 AM Subject: Re: Replication script pb Paul DuBois wrote: > At 8:20 -0500 7/26/04, Victor Pendleton wrote: &

Re: Replication script pb

2004-07-27 Thread Philippe Poelvoorde
round for that ? -Original Message- From: Philippe Poelvoorde To: [EMAIL PROTECTED] Sent: 7/26/04 7:03 AM Subject: Replication script pb Hi, We have an environnment with a master and a slave. We run a script every hour (on the master only) that does something like this to backup some param

RE: Replication script pb

2004-07-26 Thread Paul DuBois
MySQL are you using? If 4.0.x, you might try skipping the SET statement and just refer to LAST_INSERT_ID() or @@LAST_INSERT_ID() directly in your second INSERT statement. -Original Message- From: Philippe Poelvoorde To: [EMAIL PROTECTED] Sent: 7/26/04 7:03 AM Subject: Replication script pb H

RE: Replication script pb

2004-07-26 Thread Victor Pendleton
Have you tried using the last insert id function instead? SET @backup_id = last_insert_id() -Original Message- From: Philippe Poelvoorde To: [EMAIL PROTECTED] Sent: 7/26/04 7:03 AM Subject: Replication script pb Hi, We have an environnment with a master and a slave. We run a script

Replication script pb

2004-07-26 Thread Philippe Poelvoorde
Hi, We have an environnment with a master and a slave. We run a script every hour (on the master only) that does something like this to backup some parameters : insert into backup(NULL,NULL) VALUES(NULL,NOW()) SET @backup_id = @@LAST_INSERT_ID INSERT INTO backup_param ( SELECT @backup_id, col1, c