[BUG: mysqldump incorrectly generates INSERTs for AUTO_INCREMENT columns]

2001-11-23 Thread dima
>Description: Say we have column named id int NOT NULL AUTO_INCREMENT Say we have record, where id=0 (why not?) Say we used mysqldump to backup our table. One day we tryied to restore our table, but we will never get record where id=0 back, becouse rule for AUTO_INCREMENT rows will ap

Re: AUTO_INCREMENT with TYPE = INNODB

2001-11-15 Thread Joe Ellis
thanks. i'll start it with the value i need. it increments after that ;) Heikki Tuuri wrote: > Joe, > > sorry, I did not know AUTO_INCREMENT=... clause does not work with InnoDB. I > will look if it is easy to fix. > > A workaround is that you insert the first row wh

AUTO_INCREMENT with TYPE = INNODB

2001-11-15 Thread Joe Ellis
FYI: im using mysql 3.23.44 auto_increment doesn't seem to work with InnoDB. i've tried to create a table with: create table some_table ( uid INT UNSIGNED AUTO_INCREMENT NOT NULL DEFAULT 1500, user VARCHAR(100) NOT NULL, PRIMARY KEY (uid), UNIQUE KEY (uid) ) TYPE=INN

RE: dropping auto_increment PK/Index

2001-11-15 Thread Carsten H. Pedersen
> Hi, > > Is it possible to drop an auto_increment column index or primary key to > boost performance for bulk inserts? It seems mysql requires auto_increment > columns to be a key at all times. > > Here is the error message: > > Incorrect table definition; There can

Re: dropping auto_increment PK/Index

2001-11-14 Thread Jason Brooke
Maybe you could try insert delayed - Original Message - From: "Wilfred Li, Ph.D." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 15, 2001 9:17 AM Subject: dropping auto_increment PK/Index > Hi, > > Is it possible to drop an auto_in

dropping auto_increment PK/Index

2001-11-14 Thread Wilfred Li, Ph.D.
Hi, Is it possible to drop an auto_increment column index or primary key to boost performance for bulk inserts? It seems mysql requires auto_increment columns to be a key at all times. Here is the error message: Incorrect table definition; There can only be one auto column and it must be

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

Re: auto_increment counter changes even if query fails

2001-11-12 Thread Heikki Tuuri
Maciek, >Hi, > >Is this correct for MySQL to increment the auto_increment counter if the >INSERT query fails? For example: > >mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT >NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; >Query OK, 0 rows a

auto_increment counter changes even if query fails

2001-11-12 Thread Maciek Dobrzanski
Hi, Is this correct for MySQL to increment the auto_increment counter if the INSERT query fails? For example: mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB; Query OK, 0 rows affected (0.25 sec) mysql> INSERT INT

RE: String composite key vs auto_increment

2001-11-09 Thread Christian Stromberger
> > Disclaimer: SQL/database newbie here. > > Nothing wrong with being a newbie :-) Thanks for the help. > > Let's say I have a table of authors with columns for last name and first > > name. Is there any general guideline re using a separate > integer for the > > primary key as opposed to a co

RE: String composite key vs auto_increment

2001-11-08 Thread Steve Meyers
> That's not really true. You can use an auto_increment field as the primary > key and create a seperate UNIQUE index that combines both the firstname and > lastname fields that will be inforced for inserts. > Usually its easier to work with integers as primary keys, espe

Re: String composite key vs auto_increment

2001-11-08 Thread Steve Meyers
" > > authors that are different people. I only want to associate an author name > > with a book. > > The column you seek is an integer column with the auto_increment flag, e.g.: > > CREATE TABLE authors ( > last_name char(64) DEFAULT '' NOT NULL, > f

RE: String composite key vs auto_increment

2001-11-08 Thread Carsten H. Pedersen
> Disclaimer: SQL/database newbie here. Nothing wrong with being a newbie :-) > Let's say I have a table of authors with columns for last name and first > name. Is there any general guideline re using a separate integer for the > primary key as opposed to a combination of the last and first nam

Re: String composite key vs auto_increment

