Re: Problems with auto_increment updating when (i think) it shouldn't

2009-08-07 Thread Proemial
Hmm, that makes sense. I should have thought of that. Thanks! On Fri, Aug 7, 2009 at 12:32 PM, Johnny Withers wrote: > It will also update the auto_increment column when you ROLLBACK a failed > insert: > > mysql> USE test; > Database changed > mysql> SELECT * FROM t1\G > Empty set (0.00 sec) > m

Re: Problems with auto_increment updating when (i think) it shouldn't

2009-08-07 Thread Johnny Withers
It will also update the auto_increment column when you ROLLBACK a failed insert: mysql> USE test; Database changed mysql> SELECT * FROM t1\G Empty set (0.00 sec) mysql> DROP TABLE t1; Query OK, 0 rows affected (0.06 sec) mysql> mysql> CREATE TABLE t1( -> id INT UNSIGNED NOT NULL AUTO_INCREMENT

Problems with auto_increment updating when (i think) it shouldn't

2009-08-07 Thread Proemial
Hey folks. I'm getting some weird behaviour out of Auto_increment. If I enter a attempt to INSERT a row into a table with a UNIQUE index, where the insert would violate uniqueness of existing data, I'm seeing the auto_increment increase even though the insert fails. The server in question is 5.1.

Problems with AUTO_INCREMENT

2001-06-06 Thread Conny Kreyßel
Hi, on my database I have create a table with an ID like this: CREATE TABLE test { id INT(10) unsigned NOT NULL default '0' AUTO_INCREMENT, another INT(10) }; and now I have inserted some values - the ID that would be inserted starts at 1, but I need a ID with 0. How can I set