Re: auto_increment field behavior

2013-03-13 Thread spameden
2013/3/13 Reindl Harald h.rei...@thelounge.net: Am 12.03.2013 22:34, schrieb spameden: NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row would have pc_id=32768. Please suggest if it's normal behavior or not what do you expect if a PRIMARY KEY record get's removed?

Re: auto_increment field behavior

2013-03-12 Thread spameden
Furthermore I've tested on 133K records and AUTO_INCREMENT field in the end had the value of 234076. mysql select count(*) from billing.phone_codes; +--+ | count(*) | +--+ | 12 | +--+ 1 row in set (0.02 sec) AUTO_INCREMENT=234076 So it basically means If I have

Re: auto_increment field behavior

2013-03-12 Thread spameden
of those are covered here: http://mysql.rjweb.org/doc.php/ricksrots -Original Message- From: spameden [mailto:spame...@gmail.com] Sent: Tuesday, March 12, 2013 2:46 PM To: Rick James Cc: mysql@lists.mysql.com Subject: Re: auto_increment field behavior 2013/3/13 Rick James rja

Re: auto_increment field behavior

2013-03-12 Thread spameden
of those are covered here: http://mysql.rjweb.org/doc.php/ricksrots -Original Message- From: spameden [mailto:spame...@gmail.com] Sent: Tuesday, March 12, 2013 2:46 PM To: Rick James Cc: mysql@lists.mysql.com Subject: Re: auto_increment field behavior 2013/3/13 Rick James rja

Re: auto_increment field behavior

2013-03-12 Thread spameden
Subject: Re: auto_increment field behavior 2013/3/13 Rick James rja...@yahoo-inc.com: What settings? (innodb_autoinc_lock_mode comes to mind, but there may be others.) Hi, Rick. Many thanks for the quick answer here is my settings: mysql show variables like '%inc

RE: auto_increment field behavior

2013-03-12 Thread Rick James
To: mysql@lists.mysql.com Subject: auto_increment field behavior Hi, I'm running MySQL-5.5 on Ubuntu ~ $ mysqld -V mysqld Ver 5.5.29-0ubuntu0.12.04.2 for debian-linux-gnu on x86_64 ((Ubuntu)) Would like to know if it's normal behavior with auto_increment field (tried both signed and unsigned

Re: auto_increment field behavior

2013-03-12 Thread spameden
in set (0.00 sec) It is acceptable, by the definition of AUTO_INCREMENT, for it to burn the missing 15K ids. I don't get this explanation, could you please explain bit more? So it's completely normal for AUTO_INCREMENT field to act like this? -Original Message- From: spameden

RE: auto_increment field behavior

2013-03-12 Thread Rick James
To: Rick James Cc: mysql@lists.mysql.com Subject: Re: auto_increment field behavior 2013/3/13 Rick James rja...@yahoo-inc.com: What settings? (innodb_autoinc_lock_mode comes to mind, but there may be others.) Hi, Rick. Many thanks for the quick answer here is my settings: mysql show

Re: auto_increment field behavior

2013-03-12 Thread spameden
of those are covered here: http://mysql.rjweb.org/doc.php/ricksrots -Original Message- From: spameden [mailto:spame...@gmail.com] Sent: Tuesday, March 12, 2013 2:46 PM To: Rick James Cc: mysql@lists.mysql.com Subject: Re: auto_increment field behavior 2013/3/13 Rick James rja

Re: auto_increment field behavior

2013-03-12 Thread Reindl Harald
Am 12.03.2013 22:34, schrieb spameden: NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row would have pc_id=32768. Please suggest if it's normal behavior or not what do you expect if a PRIMARY KEY record get's removed? re-use the same primary key? this is not the way a

sequential numbering in Auto_Increment Field across two tables

2007-10-11 Thread Stephen Sunderlin
is a primary, Not Null AUTO_INCREMENT field. The issue is that the first auto increment number in the primary key of TableA is the next highest value of the AUTO_INCREMENT field of tableA instead of what I would have suspected was 1. Is this normal. Does it matter. And will this create conflict

auto_increment field start value

2006-09-22 Thread dpgirago
I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. I'm using 4.0.16 and table type=myisam. David -- MySQL General Mailing List For list archives: http

Re: auto_increment field start value

2006-09-22 Thread Dan Buettner
; HTH, Dan On 9/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. I'm using 4.0.16 and table type=myisam. David

Re: auto_increment field start value

2006-09-22 Thread dpgirago
TABLE tbl AUTO_INCREMENT = 100; HTH, Dan On 9/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. I'm using

Re: auto_increment field start value

2006-09-22 Thread dpgirago
On 9/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1),but I can't find an example in the documents. I'm using 4.0.16 and table type=myisam. David