2001-11-08 Thread Bill Adams
ame > with a book. The column you seek is an integer column with the auto_increment flag, e.g.: CREATE TABLE authors ( last_name char(64) DEFAULT '' NOT NULL, first_name char(64) DEFAULT '' NOT NULL, author_idx integer NOT NULL AUTO_INCREMENT, PRIMARY KEY( author_idx ),

RE: String composite key vs auto_increment

2001-11-08 Thread Chris Book
That's not really true. You can use an auto_increment field as the primary key and create a seperate UNIQUE index that combines both the firstname and lastname fields that will be inforced for inserts. Usually its easier to work with integers as primary keys, especially when you reference

String composite key vs auto_increment

2001-11-08 Thread Christian Stromberger
Disclaimer: SQL/database newbie here. Let's say I have a table of authors with columns for last name and first name. Is there any general guideline re using a separate integer for the primary key as opposed to a combination of the last and first names as the key? I ask because by using the name

Re: Auto_increment

2001-11-05 Thread Ireneusz Piasecki
Hi. The behaviour of auto_increment is strange or it's a bug. All is, what are you described above. delete from t1; this command deletes all records and auto_increment will be 1, but if i use mysql-max (3.23.43 with innoDB - all in my.ini is set to handle innoDB) delete from t1; l

Auto_increment

2001-10-31 Thread Ireneusz Piasecki
HI everybody. I saw, when i delete all records from the table where id is primary key and auto_increment, the first number for id is'nt 1 but next in a row (the last was 5 the next will be 6). Can i change this behavior ? Mybe in file my.ini ? The goal is, that when i delete all records

RE: can auto_increment wrap?

2001-10-29 Thread Carsten H. Pedersen
> Chris Bolt wrote: > > > Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM > > tables will give you "Duplicate entry" errors if you hit the maximum. > > I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests &

RE: can auto_increment wrap?

2001-10-29 Thread Chris Bolt
> > Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM > > tables will give you "Duplicate entry" errors if you hit the maximum. > > I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests > ISAM tables also returned

Re: can auto_increment wrap?

2001-10-29 Thread David Felio
Chris Bolt wrote: > Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM > tables will give you "Duplicate entry" errors if you hit the maximum. I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests ISAM tables also returned a &q

Re: can auto_increment wrap?

2001-10-27 Thread Dan Nelson
In the last episode (Oct 27), D Campbell said: > quickie: can auto_increment wrap? > > I have a system that uses mysql for temporary storage of data. The > records are kept unique in the usual lazy man's way of having an > auto_increment ID field. > > A large num

RE: can auto_increment wrap?

2001-10-27 Thread Chris Bolt
> quickie: can auto_increment wrap? Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM tables will give you "Duplicate entry" errors if you hit the maximum. - Before posting, please c

can auto_increment wrap?

2001-10-27 Thread D Campbell
quickie: can auto_increment wrap? I have a system that uses mysql for temporary storage of data. The records are kept unique in the usual lazy man's way of having an auto_increment ID field. A large number of records come and go from this database. At SOME point in the future, the in

RE: newbie question AUTO_INCREMENT

2001-10-18 Thread Jindo Soul
Hi, There is no AUTO_INCREMENT() function. AUTO_INCREMENT is a directive that you specify when you create a table. Try this: CREATE TABLE test ( Id int unsigned not null auto_increment, primary key (id) ); INSERT INTO test VALUES (NULL), (NULL), (NULL), (NULL), (NULL); SELECT * FROM

RE: Alphabetical AUTO_INCREMENT?

2001-09-23 Thread Don Read
On 23-Sep-2001 Neil Silvester wrote: > > How do I convert (or create from scratch) a table who's AUTO_INCREMENT > column would be a, b, c, d, e and so forth up to z? > At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really > be able to make good use i

Re: Alphabetical AUTO_INCREMENT?

2001-09-23 Thread Carl Troein
Neil Silvester writes: > How do I convert (or create from scratch) a table who's AUTO_INCREMENT > column would be a, b, c, d, e and so forth up to z? > At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really > be able to make good use in my queries i

Alphabetical AUTO_INCREMENT?

2001-09-23 Thread Neil Silvester
How do I convert (or create from scratch) a table who's AUTO_INCREMENT column would be a, b, c, d, e and so forth up to z? At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really be able to make good use in my queries if this column was alphabetical instead. Thanks.

RE: reset auto_increment?

2001-09-17 Thread Paul DuBois
At 3:15 PM -0400 9/17/01, Jay Fesco wrote: > > Can someone tell me how to reset a column's auto_increment starting point >> back to 0 in mysql ? >> >> Thanks >> >> Paul >> >According to Paul DuBois on page 169 of MySQL by New Riders (whi

RE: reset auto_increment?

2001-09-17 Thread Jay Fesco
> Can someone tell me how to reset a column's auto_increment starting point > back to 0 in mysql ? > > Thanks > > Paul > According to Paul DuBois on page 169 of MySQL by New Riders (which you should buy): ALTER TABLE t DROP i, ADD i INT UNSIGNED AUTO_INCR

reset auto_increment?

2001-09-17 Thread Paul Reilly
Can someone tell me how to reset a column's auto_increment starting point back to 0 in mysql ? Thanks Paul - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysq

Please help - primary key column's auto_increment feature is going wild

2001-09-05 Thread David Potter
Hello, I have a mysql database with a table called "cust". The primary key column custid is of type int and has the auto_increment feature which has been working perfectly for months. The auto_increment feature set numbers as high as 21700.But suddenly, it started over, setti

Re: auto_increment

2001-08-31 Thread Jeremy Zawodny
On Fri, Aug 31, 2001 at 04:07:14PM -0500, Tony Bibbs wrote: > > can anyone tell me why an auto increment field would jump from 231 > to something large like 883607 and then give me failure on future > insertions because of a duplicate key? Sounds like a corrupt index. > I'm running mysql 3.23.39

auto_increment

2001-08-31 Thread Tony Bibbs
can anyone tell me why an auto increment field would jump from 231 to something large like 883607 and then give me failure on future insertions because of a duplicate key? I'm running mysql 3.23.39 on RH 7.1 --Tony - Before po

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
impossible due to uniqueness constraints. What auto_increment does is this: "When you insert a value of NULL (recommended) or 0 into an AUTO_INCREMENT column, the column is set to value+1, where value is the largest value for the column currently in the table." //C -- Carl Troein - Cí

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: Updating auto_increment ID Column/Selecting Duplicate Rows

2001-08-28 Thread Daniel Von Fange
This would give you a list of all users that have entered things more than once; However, it would not give you all the rows that are duplicated. SELECT Count(User) from mail_form2 GROUP BY User HAVING Count(User) > 1 Hope this helps! Daniel Von Fange -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Re: Updating auto_increment ID Column/Selecting Duplicate Rows

2001-08-28 Thread Gerald Clark
y for my tables: > > "id int(10) unsigned NOT NULL auto_increment," > > now, when i have to clean up items in my tables, like when users have > sent off a .html form multiple times and i want to delete duplicate > submissions, how can i quickly & easily update

Updating auto_increment ID Column/Selecting Duplicate Rows

2001-08-28 Thread Tom Churm
hi, i have 2 questions that i badly need answered. i use phpmyadmin, but any answers containing SQL syntax should work in this app... 1) this should be simple but i don't know it. i use the following mysql table field as the Key for my tables: "id int(10) unsigned NOT NULL auto

