Re: auto_increment field behavior

2013-03-13 Thread spameden
2013/3/13 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 s

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

Re: auto_increment field behavior

2013-03-12 Thread spameden
t;> If you DELETE the _highest_ id, then restart the server, that id will be >>>> reused. (This is irritating to some people.) Otherwise, a deleted id >>>> will not be reused. >>> >>> I didn't DELETE anything! The only actions I did: >>> &

RE: auto_increment field behavior

2013-03-12 Thread Rick James
, 2013 2:46 PM > To: Rick James > Cc: mysql@lists.mysql.com > Subject: Re: auto_increment field behavior > > 2013/3/13 Rick James : > > What settings? (innodb_autoinc_lock_mode comes to mind, but there > may > > be others.) > Hi, Rick. > > Many thanks for t

Re: auto_increment field behavior

2013-03-12 Thread spameden
ws 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? > >> -Origin

RE: auto_increment field behavior

2013-03-12 Thread Rick James
4 PM > 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 behavi

Re: auto_increment field behavior

2013-03-12 Thread spameden
o: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 : >> > What settings? (innodb_autoinc_lock_mode comes to mind, but the

Re: auto_increment field behavior

2013-03-12 Thread spameden
| 1 | >>> | div_precision_increment | 4 | >>> | innodb_autoextend_increment | 8 | >>> | innodb_autoinc_lock_mode| 1 | >>> +-+---+ >>> 5 rows in set (0.00 sec) >>> >>> >

Re: auto_increment field behavior

2013-03-12 Thread spameden
he TABLE >> 2. used LOAD FILE only via command line (1 thread) >> >> So is it normal or should I fill a bug? >>> >>> There may be more. Most of those are covered here: >>> http://mysql.rjweb.org/doc.php/ricksrots >>> >>> >>>

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 I

sequential numbering in Auto_Increment Field across two tables

2007-10-11 Thread Stephen Sunderlin
7; from TableA. The null column in TableB 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

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'

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. -- P

Re: Re: auto_increment field start value

2006-09-22 Thread Dan Buettner
an AUTO_INCREMENT value other than 1, you can set 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

Re: auto_increment field start value

2006-09-22 Thread dpgirago
;> 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 >>> au

Re: auto_increment field start value

2006-09-22 Thread dpgirago
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 co

Re: auto_increment field start value

2006-09-22 Thread Dan Buettner
NT = 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 4.0.

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 arch

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Paul DuBois
he wrong approach anyway. --- 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 i

Re: Command for getting back an auto_increment field?

2004-04-30 Thread Egor Egorov
gt;> >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 imedia

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 > &g

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 &

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 t

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'

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, sim

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 Mail

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,

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:http://lists.mysql.com/[EMAI

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: 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

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&#

Re: Fix holes in auto_increment field

2002-07-05 Thread Patrick Sherrill
Pat... [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_incremen

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

2002-06-05 Thread Egor Egorov
auto_increment number 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 T

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

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

2002-06-05 Thread Fred van Engen
Sent: 05 June 2002 12:50 > > 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

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

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 n

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 Regard

Re: Changing auto_increment field in mysql to start at 1000

2001-08-29 Thread Sebastiaan J.A. Kamp
IL PROTECTED]> Sent: Wednesday, 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 o

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 d

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: 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 > o

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

auto_increment field

2001-01-26 Thread Rus
Does anyone know how to sort and recreate auto_increment field from, for example, to 1 2 3 4 without creating any additional tables?