List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 5 1999 5:13pm
Subject:Re: MySQL 3.23 & autoincrement
View as plain text  
At 12:41 PM -0400 7/5/1999, Barry wrote:
>Hello All,
>
>I just downloaded the WinNT 3.22.24 and was looking through the new manual
>at the Changes in 3.22.24 section. I came upon the following statement
>about the MyISAM tables planned for 3.23.x.
>
>"Internal handling of one AUTO_INCREMENT column. MyISAM will automatically
>update this on INSERT/UPDATE. The AUTO_INCREMENT value can be reset with
>myisamchk. This will make AUTO_INCREMENT columns faster and old numbers
>will not be reused."
>
>I am happy to see that old numbers will not be re-used, but am I
>miss-reading this? Will an Update on an existing row modify the
>Auto_Increment value? Using an Auto_Increment value as a static db record
>identifier, I would not want this value to be modified once the row is
>Inserted.

You're probably thinking of TIMESTAMP.  AUTO_INCREMENT isn't like that.

By the way, the no-reuse property doesn't seem to be implemented yet.
Try this:

USE test
DROP TABLE IF EXISTS t;
CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY);
INSERT t VALUES(NULL),(NULL);
SELECT * FROM t;
DELETE FROM t;
INSERT t VALUES(NULL),(NULL);
SELECT * FROM t;

I get the same result from both SELECT statements:

+---+
| i |
+---+
| 1 |
| 2 |
+---+

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
SQL join questionWillem Bison11 Mar
  • Re: SQL join questionChristian Mack11 Mar
  • Re: MySQL 3.23 alpha released (problems/fixes)Paul DuBois5 Jul
    • MySQL 3.23 & autoincrementBarry5 Jul
      • Re: MySQL 3.23 & autoincrementPaul DuBois5 Jul
        • Re: MySQL 3.23 & autoincrementMartin Ramsch5 Jul
          • Re: MySQL 3.23 & autoincrementPaul DuBois5 Jul
            • Re: MySQL 3.23 & autoincrementMichael Widenius7 Jul
        • Re: MySQL 3.23 & autoincrementDick Griffin5 Jul
        • Re: MySQL 3.23 & autoincrementMichael Widenius7 Jul
      • MySQL 3.23 & autoincrementMichael Widenius7 Jul