MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 22 2000 9:08pm
Subject:Re: Replication Capabilities
View as plain text  

>>>>> "Thimble" == Thimble Smith <tim@stripped> writes:

Thimble> On Tue, Apr 18, 2000 at 11:01:06AM -0700, Scott Hess wrote:
>> On Tue, Apr 18, 2000 at 09:25:41AM -0700, Dana Powers wrote:
>> > The functioning of LAST_INSERT_ID is not the question here, it is
>> > the treatment of it in the update log.
>> At first, I thought you had a huge point.  After thinking about it,
>> though, I'm not sure.  The problem is that you're trying to
>> propagate the LAST_INSERT_ID() to a column which is not the
>> autoincrement column in question.

Thimble> That's the whole point of LAST_INSERT_ID():  you can reference the
Thimble> row you just inserted from another column.

>> > CREATE TABLE test_update (col1 int auto_increment primary key, col2 int);
>> > INSERT INTO test_update (col2) VALUES (123);
>> > INSERT INTO test_update (col2) VALUES (LAST_INSERT_ID());

Thimble> The update log will not recreate the same information, and it should.
Thimble> It is a bug.  We will get it fixed for the next version.

I have now fixed this for 3.23.15.

(Sorry, but I can't easily post a patch as we have already done other
changes in the files that I had to edit to fix this)

GRANTAsterix12 Mar
  • Re: GRANTAyman Haidar12 Mar
  • Re: Replication CapabilitiesMichael Widenius23 Apr
RE: GRANTNeil Robst12 Mar
RE: GRANTRobin Bowes12 Mar
Re: GRANTFred Lindberg12 Mar