[kronolith] last git head update constraint violation

LALOT Dominique dom.lalot at gmail.com
Fri Mar 4 08:10:11 UTC 2011


Hello,

That's me again. I wiped all my data, get data from production into mysql
again.
Then horde/bin/db_migrate content first (in order to get rampages tables
created)
Then migrate kronolith

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-03-04T08:57:08+01:00 INFO: Migrating to
KronolithUpgradeCategoriesToTags (18)
2011-03-04T08:57:08+01:00 INFO: == 18 KronolithUpgradeCategoriesToTags:
migrating =============================
2011-03-04T08:57:08+01:00 INFO: == 18 KronolithUpgradeCategoriesToTags:
Migrating event categories. ===========
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'▒v▒nements' for key 'rampage_tags_tag_name'

I am no more successfull in geting kronolith working.

Dom

Here is a trace in debug mode:

2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT object_id, object_name FROM `rampage_objects` WHERE
object_name
          IN ('20070502100506.1y1yia5ws0n4 at webmel.univmed.fr') AND type_id =
2
2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT user_id, user_name FROM `rampage_users` WHERE user_name IN
          ('bourdin')
2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT tag_id, tag_name FROM `rampage_tags` WHERE tag_name IN
          ('Privé')
2011-03-04T09:06:52+01:00 ERR: SQL QUERY FAILED: SQLSTATE[23000]: Integrity
constraint violation: 1062 Duplicate entry '14-4778-9' for key 'PRIMARY'
        INSERT INTO `rampage_tagged` (user_id, object_id, tag_id, created)
          VALUES (14,4778,9,'2011-03-04T09:06:52')
2011-03-04T09:06:52+01:00 DEBUG: SQL
        INSERT INTO `rampage_tagged` (user_id, object_id, tag_id, created)
          VALUES (14,4778,9,'2011-03-04T09:06:52')
object(Horde_Db_Exception)#450 (8) {
  ["details"]=>
  NULL
  ["message":protected]=>
  string(99) "SQLSTATE[23000]: Integrity constraint violation: 1062
Duplicate entry '14-4778-9' for key 'PRIMARY'"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(23000)
  ["file":protected]=>
  string(53) "/var/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"
  ["line":protected]=>
  int(546)
  ["trace":"Exception":private]=>
  array(8) {
    [0]=>
    array(6) {
      ["file"]=>
      string(53) "/var/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"
      ["line"]=>
      int(573)
      ["function"]=>
      string(7) "execute"
      ["class"]=>
      string(21) "Horde_Db_Adapter_Base"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(3) {
      array(3) {
        [0]=>
        string(145) "INSERT INTO `rampage_tagged` (user_id, object_id,
tag_id, created)
                                      VALUES
(14,4778,9,'2011-03-04T09:06:52')"
        [1]=>
        NULL
        [2]=>
        NULL
      }
    }
    [1]=>
    array(6) {
      ["file"]=>
      string(33) "/var/horde/content/lib/Tagger.php"
      ["line"]=>
      int(120)
      ["function"]=>
      string(6) "insert"
      ["class"]=>
      string(21) "Horde_Db_Adapter_Base"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(1) {
        [0]=>
        string(145) "INSERT INTO `rampage_tagged` (user_id, object_id,
tag_id, created)
                                      VALUES
(14,4778,9,'2011-03-04T09:06:52')"
      }
    }
    [2]=>
    array(6) {
      ["file"]=>
      string(35) "/var/horde/kronolith/lib/Tagger.php"
      ["line"]=>
      int(66)
      ["function"]=>
      string(3) "tag"
      ["class"]=>
      string(14) "Content_Tagger"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(3) {
        [0]=>
        &string(7) "bourdin"
        [1]=>
        &array(2) {
          ["object"]=>
          string(45) "20070502100506.1y1yia5ws0n4 at webmel.univmed.fr"
          ["type"]=>
          int(2)
        }
        [2]=>
        &array(1) {
          [0]=>
          [0]=>
          string(5) "Privé"
        }
      }
    }
    [3]=>
    array(6) {
      ["file"]=>
      string(72)
"/var/horde/kronolith/migration/18_kronolith_upgrade_categoriestotags.php"
      ["line"]=>
      int(31)
      ["function"]=>
      string(3) "tag"
      ["class"]=>
      string(16) "Kronolith_Tagger"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(3) {
        [0]=>
        &string(45) "20070502100506.1y1yia5ws0n4 at webmel.univmed.fr"
        [1]=>
        &string(5) "Privé"
        [2]=>
        &string(7) "bourdin"
      }
    }
    [4]=>
    array(6) {
      ["file"]=>
      string(55) "/var/horde/framework/Db/lib/Horde/Db/Migration/Base.php"
      ["line"]=>
      int(121)
      ["function"]=>
      string(2) "up"
      ["class"]=>
      string(32) "KronolithUpgradeCategoriesToTags"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [5]=>
    array(6) {
      ["file"]=>
      string(59)
"/var/horde/framework/Db/lib/Horde/Db/Migration/Migrator.php"
      ["line"]=>
      int(174)
      ["function"]=>
      string(7) "migrate"
      ["class"]=>
      string(23) "Horde_Db_Migration_Base"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(1) {
        [0]=>
        &string(2) "up"
      }
    }
    [6]=>
    array(6) {
      ["file"]=>
      string(59)
"/var/horde/framework/Db/lib/Horde/Db/Migration/Migrator.php"
      ["line"]=>
      int(102)
      ["function"]=>
      string(10) "_doMigrate"
      ["class"]=>
      string(27) "Horde_Db_Migration_Migrator"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [7]=>
    array(6) {
      ["file"]=>
      string(31) "/var/horde/horde/bin/db_migrate"
      ["line"]=>
      int(113)
      ["function"]=>
      string(2) "up"
      ["class"]=>
      string(27) "Horde_Db_Migration_Migrator"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
}
2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT object_id, object_name FROM `rampage_objects` WHERE
object_name
          IN ('20070502103754.4yb1afvr9lvk at webmel.univmed.fr') AND type_id =
2
2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT user_id, user_name FROM `rampage_users` WHERE user_name IN
          ('milhaud')
2011-03-04T09:06:52+01:00 DEBUG: SQL  (0.0001s)
        SELECT tag_id, tag_name FROM `rampage_tags` WHERE tag_name IN
          ('Évènements')
2011-03-04T09:06:52+01:00 ERR: SQL QUERY FAILED: SQLSTATE[23000]: Integrity
constraint violation: 1062 Duplicate entry 'Évènements' for key
'rampage_tags_tag_name'
        INSERT INTO `rampage_tags` (tag_name) VALUES ('Évènements')
2011-03-04T09:06:52+01:00 DEBUG: SQL
        INSERT INTO `rampage_tags` (tag_name) VALUES ('Évènements')
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'Évènements' for key 'rampage_tags_tag_name'


2011/2/25 LALOT Dominique <dom.lalot at gmail.com>

> Mickael,
>
> Could you give me the file name where to put this trace. I don't know the
> code orgnization.
>
> Thanks
>
> Dom
>
> 2011/2/24 Michael Rubinsky <mrubinsk at horde.org>
>
>
>> 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
>> --
>> 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
>



-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the kronolith mailing list