Posted by gabble on July 27, 2008 at 1:24pm
8 followers
Jump to:
| Project: | Drupal core |
| Version: | 6.10 |
| Component: | database system |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
update.php gives me lots of errors when trying to update version from 5.9 to version 6.3:
* user warning: Duplicate entry 'musimac-profile-0' for key 2 query: ALTER TABLE blocks CHANGE theme `theme` VARCHAR(64) NOT NULL DEFAULT '', ADD UNIQUE KEY tmd (theme, module, delta), ADD INDEX list (theme, status, region, weight, module) in /var/gabble/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate entry '2-php-0' for key 2 query: ALTER TABLE filters ADD UNIQUE KEY fmd (format, module, delta) in /var/gabble/drupal6/includes/database.mysql-common.inc on line 403.
* user warning: Duplicate entry '2237-0' for key 1 query: ALTER TABLE locales_target ADD PRIMARY KEY (language, lid, plural) in /var/gabble/drupal6/includes/database.mysql-common.inc on line 374.
* user warning: Duplicate entry '214-0-151.49.228.123' for key 1 query: ALTER TABLE poll_votes ADD PRIMARY KEY (nid, uid, hostname) in /var/gabble/drupal6/includes/database.mysql-common.inc on line 374.
* user warning: Duplicate entry '6-2' for key 1 query: ALTER TABLE profile_values ADD PRIMARY KEY (uid, fid) in /var/gabble/drupal6/includes/database.mysql-common.inc on line 374.And short after:
Update #6043
* Failed: ALTER TABLE {blocks} CHANGE theme `theme` VARCHAR(64) NOT NULL DEFAULT '', ADD UNIQUE KEY tmd (theme, module, delta), ADD INDEX list (theme, status, region, weight, module)
* Failed: ALTER TABLE {filters} ADD UNIQUE KEY fmd (format, module, delta)
* Failed: ALTER TABLE {locales_target} ADD PRIMARY KEY (language, lid, plural)
* Failed: ALTER TABLE {poll_votes} ADD PRIMARY KEY (nid, uid, hostname)
* Failed: ALTER TABLE {profile_values} ADD PRIMARY KEY (uid, fid)My drupal 5.9 works fine, and I have setup a 6.3 test site with no luck (no contrib modules restored to 6.3 yet, just my old theme directory).
Details:
Apache/2.2.9 (Debian) PHP/5.2.6-2 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
MySQL 5.0.51a
Can anybody help me debug the issue?
Thanks a lot in advance.
Gabble
Comments
#1
No ideas?
Do I have to make incremental upgrades?
5.9 -> 6.0 -> 6.1 -> 6.2 -> 6.3 ??
Mmh…
#2
you do not need an incremental upgrade
did you modify the drupal core? maybe some contrib modules are handling the data incorrectly..
you should check these selects
SELECT theme, module, delta, COUNT(*) FROM blocks GROUP BY theme, module, delta HAVING COUNT(*) > 1;SELECT format, module, delta, COUNT(*) FROM filters GROUP BY format, module, delta HAVING COUNT(*) > 1;
SELECT language, lid, plural, COUNT(*) FROM locales_target GROUP BY language, lid, plural HAVING COUNT(*) > 1;
SELECT nid, uid, hostname, COUNT(*) FROM poll_votes GROUP BY nid, uid, hostname HAVING COUNT(*) > 1;
SELECT uid, fid, COUNT(*) FROM profile_values GROUP BY uid, fid HAVING COUNT(*) > 1
they should not return any rows, not even in Drupal 5.9
you should delete the duplicates from the database, or on the corresponding drupal user interface..
#3
Thank you, I'll check it out!
Anyway, I have lots of contrib modules in 5.9, but installed a fresh 6.3 with no contrib modules in place yet.
So I guess I have to run those queries against the 5.9 database before trying to upgrade, right?
#4
yes, it have to be fixed before the upgrade in the 5.9 database
#5
Thank you, I'll let you know!
#6
I'm seeing similar messages after runing update.php from 5.10 to 6.4
These are the two warnings we get after runing update.php:
* user warning: Duplicate entry 'abacus-menu-menu-nice-menu-alumn' for key 2 query: ALTER TABLE blocks CHANGE theme `theme` VARCHAR(64) NOT NULL DEFAULT '', ADD UNIQUE KEY tmd (theme, module, delta), ADD INDEX list (theme, status, region, weight, module) in /var/data/drupal/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate entry '1-0' for key 1 query: ALTER TABLE locales_target ADD PRIMARY KEY (language, lid, plural) in /var/data/drupal/includes/database.mysql-common.inc on line 374.
And I find duplicate entries in both locales_target and blocks tables, only after the update. My guess is I should just remove those rows after the upgrade, correct?
#7
Judging from the track it looks like Manuel Garcia removed the duplicate rows. The other issue seems resolved as well so I'm setting this to fixed.
Feel free to reopen if you think that is wrong.
- Arie
#8
Yup, I did remove the items manualy, and we ported fully to d6 (sorry for lack of update on this), everything seems to be ok so far.
#9
Automatically closed -- issue fixed for two weeks with no activity.
#10
I am having similar issues and I posted at this location:
http://drupal.org/node/333494#comment-1197885
#11
I am now at 5.16 trying to upgrade to 6.10, errors are the same, even with no contrib modules in place yet.
The queries you suggested:
SELECT theme, module, delta, COUNT(*) FROM blocks GROUP BY theme, module, delta HAVING COUNT(*) > 1;SELECT format, module, delta, COUNT(*) FROM filters GROUP BY format, module, delta HAVING COUNT(*) > 1;
SELECT language, lid, plural, COUNT(*) FROM locales_target GROUP BY language, lid, plural HAVING COUNT(*) > 1;
SELECT nid, uid, hostname, COUNT(*) FROM poll_votes GROUP BY nid, uid, hostname HAVING COUNT(*) > 1;
SELECT uid, fid, COUNT(*) FROM profile_values GROUP BY uid, fid HAVING COUNT(*) > 1;
return dozens and dozens of duplicates.
I am no MySQL guru, and I cannot guess how to delete those duplicates.
I have spent many hours googling around, but I am still confused.
Could you please help me out and guide me through the necessary steps I have to take?
Thank you so much! :-(
#12
Is this still an active issue?
#13
#14
Hi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.
#15
Automatically closed -- issue fixed for 2 weeks with no activity.