Data import sticks on auto_increment?

2001-08-17 Thread Nelson Goforth
7; for key 1 Field def: record_id SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY ; There is no duplicate record_id '102', but I'm concerned that, since the data in the text file is not in record_id order, that the AUTO_INCREMENT option I've assigned to record_id may be causing the p

Re: auto_increment vs. heap tables

2001-08-16 Thread Eduardo J. Vega Arguedas
ot;Andrew Schmidt" <[EMAIL PROTECTED]> >Cc: <[EMAIL PROTECTED]> >Sent: Thursday, August 16, 2001 12:50 PM >Subject: Re: auto_increment vs. heap tables > > > > Uh oh... Please NO. I want the standard _FAST_ auto_increment, not this. > > "select max(id

Re: auto_increment vs. heap tables

2001-08-16 Thread Andrew Schmidt
#x27;" <[EMAIL PROTECTED]> Sent: Thursday, August 16, 2001 1:02 PM Subject: RE: auto_increment vs. heap tables > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Except, if you have a table like so: > > ++-+ > | id | num | > ++-+ > |

Re: auto_increment vs. heap tables

2001-08-16 Thread Andrew Schmidt
ct the max(sess_id). well anyway, sorry I couldn't help more. thanks, -- Andrew - Original Message - From: "Leos Bitto" <[EMAIL PROTECTED]> To: "Andrew Schmidt" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, August 16, 2001 12:50 PM

Re: auto_increment vs. heap tables

2001-08-16 Thread Leos Bitto
Uh oh... Please NO. I want the standard _FAST_ auto_increment, not this. "select max(id) from table x" is terribly inefficient. And the table is locked during this operation... That's just not acceptable for me. Anyway, thanks for the response. It was the second one. Leos On T

Re: auto_increment vs. heap tables

2001-08-16 Thread Andrew Schmidt
id recieved from the select. so doing it manually with heap tables seems quite feasable just a little extra work. thanks, -- Andrew - Original Message - From: "Leos Bitto" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 14, 2001 6:05 AM Subject: a

Re: auto_increment vs. heap tables

2001-08-16 Thread Leos Bitto
e MySQL manual (applause > > here, please!) I know that auto_increment cannot be used there. > > This hurts me a lot, and given that MySQL doesn't support sequences, > > it nearly prohibits the usage of heap tables in my application. > > You do know that HEAP table

Re: auto_increment vs. heap tables

2001-08-15 Thread Jeremy Zawodny
n MySQL. Because I have read the MySQL manual (applause > here, please!) I know that auto_increment cannot be used there. > This hurts me a lot, and given that MySQL doesn't support sequences, > it nearly prohibits the usage of heap tables in my application. You do know that HEAP ta

auto_increment vs. heap tables

2001-08-14 Thread Leos Bitto
Hello, I am currently changing a simple PHP4-based application from PostgreSQL 7.1 to MySQL 3.23. I have some tables in the database which I would like to create as TYPE=HEAP in MySQL. Because I have read the MySQL manual (applause here, please!) I know that auto_increment cannot be used there

Re: Zerofill Auto_Increment

2001-08-08 Thread Grigory Bakunov
Date |Tue, 07 Aug 2001 13:59:05 -0500 >From |[EMAIL PROTECTED] Hello! M> Hi All, M> Not sure if this is a bug or just a standard behavior of a auto_increment M> zerofill column. M> I have a column in a MySQL database table assigned as such: M> memid int(8) auto_increment ze

Re: Zerofill Auto_Increment

2001-08-07 Thread mickalo
Thanks Paul, That works fine. :) >>On Tue, 7 Aug 2001 16:12:16 -0500, Paul DuBois <[EMAIL PROTECTED]> wrote: >>>Hi All, >>> >>>Not sure if this is a bug or just a standard behavior of a auto_increment >>>zerofill column. >>> >

