MySQL Tutorial: LAST_INSERT_ID
Hi, I'm working my way through the MySQL Tutorial, and I'm having trouble with the Foreign Keys section. I'm using MySQL 4.1.4 gamma, and I'm wondering if this is a bug.
When I created the shirt table, using LAST_INSERT_ID() the owner field isn't incrementing correctly. I added an extra line for the first owner to see what was going on, but here's what I get:
id | style | color | owner
1 | polo | blue | 1
2 | dress | white | 1
3 | t-shirt | blue | 2
4 | polo | red | 3 * my inserted record
5 | dress | orange | 2
6 | polo | red | 5
7 | dress | blue | 6
8 | t-shirt | white | 7
Owner should be 1 or 2 for all of them according to the documentation.
Anyone else seeing this?
~~~
Michael
Subject
Written By
Posted
MySQL Tutorial: LAST_INSERT_ID
September 13, 2004 10:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.