Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13057

error trying to apply 3.10.1 upgrade sql

    XMLWordPrintable

Details

    Description

      I get an error when trying to apply this line from the 3.10.1 upgrade sql:

      mysql> ALTER TABLE ezcontentobject ADD UNIQUE INDEX ezcontentobject_remote_id(remote_id);ERROR 1062 (23000): Duplicate entry '27437f3547db19cf81a33c92578b2c89' for key 2
      

      The problem appears to be that the index is defined as unique, but there is non-unique data in that field:

      mysql> select remote_id, count(*) as cnt from ezcontentobject group by remote_id having cnt > 1;
      +----------------------------------+-----+
      | remote_id                        | cnt |
      +----------------------------------+-----+
      | 27437f3547db19cf81a33c92578b2c89 |   2 | 
      | 8b8b22fe3c6061ed500fbd2b377b885f |   2 | 
      | 9af939ad3f2e50cf6c6553ebb4e4dee8 |   3 | 
      +----------------------------------+-----+
      3 rows in set (0.03 sec)
      
      mysql> SELECT * FROM ezcontentobject WHERE remote_id IN ('27437f3547db19cf81a33c92578b2c89', '8b8b22fe3c6061ed500fbd2b377b885f', '9af939ad3f2e50cf6c6553ebb4e4dee8');
      +-----------------+-----------------+-----+--------------+------------+-------------------------+----------+------------+----------------------------------+------------+--------+---------------+---------------------+
      | contentclass_id | current_version | id  | is_published | modified   | name                    | owner_id | published  | remote_id                        | section_id | status | language_mask | initial_language_id |
      +-----------------+-----------------+-----+--------------+------------+-------------------------+----------+------------+----------------------------------+------------+--------+---------------+---------------------+
      |              14 |               2 |  52 |            0 | 1129139605 | Common INI settings     |       14 | 1082016591 | 27437f3547db19cf81a33c92578b2c89 |          4 |      1 |             3 |                   2 | 
      |              14 |               1 |  53 |            0 |          0 | New Common ini settings |       14 |          0 | 27437f3547db19cf81a33c92578b2c89 |          4 |      0 |             3 |                   2 | 
      |              15 |               9 |  54 |            0 | 1127972645 | Ban Terminator          |       14 | 1082016652 | 8b8b22fe3c6061ed500fbd2b377b885f |          5 |      1 |             3 |                   2 | 
      |              15 |               1 |  55 |            0 |          0 | New Template look       |       14 |          0 | 8b8b22fe3c6061ed500fbd2b377b885f |          4 |      0 |             3 |                   2 | 
      |               5 |               1 | 200 |            0 | 1128742435 | 125x55                  |       14 | 1128742435 | 9af939ad3f2e50cf6c6553ebb4e4dee8 |          1 |      1 |            15 |                   2 | 
      |               5 |               2 | 201 |            0 | 1128743492 | 468x60                  |       14 | 1128742571 | 9af939ad3f2e50cf6c6553ebb4e4dee8 |          1 |      1 |            15 |                   2 | 
      |               5 |               3 | 202 |            0 | 1128743787 | 728x90                  |       14 | 1128743571 | 9af939ad3f2e50cf6c6553ebb4e4dee8 |          1 |      1 |            15 |                   2 | 
      +-----------------+-----------------+-----+--------------+------------+-------------------------+----------+------------+----------------------------------+------------+--------+---------------+---------------------+
      7 rows in set (0.00 sec)
      

      Thanks
      Matthew

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            matthewc matthewc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: