MySQL duplicate entry error when no duplicate exists -
EDIT: I get an error putting me down, at every time, no matter what I try to insert Was my table corrupted or something? Anyway, my question is:
I have a MySQL table
create table 'ACPCinfig' (`nsssiid`t (11) tap default '0',` Seepi_aidi `int (11) nOT NULL default '0',` run_date` nOT NULL default '0000-00-00', `hw_5_threshold` tinyint (1) not NULL default '0',` stp_on` tinyint (1) not on NULL default '0', `sort_on` tinyint (1) not NULL default '0',` afcs_ocr_message_format` tinyint (1) not NULL default '0', `use_hw` tinyint (1) not NULL default '0',` test_mode `Tinyint (1) not NULL default '0',` afcs_version` varchar (255) not null Ifolt ', `acp_build` varchar (255) NOT NULL default',` Id` int (11) NOT NULL auto_increment, `swstp_in_acp_rack` int (11) NOT NULL default '0', `acplookup_id` int (11) NOT NULL default '0', `bfind_cksum` varchar (255) not NULL default ',` tz_cksum` varchar (255) No NULL default' ', `fetched` varchar (4) No NULL default' 'No' ', primary key (` id `), unique key` ndss_id` ( `ndss_id`,` acp_id`, `run_date`), KEY` ndss_a cp` ( `ndss_id`,` acp_id`), KEY `ndss_acp_rundate` (` ndss_id`, `acp_id`, `Run_date`), key` run_date` (`run_date`), key` acplookup_rundate` (`acplookup_id`,` run_date`)) engine = mice d Olt Charsej = latin1
and has around half a million lines I have a simple INSERT
Anksiping in INPETENT (Andisaidi, Seepi_aidi, Rn_det, Acviaiaiaracoacarhold, Steepi_on, Sort_on, I am trying to Afsis_krik_msej_formet, Ugh_acau, Test_mod, Afsisi_warsn, Seepi_bild, Sacpiti_aianapeepiaaraks, Siplukap_aidi, Bifaiandiaksm). , '0', '0', '0', '041709', '2' 9 ',' 0 ',' 1950359846 ');
And this gives me an error
Error 1062 (23000): Duplicate entry of '502831' for key 1
Which means that I am violating my unique obstacle on three fields ndss_id, acp_id, and run_date (id 502831) in my table is not a line and that is the next ID, which was used to insert the row , If used.) The problem is, if I have selected those values with those values
Select from ACP Conflict where ndss_id = 75 and acp_id = 5 and run_date = '2009-07-22';
Then it does not give any results, so I'm not actually duplicating anything. My second keys are all indexed and there are no unique restrictions; I also have a unique obstacle because you can see it with my CREATE TABLE statement. So why is it telling me that I have a duplicate?
Is it possible that in relation to auto_increment on your sequence number id? Try to set the key high and try to insert.
ALTER TABLE AcpConfig AUTO_INCREMENT = 1;
Apparently this will reset the next Auto_ignment to the next highest available value.
Comments
Post a Comment