Re: Re: auto_increment field start value

2006-09-22 Thread Dan Buettner
that value with CREATE TABLE or ALTER TABLE, like this: mysql ALTER TABLE tbl AUTO_INCREMENT = 100; HTH, Dan On 9/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one

Re: auto_increment field start value

2006-09-22 Thread Paul DuBois
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. Don't store 0 in an AUTO_INCREMENT column. -- Paul DuBois

Re: auto_increment field start value

2006-09-22 Thread dpgirago
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote: I seem to recall that when creating a table, you could designate an auto_increment field to begin counting at zero(0) instead of one (1), but I can't find an example in the documents. Don't store 0 in an AUTO_INCREMENT column. Thanks Dan

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Egor Egorov
is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row in this table (the 11th) and imediately deleted it. Although, i'd like that the next time i insert a row in this table, it's index be still 11 (not 12 as mysql

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Paul DuBois
PROTECTED] escreveu: At 12:27 -0300 4/29/04, Leandro Melo wrote: Hi, i got a table wich its pk is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row in this table (the 11th) and imediately deleted it. Although, i'd like

Command for getting back an auto_increment field?

2004-04-29 Thread Leandro Melo
Hi, i got a table wich its pk is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row in this table (the 11th) and imediately deleted it. Although, i'd like that the next time i insert a row in this table, it's index

Re: Command for getting back an auto_increment field?

2004-04-29 Thread Paul DuBois
At 12:27 -0300 4/29/04, Leandro Melo wrote: Hi, i got a table wich its pk is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row in this table (the 11th) and imediately deleted it. Although, i'd like that the next time i

Re: Command for getting back an auto_increment field?

2004-04-29 Thread Josh Trutwin
On Thu, 29 Apr 2004 12:27:46 -0300 (ART) Leandro Melo [EMAIL PROTECTED] wrote: Hi, i got a table wich its pk is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row in this table (the 11th) and imediately deleted

Re: Command for getting back an auto_increment field?

