Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.112 diff -u -r1.112 install.inc --- includes/install.inc 23 Sep 2009 15:04:34 -0000 1.112 +++ includes/install.inc 25 Sep 2009 13:57:42 -0000 @@ -93,12 +93,10 @@ */ function drupal_get_schema_versions($module) { $updates = &drupal_static(__FUNCTION__, NULL); - if (!isset($updates)) { + if (!isset($updates[$module])) { $updates = array(); // Prepare regular expression to match all possible defined hook_update_N(). - $modules = db_query("SELECT name FROM {system} WHERE type = 'module'") - ->fetchCol(); - $regexp = '/^(?P' . implode('|', $modules) . ')_update_(?P\d+)$/'; + $regexp = '/^(?P.+)_update_(?P\d+)$/'; $functions = get_defined_functions(); // Narrow this down to functions ending with an integer, since all // hook_update_N() functions end this way, and there are other