Re: Database IDs

2005-11-20 Thread Björn Persson
Gleb Paharenko wrote: > Really, in my opinion, it contradicts with the manual. Please, send me > the bug id in case you'll report the bug. It turns out that it was reported nearly a year ago: http://bugs.mysql.com/bug.php?id=6880 Björn Persson -- MySQL General Mailing List For list archives: htt

RE: Database IDs

2005-11-16 Thread Logan, David (SST - Adelaide)
[mailto:[EMAIL PROTECTED] Sent: Thursday, 17 November 2005 4:42 AM To: mysql@lists.mysql.com Subject: RE: Database IDs Logan, David (SST - Adelaide): > It looks like the LAST_INSERT_ID() is returning the id of the last > auto_increment INSERT, this seems to be in line with the documen

RE: Database IDs

2005-11-16 Thread Logan, David (SST - Adelaide)
5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -Original Message- From: Björn Persson [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 November 2005 4:42 AM To: mysql@lists.mysql.com Subject: RE: Database IDs Logan, David (SST - Adelaide): > It lo

RE: Database IDs

2005-11-16 Thread Björn Persson
Logan, David (SST - Adelaide): > It looks like the LAST_INSERT_ID() is returning the id of the last > auto_increment INSERT, this seems to be in line with the documentation. > > > > The ID that was generated is maintained in the server on a per-connection > basis. This means that the value which t

Re: Database IDs

2005-11-16 Thread Gleb Paharenko
Hello. Really, in my opinion, it contradicts with the manual. Please, send me the bug id in case you'll report the bug. Björn Persson wrote: > Gleb Paharenko: > >>Could you provide a repeatable test case for you problem? > > > I don't know how repeatable this is. As I said I have

RE: Database IDs

2005-11-15 Thread Logan, David (SST - Adelaide)
Björn Persson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 November 2005 10:06 AM To: mysql@lists.mysql.com Subject: Re: Database IDs Gleb Paharenko: > Could you provide a repeatable test case for you problem? I don't know how repeatable this is. As I said I have one computer where it

Re: Database IDs

2005-11-15 Thread Björn Persson
Gleb Paharenko: > Could you provide a repeatable test case for you problem? I don't know how repeatable this is. As I said I have one computer where it seems to work sometimes, as if there's a race condition. Right now it seems repeatable on the computer I'm using at the moment: mysql> select

Re: Database IDs

2005-11-15 Thread Gleb Paharenko
Hello. > I suppose I should file a bug report then? Could you provide a repeatable test case for you problem? If you're using LAST_INSERT_ID() in a wrong way, that doesn't mean that there is something wrong with MySQL. Björn Persson wrote: > Gleb Paharenko: > >>So in you query both

Re: Database IDs

2005-11-14 Thread Björn Persson
Gleb Paharenko: > So in you query both last_insert_id() should return the same value, > which equals to the value that was set for an AUTO_INCREMENT column by > the last INSERT or UPDATE query. Note that you have one query, which > just inserts several rows, so during it is processed the returned v

Re: Database IDs

2005-11-14 Thread Gleb Paharenko
Hello. In the manual we have: " Returns the first automatically generated value that was set for an AUTO_INCREMENT column by the last INSERT or UPDATE query to affect such a column." So in you query both last_insert_id() should return the same value, which equals to the value that was s

Re: Database IDs

2005-11-11 Thread Björn Persson
[EMAIL PROTECTED]: > Robert Crowell <[EMAIL PROTECTED]> wrote on 11/11/2005 12:39:37 AM: > > If I am relying on MySQL's AUTO_INCREMENT feature for the id for a > table,how > > can I reliably retrieve the ID of an item I just entered into the > database? > TFM is your friend. What you are looking

Re: Database IDs

2005-11-10 Thread SGreen
Robert Crowell <[EMAIL PROTECTED]> wrote on 11/11/2005 12:39:37 AM: > > Hello, > > If I am relying on MySQL's AUTO_INCREMENT feature for the id for a table, how > can I reliably retrieve the ID of an item I just entered into the database? > > For instance, I have a table that stores first nam

RE: Database IDs

2005-11-10 Thread Logan, David (SST - Adelaide)
, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -Original Message- From: Robert Crowell [mailto:[EMAIL PROTECTED] Sent: Friday, 11 November 2005 4:10 PM To: mysql@lists.mysql.com Subject: Database IDs Hello, If I am relying on MySQL&#

Database IDs

2005-11-10 Thread Robert Crowell
Hello, If I am relying on MySQL's AUTO_INCREMENT feature for the id for a table, how can I reliably retrieve the ID of an item I just entered into the database? For instance, I have a table that stores first names, and has an id field that is generated via AUTO_INCREMENT. However, this id will