Skip to content

Drupal 7 problem: Class ‘MergeQuery_mysql’ not found

July 1, 2011

This is a quick note of frustration about a problem into which I’ve been running mercilessly. I have a site on Drupal 7.0, that I have been trying to upgrade to the new 7.4 release. As preparation, I’ve taken two different development sites through the same upgrade, and the dev sites moved fine. With the real site, however, I run into the following scenario:

  1. Make backup
  2. Put site in maintenance mode
  3. Delete all 7.0 files/folders
  4. Unpack all 7.4 files/folders other than the /sites directory
  5. Copy the old connection string to the new default.settings.php file, save as settings.php

At this point, the site works, and the status board shows green – with the warning that some updates need to be done to the schema. So, I go to update.php.

And…the site breaks. Hard. White Screen of Death hard. Update.php fails, the site root fails, everything.

So, I throw on the three lines of debugging code from http://drupal.org/node/158043 to peek under the hood and see what I can find.

This is the output:
Notice: require_once() [function.require-once]: 1. h->opened_path=[E:\sites\knowlton-stage.96\includes\bootstrap.inc] h->filename=[E:\sites\knowlton-stage.96/includes/bootstrap.inc] in E:\sites\knowlton-stage.96\index.php on line 23
Notice: require_once() [function.require-once]: 1. h->opened_path=[E:\sites\knowlton-stage.96\includes\errors.inc] h->filename=[E:\sites\knowlton-stage.96/includes/errors.inc] in E:\sites\knowlton-stage.96\includes\bootstrap.inc on line 1971
Notice: require_once() [function.require-once]: 1. h->opened_path=[E:\sites\knowlton-stage.96\includes\common.inc] h->filename=[E:\sites\knowlton-stage.96/includes/common.inc] in E:\sites\knowlton-stage.96\includes\errors.inc on line 73
Notice: require_once() [function.require-once]: 1. h->opened_path=[E:\sites\knowlton-stage.96\includes\unicode.inc] h->filename=[E:\sites\knowlton-stage.96/includes/unicode.inc] in E:\sites\knowlton-stage.96\includes\common.inc on line 1557
Fatal error: Class 'MergeQuery_mysql' not found in E:\sites\knowlton-stage.96\includes\database\database.inc on line 826

I’ve done what I consider a fair amount of Googling, both within the WSOD error and the MergeQuery_mysql function. Nothing has worked. I have backups, and obviously a dev site – but I’m a bit flummoxed as to why I’m seeing this error. Any input on this would be greatly appreciated.

4 Comments leave one →
  1. Matt Bernhardt permalink*
    July 1, 2011 8:08 pm

    UPDATE: I’ve downloaded and reverted back to the original distribution of Drupal 7.0, and that seems to have solved part of the problem. The site works, the status report (other than the note about upgrading to 7.4) shows no issues.

    There are, however, a lot of PHP notices in the admin screens, like this:

    Notice: include_once() [function.include-once]: 1. h->opened_path=[E:\sites\knowlton-stage.96\sites\default\settings.php] h->filename=[E:\sites\knowlton-stage.96/sites/default/settings.php] in drupal_settings_initialize() (line 554 of E:\sites\knowlton-stage.96\includes\bootstrap.inc).

    By my count there are ten different notices, all about include_once() or require_once(). I’m wondering if these are not part of the problem.

  2. Matt Bernhardt permalink*
    July 14, 2011 12:23 pm

    Second Update: In the two weeks since I posted this initially, I have not attempted the upgrade from 7.0 to 7.4 again. Hopefully I’ll get to this tomorrow. The site has been running fine, but obviously it is subject to a number of security flaws that will block me from taking it into production.

    • Matt Bernhardt permalink*
      July 15, 2011 4:42 am

      Third Update: today I re-copied the site from my staging environment to the development environment, and attempted the update from 7.0 to 7.4; everything worked as expected, and the updates completed with no problems reported.

      I don’t have the stack details in front of me, but I suspect the cause to be somewhere in those details. Both environments are WAMP stacks, but the version numbers are not synchronized for things like PHP.

Trackbacks

  1. Revisiting MergeQuery_mysql « Fabricated Experience

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: