I came across this error in a script which keep track of interesting URLs,
where the first column in a table is an automatically incrementing,
primary-key Id field.  This statement failed:

mysql> insert into Matches values
(0,1234,56,'http://interesting.com/',  'title', NOW(), 'New');
ERROR 1062: Duplicate entry '6476' for key 1

but this one succeeded (i.e. where I set the Id to something):

insert into Matches values
(11111,1234,56,'http://interesting.com/', 'title', NOW(), 'New');
Query OK, 1 row affected (0.04 sec)

but then when I deleted the row inserted by the second statement and
reissued the first statement, it succeeded.  The table definition looks
like this:

CREATE TABLE Matches (
  Id int(11) NOT NULL auto_increment,
  ClientId int(11) NOT NULL default '0',
  URL char(255) NOT NULL default '',
  Size int(11) NOT NULL default '0',
  Title char(255) NOT NULL default '',
  Found datetime NOT NULL default '0000-00-00 00:00:00',
  Status enum('Unfiled','New','Current','Archive','Ignore') NOT NULL
    default 'Unfiled',
  PRIMARY KEY  (Id)
) TYPE=MyISAM;

Any idea what's going on?  I'm using 3.23.37 if that helps.

-- 
Matthew       > http://www.soup-kitchen.net/
              > ICQ 19482073


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