[kronolith] last git head update constraint violation

Jan Schneider jan at horde.org
Thu Feb 24 16:06:10 UTC 2011


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.

>> Is it a problem of a partial update? Then it's hard to continue..It gives me
>> 1919 constraint violations now.
>> I don't understand the statement about checkTags and which file to open..
>>
>> Dom
>>
>>
>> 2011/2/24 Michael Rubinsky <mrubinsk at horde.org>
>>
>>>
>>> Quoting LALOT Dominique <dom.lalot at gmail.com>:
>>>
>>> Hello Mike
>>>>
>>>> Putting mysql in logging mode:
>>>>                  91 Query     SELECT object_id, object_name FROM
>>>> `rampage_objects` WHERE object_name IN ('
>>>> 20070502100506.1y1yia5ws0n4 at webmel.univmed.fr') AND type_id = 2
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     SELECT user_id, user_name FROM
>>>> `rampage_users` WHERE user_name IN ('bourdin')
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     SELECT tag_id, tag_name FROM `rampage_tags`
>>>> WHERE tag_name IN ('Privé')
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     INSERT INTO `rampage_tagged` (user_id,
>>>> object_id, tag_id, created)
>>>>                                     VALUES
>>>> (14,4790,9,'2011-02-24T09:02:47')
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     SELECT object_id, object_name FROM
>>>> `rampage_objects` WHERE object_name IN ('
>>>> 20070502103754.4yb1afvr9lvk at webmel.univmed.fr') AND type_id = 2
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     SELECT user_id, user_name FROM
>>>> `rampage_users` WHERE user_name IN ('xxx')
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     SELECT tag_id, tag_name FROM `rampage_tags`
>>>> WHERE tag_name IN ('Évènements')
>>>>                  91 Query     SELECT 1
>>>>                  91 Query     INSERT INTO `rampage_tags` (tag_name)
>>>> VALUES
>>>> ('Évènements')
>>>>                  92 Quit
>>>>
>>>> The last INSERT is aborting in constraint violation
>>>>
>>>
>>> Well, the SELECT right before that should have found the tag entry. Not
>>> sure why it's not.
>>>
>>>
>>> I started years ago, so my data are in ISO not in utf8
>>>>
>>>
>>> If you haven't changed anything related to charset, I don't think this
>>> makes a difference since both the INSERT and the SELECT would be  
>>> in the same
>>> charset, right?
>>>
>>>
>>>
>>>> What else can I do?
>>>>
>>>
>>> You could try debugging a bit around the query in _checkTags() that I
>>> pointed to before and see if anything pops up. Other than that,  
>>> I'm honestly
>>> not sure.
>>>
>>> Maybe another dev on list has an idea?
>>>
>>>
>>> Thanks
>>>>
>>>> Dom
>>>>
>>>> 2011/2/23 Michael Rubinsky <mrubinsk at horde.org>
>>>>
>>>>
>>>>> Quoting LALOT Dominique <dom.lalot at gmail.com>:
>>>>>
>>>>> Hello,
>>>>>
>>>>>>
>>>>>> As Horde 4 told me to migrate the database of kronolith, I did that:
>>>>>>
>>>>>> root at horde4:/var/horde#  horde/bin/db_migrate
>>>>>> [  INFO  ] Migrating DB up.
>>>>>> [  INFO  ] Current imp schema version: 2
>>>>>> [  INFO  ] Ending imp schema version: 2
>>>>>> [  INFO  ] Current ingo schema version: 5
>>>>>> [  INFO  ] Ending ingo schema version: 5
>>>>>> [  INFO  ] Current turba schema version: 5
>>>>>> [  INFO  ] Ending turba schema version: 5
>>>>>> [  INFO  ] Current kronolith schema version: 17
>>>>>> 2011-02-23T17:57:31+01:00 INFO: Migrating to
>>>>>> KronolithUpgradeCategoriesToTags (18)
>>>>>> 2011-02-23T17:57:31+01:00 INFO: == 18 KronolithUpgradeCategoriesToTags:
>>>>>> migrating =============================
>>>>>> 2011-02-23T17:57:31+01:00 INFO: == 18 KronolithUpgradeCategoriesToTags:
>>>>>> Migrating event categories. ===========
>>>>>> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
>>>>>> '▒v▒nements' for key 'rampage_tags_tag_name'
>>>>>>
>>>>>> What can I do?
>>>>>>
>>>>>>
>>>>> Hm. I am unable to reproduce this no matter how many duplicate categories
>>>>> I
>>>>> add to the event table. The checks in Content_Tagger should catch this. A
>>>>> query is done to see if the tag name exists already in
>>>>> Content_Tagger::_checkTags(). You will need to find out why that query is
>>>>> not finding the existing entry.
>>>>>
>>>>>
>>>>> mike
>>>>>
>>>>> The Horde Project (www.horde.org)
>>>>> mrubinsk at horde.org
>>>>> --
>>>>> Kronolith mailing list
>>>>> Frequently Asked Questions: http://horde.org/faq/
>>>>> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dominique LALOT
>>>> Ingénieur Systèmes et Réseaux
>>>> http://annuaire.univmed.fr/showuser.php?uid=lalot
>>>>
>>>
>>>
>>> mike
>>>
>>> The Horde Project (www.horde.org)
>>> mrubinsk at horde.org
>>> --
>>> Kronolith mailing list
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org
>>>
>>
>>
>>
>> --
>> Dominique LALOT
>> Ingénieur Systèmes et Réseaux
>> http://annuaire.univmed.fr/showuser.php?uid=lalot
>
>
> mike
>
> The Horde Project (www.horde.org)
> mrubinsk at horde.org
> -- 
> Kronolith mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the kronolith mailing list