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.
That's the whole point of LAST_INSERT_ID(): you can reference the
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());
The update log will not recreate the same information, and it should.
It is a bug. We will get it fixed for the next version.