Hi,

I try to insert a new record in a table. The key is an automatic ID.
The insert is refused due to duplicate key, but the key does not
exist. Why ? Is it a bug ?


Any idea ? Some help ?
Thanks

Xavier


Details:

The colums of the table:
+----------------+--------------+------+-----+---------+----------------+
| Field          | Type         | Null | Key | Default | Extra        
| +----------------+--------------+------+-----+---------+----------------+
| EventType      | varchar(64)  | YES  |     | NULL    |              
|
| EventOrigin    | varchar(64)  | YES  |     | NULL    |              
|
| EventText      | varchar(250) | YES  |     | NULL    |              
|
| EventTimeStamp | datetime     | YES  |     | NULL    |              
|
| EventId        | int(11)      |      | PRI | NULL    |
auto_increment |
+----------------+--------------+------+-----+---------+----------------+

Operations tried:

mysql> select count(*) from events;
+----------+
| count(*) |
 +----------+
|    20506 |
+----------+
1 row in set (0.19 sec)
mysql> insert into events set EventType='TEST',EventOrigin='me';
ERROR 1062: Duplicate entry '20507' for key 1
mysql> select * from events where EventId=20507;
Empty set (0.00 sec)



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to