Re: Zerofill Auto_Increment

2001-08-07 Thread Paul DuBois
At 1:25 PM -0500 8/7/01, [EMAIL PROTECTED] wrote: >Hi All, > >Not sure if this is a bug or just a standard behavior of a auto_increment >zerofill column. > >I have a column in a MySQL database table assigned as such: > >memid int(8) auto_increment zerofill primary key, &

Zerofill Auto_Increment

2001-08-07 Thread mickalo
Hi All, Not sure if this is a bug or just a standard behavior of a auto_increment zerofill column. I have a column in a MySQL database table assigned as such: memid int(8) auto_increment zerofill primary key, now when the a new row is inserted in fills the column with the appropriate 0's

Zerofill Auto_Increment

2001-08-07 Thread mickalo
Hi All, Not sure if this is a bug or just a standard behavior of a auto_increment zerofill column. I have a column in a MySQL database table assigned as such: memid int(8) auto_increment zerofill primary key, now when the a new row is inserted in fills the column with the appropriate 0's

Re: sequences or auto_increment column????

2001-07-27 Thread Dennis Salguero
I prefer to use Auto_Increment for ease of use. In addition, I don't think that MySQL supports sequences outright (like you may be used to with Oracle). There are some workarounds availabe within the MySQL manual, do a search with "sequences". Goo

