Hey guys - I'm running a piece of software that is making database queries but failing on some of them and I'm trying to figure out why so I can fix it. The table structure for the table where the query fails looks like:
--- create table dspam_token_data ( uid smallint unsigned, token bigint unsigned, spam_hits int, innocent_hits int, last_hit date ) type=MyISAM; create unique index id_token_data_01 on dspam_token_data(uid,token); --- Then a typical query that fails looks like this: Oct 17 15:22:29 fozzie dspam[1060]: query error: Duplicate entry '504-9261611235441802528' for key 1: update dspam_token_data set last_hit = current_date(), spam_hits = spam_hits + 1, innocent_hits = innocent_hits - 0 where uid = 504 and token in(4969289191363969024,5157322189832328960,6543336333207863017,11859958119427079737,11593811100697187954,183694448946905616,6792121364254852560,14691708723743604479,15592576291946632902,11395421438537018704,10268001371065726376,720842269804708066,9738852911221666131,12131027321663899802,7302142392335234946,14242238172346424282,5157322200926387920,13719443997178333207,4870160322091024384,12799248752630108105,4751188209648361746,4541344963299485594,14603129171059807301,4971015824631398400,7971518036279903186,12747031424870854835,9487319413386095040,13913447836044115646,17451437979588156723,9927623417453173202,13662488450238762265,15997550804531139111,5056328520700002304,4773032218118574080,1648593925062866834,3709266648058441096,9872040046217224573,15078128421449940735) (Note that the "in()" is truncated here by me because it's very long...) Can anyone tell me what is happening?? Why would the update fail? The table already has the unique constraint so does this mean that the above query would modify rows in such a way that two rows or more would become identical? Many thanks! --Jo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]