Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#32314 closed defect (bug) (duplicate)

Database error on update to 4.2.2 from 4.2.1

Reported by: milleronic's profile milleronic Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Database Keywords:
Focuses: Cc:

Description

More of an FYI. The following PHP error logged when upgrading from 4.2.1 to 4.2.2: does not appear to affect normal site operations, nor does the error persist after install. Multisite install RHEL 5.11, Apache 2.2.3, PHP 5.3.3, MySQL 5.095 First version of this site: 2.9

[Fri May 08 09:20:58 2015] [error] [client xx.xxx.xx.xxx] WordPress database error Duplicate key name 'meta_key' for query ALTER TABLE wp_usermeta ADD KEY meta_key (meta_key(191)) made by wp_upgrade, make_db_current_silent, dbDelta
[Fri May 08 09:20:58 2015] [error] [client xx.xxx.xx.xxx] WordPress database error Duplicate key name 'domain' for query ALTER TABLE wp_site ADD KEY domain (domain(140),path(51)) made by wp_upgrade, make_db_current_silent, dbDelta
[Fri May 08 09:20:58 2015] [error] [client xx.xxx.xx.xxx] WordPress database error Duplicate key name 'meta_key' for query ALTER TABLE wp_sitemeta ADD KEY meta_key (meta_key(191)) made by wp_upgrade, make_db_current_silent, dbDelta
[Fri May 08 09:20:58 2015] [error] [client xx.xxx.xx.xxx] WordPress database error Duplicate key name 'domain_path' for query ALTER TABLE wp_signups ADD KEY domain_path (domain(140),path(51)) made by wp_upgrade, make_db_current_silent, dbDelta

Change History (5)

#1 @milleronic
10 years ago

  • Severity changed from normal to minor

#2 @charlestonsw
10 years ago

This dbDelta article I posted on my website tonight may help.

I was running into key name issues as well after the 4.2 upgrade and various dbDelta() changes. The short version, make sure you create your SQL statement EXACTLY as dbDelta wants it. Double space after the keyword "PRIMARY KEY" and single space after each element of "KEY <key_name> (<column_name>);

#3 @mackensen
9 years ago

I'm seeing the same issue, both with sites that started in the WordPress MU days and a site which was created under 4.2. The errors happen when upgrading from 4.2.4 (db version 31536) to 4.3.0 (db version 33055). I'm using wp-cli to upgrade the databases. The environment is RHEL 6.5, PHP 5.3.3, Apache 2.2.15, MySQL 5.1.69. I've compared the output of SHOW INDEX for the four tables in question before and after the upgrade and only change is that the Cardinality for meta_id and meta_key in wp_sitemeta dropped from 100 to 80 (doubt that's relevant). Like @milleronic I haven't so far observed any issues with the site itself. Looking back through my log files we also generated this error going from 4.1.2 to 4.2.2 and again from 4.2.2 to 4.2.4 but simply didn't notice it.

#4 @Justin_K
9 years ago

I'm seeing the first 3 (of 4) of these errors while upgrading from 3.5.1 to 4.3.1.

Last edited 9 years ago by Justin_K (previous) (diff)

#5 @pento
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.2.2 deleted

Duplicate of #31869.

This bug was fixed by [32108].

Note: See TracTickets for help on using tickets.