2004-04-29 Thread Leandro Melo
If it`s a InnoDB table :-? my case --- Paul DuBois [EMAIL PROTECTED] escreveu: At 12:27 -0300 4/29/04, Leandro Melo wrote: Hi, i got a table wich its pk is an auto_increment field. I have 10 elements in this table, wich makes the pk_id field = 10. I inserted incorrectly anoter row

Re: Resetting auto_increment field in an INNODB table

2004-01-28 Thread Egor Egorov
Hassan Shaikh [EMAIL PROTECTED] wrote: Hi, How do I reset an AUTO_INCREMENT column? My table type is InnoDB and the method mentioned in the manual is not applicable. I am using MySQL 4.0.17. If you want to start auto_increment sequence with value bigger than current counter value, you can

Re: Resetting auto_increment field in an INNODB table

2004-01-28 Thread Chris Boget
How do I reset an AUTO_INCREMENT column? My table type is InnoDB and the method mentioned in the manual is not applicable. I am using MySQL 4.0.17. Otherwise you should recreate the table. Or, if you no longer need any of the data, simply use TRUNCATE. Chris -- MySQL General Mailing

Re: Resetting auto_increment field in an INNODB table

2004-01-28 Thread Egor Egorov
Chris Boget [EMAIL PROTECTED] wrote: How do I reset an AUTO_INCREMENT column? My table type is InnoDB and the method mentioned in the manual is not applicable. I am using MySQL 4.0.17. Otherwise you should recreate the table. Or, if you no longer need any of the data, simply use

Resetting auto_increment field in an INNODB table

2004-01-26 Thread Hassan Shaikh
Hi, How do I reset an AUTO_INCREMENT column? My table type is InnoDB and the method mentioned in the manual is not applicable. I am using MySQL 4.0.17. Thanks. Hassan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Retrieving value of auto_increment field from SQL at time of insert

2003-02-20 Thread Dubery
Hi all, I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I build up an sql INSERT command (I'm

RE: Retrieving value of auto_increment field from SQL at time of insert

2003-02-20 Thread John W. Holmes
I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I build up an sql INSERT command (I'm

Re: Retrieving value of auto_increment field from SQL at time ofinsert

2003-02-20 Thread Paul DuBois
At 22:45 +0200 2/20/03, Dubery wrote: Hi all, I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I

Re: Fix holes in auto_increment field

2002-07-05 Thread Patrick Sherrill
... [EMAIL PROTECTED] - Original Message - From: Toni Viemero [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 05, 2002 6:04 AM Subject: Fix holes in auto_increment field Hello, I've got test -table with id field as auto_increment int(11) and deleted some records from here

Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Hi, I have a database with the following table and data: When I add a new record the auto_increment number becomes '2147483647' not sure why? Checked the SHOW TABLE STATUS too and this shows that the next auto_increment number will be '2147483647' anyone know why? Running MySQL 3.23.41

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Fred van Engen
Bobby, On Wed, Jun 05, 2002 at 12:30:17PM +0200, Bobby Oswald wrote: I have a database with the following table and data: When I add a new record the auto_increment number becomes '2147483647' not sure why? Checked the SHOW TABLE STATUS too and this shows that the next auto_increment

RE: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Removed all the negative values and the same problem still occurs -Original Message- From: Fred van Engen [mailto:[EMAIL PROTECTED]] Sent: 05 June 2002 12:50 To: [EMAIL PROTECTED] Subject: Re: Problem when inserting a record - auto_increment field gets max integer value instead

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Fred van Engen
To: [EMAIL PROTECTED] Subject: Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id Bobby, On Wed, Jun 05, 2002 at 12:30:17PM +0200, Bobby Oswald wrote: I have a database with the following table and data: When I add a new record

RE: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Cool, no negatives reset the key and it works, thanks, -Original Message- From: Bobby Oswald Sent: 05 June 2002 13:50 To: Fred van Engen; [EMAIL PROTECTED] Subject: RE: Problem when inserting a record - auto_increment field gets max integer value instead of next id Removed

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Egor Egorov
will be '2147483647' anyone know why? BO Running MySQL 3.23.41 It happened because you have specified a negative value for auto_increment field. BO Regards, BO Bobby -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http

Changing auto_increment field in mysql to start at 1000

2001-08-29 Thread Armando Cerna
I tried this: update customers set row_id='1000' where row_id='1'; but that only changed the one field in the table and the other ones stayed the same =(. Could someone please tell me the correct way to do this Armando -

Re: Changing auto_increment field in mysql to start at 1000

2001-08-29 Thread Carl Troein
Armando Cerna writes: update customers set row_id='1000' where row_id='1'; but that only changed the one field in the table and the other ones stayed the same =(. Yes, that's the expected behavior when updating one field. Anything else would be a disaster. If what you're trying to do

Re: Changing auto_increment field in mysql to start at 1000

2001-08-29 Thread Sebastiaan J.A. Kamp
, August 29, 2001 11:09 PM Subject: Changing auto_increment field in mysql to start at 1000 I tried this: update customers set row_id='1000' where row_id='1'; but that only changed the one field in the table and the other ones stayed the same =(. Could someone please tell me the correct way

AUTO_INCREMENT FIELD

2001-06-20 Thread Alessandro Coppelli
Hi to all. I have this simple table create table tbl ( sid int not null auto_increment , filed1 LONGTEXT, field2 LONGTEXT, primary key (sid) ) When I insert one item ( insert into tbl values (filed1,filed2) ) I obtain error . Why ? Must I insert the sid ? If yes

Re: AUTO_INCREMENT FIELD

2001-06-20 Thread James Fidell
Quoting Alessandro Coppelli ([EMAIL PROTECTED]): I have this simple table create table tbl ( sid int not null auto_increment , filed1 LONGTEXT, field2 LONGTEXT, primary key (sid) ) When I insert one item ( insert into tbl values (filed1,filed2) ) I obtain