sequences or auto_increment column????

2001-07-27 Thread Siomara Pantarotto
Does anybody know which approach is better with mysql: Create sequences for tables or an auto_increment columns??? and why??? Siomara _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

RE: AUTO_INCREMENT problem in table

2001-07-25 Thread Carsten H. Pedersen
> Dear Peter, > > > Even if i delete the record where id=65535 > > DELETE FROM cust WHERE id=65535 > > AUTO_INCREMENT starts with 65535 and i cant add any more records. > > Sad, but true, MySQL "remembers" the biggest number inserted into an > auto

Re: AUTO_INCREMENT problem in table

2001-07-25 Thread ryc
ay, July 25, 2001 12:15 PM Subject: Re: AUTO_INCREMENT problem in table > Dear Peter, > > > Even if i delete the record where id=65535 > > DELETE FROM cust WHERE id=65535 > > AUTO_INCREMENT starts with 65535 and i cant add any more records. > > Sad, but true, MySQL &qu

Re: AUTO_INCREMENT problem in table

2001-07-25 Thread Stefan Hinz
Dear Peter, > Even if i delete the record where id=65535 > DELETE FROM cust WHERE id=65535 > AUTO_INCREMENT starts with 65535 and i cant add any more records. Sad, but true, MySQL "remembers" the biggest number inserted into an auto_increment column. If you delete the row in

Re: AUTO_INCREMENT problem in table

2001-07-25 Thread Paul DuBois
At 4:47 PM +0200 7/25/01, Peter Wiherkoski wrote: >Hi, got a problem: > >My table (part of it) looks like this: >CREATE TABLE cust ( >id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, >name CHAR(30) NOT NULL, >PRIMARY KEY (id) >); > >When i type >INSERT INTO cust VA

AUTO_INCREMENT problem in table

2001-07-25 Thread Peter Wiherkoski
Hi, got a problem: My table (part of it) looks like this: CREATE TABLE cust ( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (id) ); When i type INSERT INTO cust VALUES(NULL,"Peter"); the value of id will increase by 1 every time i insert a r

Re: auto_increment, is this a bug?? Where to report it?

2001-07-23 Thread Werner Stuerenburg
We had this discussion here a couple of days ago. There are versions of MySQL who behave this way, but it is mostly not considered the correct way. So you may as well get used to the idea that an autoincremented field is doomed to increment no matter what. > That got me thinking...say you have a

Re: auto_increment, is this a bug?? Where to report it?

2001-07-23 Thread William N. Zanatta
Well David, Using MyISAM tables, you would get 501 'cos the auto_increment pointer continues adding and never subtracts, but with ISAM tables, you would get 500. So take care of what type of table you are using and don't get bored as I've got. Best regards, Wil

Re: auto_increment, is this a bug?? Where to report it?

2001-07-23 Thread david jarvis
o I get > > a > > > table like this... > > > ++ > > > | Edicao | > > > ++ > > > | 1 | > > > | 2 | > > > | 4 | > > > > This is not a bug, it's a feature. Assume something like "staf

Re: auto_increment, is this a bug?? Where to report it?

2001-07-23 Thread david jarvis
> > ++ > > | Edicao | > > ++ > > | 1 | > > | 2 | > > | 4 | > > This is not a bug, it's a feature. Assume something like "staff number" > being an auto_increment column. Staff # 1234 gets

Re: auto_increment, is this a bug?? Where to report it?

2001-07-23 Thread Stefan Hinz
This is not a bug, it's a feature. Assume something like "staff number" being an auto_increment column. Staff # 1234 gets layed off, all the payments are cancelled, no holidays for # 1234 any more etc. Now, a new employee gets the "empty" staff number 1234. He will never

Re: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread William N. Zanatta
OK, I found some... >From the manual at "MyISAM tables"... "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 (at least 10

Re: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread Werner Stuerenburg
> The problem is...if I delete the third entry (Edicao = 3), the next > entry inserted should be 3, right?! Well it is not! It is 4. Well, this may be debated. I suffered a lot from the behaviour you want to have. I considered it bad design ... An autoincrement field should not serve for counti

