summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-03-10 15:50:59 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-03-10 15:50:59 -0400
commit92d229978163baa23d0399c5723d087dd92f534d (patch)
treeda322ccdda9e118bab0a7c65d947bfaa319e26e6 /modules/system
parent851bcf12f0304adf5d9a0ee988848002809e6ca3 (diff)
downloadbrdo-92d229978163baa23d0399c5723d087dd92f534d.tar.gz
brdo-92d229978163baa23d0399c5723d087dd92f534d.tar.bz2
Issue #1586542 followup by andypost: Workaround for an issue where system update #7061 fails due to a memory leak and can't be run again.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.install14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 341a1f24a..1b037b82b 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2759,12 +2759,14 @@ function system_update_7061(&$sandbox) {
// Retrieve a list of node revisions that have uploaded files attached.
// DISTINCT queries are expensive, especially when paged, so we store the
// data in its own table for the duration of the update.
- $table = array(
- 'description' => t('Stores temporary data for system_update_7061.'),
- 'fields' => array('vid' => array('type' => 'int')),
- 'primary key' => array('vid'),
- );
- db_create_table('system_update_7061', $table);
+ if (!db_table_exists('system_update_7061')) {
+ $table = array(
+ 'description' => t('Stores temporary data for system_update_7061.'),
+ 'fields' => array('vid' => array('type' => 'int')),
+ 'primary key' => array('vid'),
+ );
+ db_create_table('system_update_7061', $table);
+ }
$query = db_select('upload', 'u');
$query->distinct();
$query->addField('u','vid');