"Dan Muey" <[EMAIL PROTECTED]> wrote: >> "Dan Muey" <[EMAIL PROTECTED]> wrote: >> > I have a table that I create with=3D20 >> > CREATE TABLE SuperTest ( >> > ID int(11) NOT NULL AUTO_INCREMENT, >> > Name varchar(64) NOT NULL, >> > Domain varchar(64) NOT NULL, >> > PRIMARY KEY(ID) >> > ); >> > I use that same thing to create a the same table on two servers. >> > On one server (mysql Ver 11.16 Distrib 3.23.49, for=20 >> > portbld-freebsd4.6 =3D >> > (i386)) >> > If I add, say five records I get ID to be 1,2,3,4,5. >> > Then I delete ID 5 and insert a new record and it's id is=20 >> 6. So now I =3D >> > have 1,2,3,4,6. >> > That's what I want it to do. >> > However on the other server (mysql version ???) if I have=20 >> 1,2,3,4,5, =3D >> > delete ID 5=3D20 >> > and insert a new one it makes the new one ID 5. I suppose=20 >> because it's =3D >> > the next number. >> >=20 >> > I'm not really even sure what to call it besides 'non reusable =3D=20 >> > auto_increment'. >> >=20 >> > I can't seem to find anything on mysql.com about what settings,=20 >> > version, =3D etc cause it to work either way. >>=20 >> It depends on table types. AUTO_INCREMENT values are reused=20 >> for BDB and ISAM tables and not reused for MyISAM and InnoDB tables. > > Ooooohhhhh cool! > So if I want to reuse them and know 100% they will be reused I=20 > need to specify the type as BDB or ISAM. > And if I want to not reuse them and know 100% for sure they won't=20 > be reused I need to dpescify MyISAM or InnoDB.
Each of table type has it's own advantages and restrictions. They are different not only in usage of AUTO_INCREMENT value. Read more about each table type before choosing table type: http://www.mysql.com/doc/en/Table_types.html > > That's were my problem lay I believe, I never specified the table=20 > type and just let it happen as it felt like. > Lesson learned! Thanks a million! > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]