Re: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread William N. Zanatta
aining the maximum value for an AUTO_INCREMENT > column, the value will be reused with an ISAM, or BDB table but not with a > MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM > table_name (without a WHERE) in AUTOCOMMIT mode, the sequence starts over > for all

Re: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread Joshua J. Kugler
It is not a bug, it is a bug fix. The auto_increment is based on the last number used. It is not supposed to decrement. j- k- On Friday 20 July 2001 11:53, William N. Zanatta wrote: > Hello guys... > > I'm having problem with the auto_increment feature. > I have

RE: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread Ravi Raman
hi. from the manual: If you delete the row containing the maximum value for an AUTO_INCREMENT column, the value will be reused with an ISAM, or BDB table but not with a MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM table_name (without a WHERE) in AUTOCOMMIT mode

Re: auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread Dibo Chen
Well, it's a feature not a bug, and you are right too. auto_increment remembers the last value and keeps increasing it, no matter how many "holes" are created. So when use it, better to create a status column to change flag as deleted other than real delete it. "Willi

auto_increment, is this a bug?? Where to report it?

2001-07-20 Thread William N. Zanatta
Hello guys... I'm having problem with the auto_increment feature. I have a table like this... ++-+--+-+++ | Field | Type| Null | Key | Default|

Re: mysqldump loses auto_increment

2001-07-17 Thread Gerald R. Jensen
d with a number one digit lower than your desired beginning number. The next record will start where you want it. - I think you can also use the INSERT_ID = # command in later versions of MySQL. The next record should auto_increment from the number you specify. A note of caution ... if you are ins

Re: mysqldump loses auto_increment

2001-07-17 Thread Paul DuBois
At 11:03 PM +0200 7/17/01, Alexander Skwar wrote: >So sprach »Warren van der Merwe« am 2001-07-17 um 22:31:02 +0200 : >> in my plain language there it is, but the pro's may give a more detailed >> approach. > >Yeah, that's sorta how I understand it as well. Also auto_increments >BREAK when you

Re: mysqldump loses auto_increment

2001-07-17 Thread Alexander Skwar
So sprach »Warren van der Merwe« am 2001-07-17 um 22:31:02 +0200 : > in my plain language there it is, but the pro's may give a more detailed > approach. Yeah, that's sorta how I understand it as well. Also auto_increments BREAK when you manually insert a row and set the column with the auto_inc

RE: mysqldump loses auto_increment

2001-07-17 Thread Warren van der Merwe
der Merwe Software Director PRT Trading (Pty) Ltd t/a RedTie Durban, South Africa Cell (+27-83) 262-9163 Office (+27-31) 767-0249 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > ]On Behalf > Of Alexander Skwar > Sent: 17 July 2001 21:58 &g

mysqldump loses auto_increment

2001-07-17 Thread Alexander Skwar
Hello. I've just created a table with a auto_increment column. I then did ALTER TABLE tbl AUTO_INCREMENT=4711; Now, when I insert one row into this table, it get's 4711 as the auto_increment column's value. However, dumping this table with mysqldump --opt DB tbl loses the

Re: auto_increment not incrementing

2001-07-12 Thread Mike Mike
ke" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, July 12, 2001 5:18 > Subject: auto_increment not incrementing > > > > Hello, > > When I submit data it will not submit data into > the > > database unless I put some kind of num

RE: auto_increment not incrementing

2001-07-11 Thread Chris Bolt
What error did you get? Did you try using NULL for the id, or leaving the auto_increment column out of the insert (insert into table (PartNumber, ..., StatusQtyWorked) values (...))? > Hello, > When I submit data it will not submit data into the > database unless I put some kind of numb

Re: auto_increment not incrementing

2001-07-11 Thread Rolf Hopkins
In what way doesn't it work? Works fine for me. - Original Message - From: "Mike Mike" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 12, 2001 5:18 Subject: auto_increment not incrementing > Hello, > When I submit data it will no

auto_increment not incrementing

2001-07-11 Thread Mike Mike
, DateNextQtyComplete VARCHAR(10) NOT NULL, StatusQtyWorked VARCHAR(10) NOT NULL, ID INT(5) NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID) ); Does anyone know why the auto_increment doesn't work? I'm using mysql Ver 8.0 Distrib 3.22.32, for pc-linux-gnu on i686 Thanks yo

