[kronolith] last git head update constraint violation

Michael Rubinsky mrubinsk at horde.org
Thu Feb 24 16:38:07 UTC 2011


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael Rubinsky <mrubinsk at horde.org>:
>
>>
>> Quoting LALOT Dominique <dom.lalot at gmail.com>:
>>
>>> Hello Mickael,
>>>
>>> using the db_migrate --debug
>>> it produces:
>>>
>>>       INSERT INTO `rampage_tagged` (user_id, object_id, tag_id, created)
>>>         VALUES (22,4789,13,'2011-02-24T15:34:46')
>>> 2011-02-24T15:34:46+01:00 DEBUG: SQL
>>>       INSERT INTO `rampage_tagged` (user_id, object_id, tag_id, created)
>>>         VALUES (22,4789,13,'2011-02-24T15:34:46')
>>> 2011-02-24T15:34:46+01:00 DEBUG: SQL  (0.0002s)
>>>       SELECT object_id, object_name FROM `rampage_objects` WHERE
>>> object_name
>>>         IN ('20070502100506.1y1yia5ws0n4 at webmel.univ.fr') AND type_id = 2
>>> 2011-02-24T15:34:46+01:00 DEBUG: SQL  (0.0001s)
>>>       SELECT user_id, user_name FROM `rampage_users` WHERE user_name IN
>>>         ('bourdin')
>>> 2011-02-24T15:34:46+01:00 DEBUG: SQL  (0.0001s)
>>>       SELECT tag_id, tag_name FROM `rampage_tags` WHERE tag_name IN
>>>         ('Priv▒')
>>> 2011-02-24T15:34:46+01:00 ERR: SQL QUERY FAILED: SQLSTATE[23000]: Integrity
>>> constraint violation: 1062 Duplicate entry '14-4790-9' for key 'PRIMARY'
>>
>> Is 14-4709-9 one of your categories or tag names?
>
> Looks like the primary ID of rampage_tagged, which is a composite  
> key. So this would be user_id 14, object_id 4790, tag_id 9.

Ok. If that's the case, Content_Tagger is supposed to ignore this  
exception. See Content_Tagger::tag() lines 118 - 124. Can you put a  
var_dump($e); right before the continue statement on line 122 and see  
what information that provides? Maybe Horde_Db is not catching this  
and throwing a Horde_Db_Exception?

mike

The Horde Project (www.horde.org)
mrubinsk at horde.org


More information about the kronolith mailing list