Re: re-sorting auto_increment fields

2001-07-08 Thread tj marlin
ing an unsigned >>bigint (0 - 2**64-1) >>note i said postpone, not eliminate. > >Have you done calculations, how long it takes to reuse all id-s? I have >done :). I bet that auto_increment field will be still young, fresh and >alive even when this application is already dead

Re: re-sorting auto_increment fields

2001-07-07 Thread Tonu Samuel
tj marlin wrote: > you can postpone this problem for a very long time by using an unsigned > bigint (0 - 2**64-1) > note i said postpone, not eliminate. Have you done calculations, how long it takes to reuse all id-s? I have done :). I bet that auto_increment field will be still you

Re: re-sorting auto_increment fields

2001-07-07 Thread tj marlin
is really broken. you can postpone this problem for a very long time by using an unsigned bigint (0 - 2**64-1) note i said postpone, not eliminate. hth At 11:31 PM 7/7/01 +0100, you wrote: >Hi >ANy idea how i can get my auto_increment fields to renumber themselves >after deletion of r

Re: re-sorting auto_increment fields

2001-07-07 Thread Justin Farnsworth
Thank goodness this is the position. If the capability of reordering the auto_increment existed, we could potentially have all of our databases broken by some inadvertant finger trouble. As you mentioned, there are better ways to handle this perceived "problem", which appear

Re: re-sorting auto_increment fields

2001-07-07 Thread Tonu Samuel
Kif wrote: > Hi > ANy idea how i can get my auto_increment fields to renumber themselves after >deletion of records so that they all get re-ordered and run consecutively from 1 to >whatever without any numbers missing ? > Please help if you know how to do this I thin

re-sorting auto_increment fields

2001-07-07 Thread Kif
Hi ANy idea how i can get my auto_increment fields to renumber themselves after deletion of records so that they all get re-ordered and run consecutively from 1 to whatever without any numbers missing ? Please help if you know how to do this Thanks Keith White

how do I reset an auto_increment index to match the number of records in the DB

2001-06-30 Thread patrick
rchar(254) default NULL, comments text, time varchar(100) default NULL, rec int(11) NOT NULL auto_increment, PRIMARY KEY (rec) ) TYPE=MyISAM; # # Dumping data for table 'guestbook' # - Before posting, please check:

Re: AUTO_INCREMENT question...

2001-06-20 Thread Paul DuBois
>I am currently using MySQL to warehouse real-time data, and I have a couple >of questions regarding AUTO_INCREMENT columns. > >OS: Linux/Solaris >MySQL version: 3.23.33 >Table Types: MYISAM > > >1) The data is only stored for 24hrs. If I do continuous deletes

AUTO_INCREMENT question...

2001-06-20 Thread Brad Teale
I am currently using MySQL to warehouse real-time data, and I have a couple of questions regarding AUTO_INCREMENT columns. OS: Linux/Solaris MySQL version: 3.23.33 Table Types: MYISAM 1) The data is only stored for 24hrs. If I do continuous deletes from the tables, will the AUTO_INCREMENT

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 t

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 "update"

2001-06-15 Thread Paul DuBois
gt; >can i somehow easily recreate the auto_increment col if is was not >> >correctly set? >> >i just recognized that most rows contain "1" cause the primary key was >> >set >> >on the auto_increment col + another one. >> >so mysql only

Re: auto_increment "update"

2001-06-15 Thread Sven Huster
On Thu, Jun 14, 2001 at 07:30:01PM -0500, Paul DuBois wrote: > *This message was transferred with a trial version of CommuniGate(tm) Pro* > At 1:36 AM +0200 6/15/01, Sven Huster wrote: > >Hi there > > > >can i somehow easily recreate the auto_increment col if is was no

Re: auto_increment "update"

2001-06-14 Thread Paul DuBois
At 1:36 AM +0200 6/15/01, Sven Huster wrote: >Hi there > >can i somehow easily recreate the auto_increment col if is was not >correctly set? >i just recognized that most rows contain "1" cause the primary key was >set >on the auto_increment col + another one. >so

<    1   2   3   4   5   6   7   >