summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-03-02 16:58:51 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-03-02 16:58:51 -0800
commitfd9a200cd92501e326ec54c7658a34717ec9d0f6 (patch)
tree0b8e4786fbdb36b5134da4cc9450481ded221ac4
parentda64005eda9e38aeb47354b8759ae30de3c3f013 (diff)
downloadbrdo-fd9a200cd92501e326ec54c7658a34717ec9d0f6.tar.gz
brdo-fd9a200cd92501e326ec54c7658a34717ec9d0f6.tar.bz2
Issue #1369332 by Damien Tournoud, basic, sun: Fixed Avoid deadlock issues on the {node} table.
-rw-r--r--modules/node/node.install19
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/node/node.install b/modules/node/node.install
index a1f77bb0f..c54ebfbe3 100644
--- a/modules/node/node.install
+++ b/modules/node/node.install
@@ -18,12 +18,14 @@ function node_schema() {
'unsigned' => TRUE,
'not null' => TRUE,
),
+ // Defaults to NULL in order to avoid a brief period of potential
+ // deadlocks on the index.
'vid' => array(
'description' => 'The current {node_revision}.vid version identifier.',
'type' => 'int',
'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0,
+ 'not null' => FALSE,
+ 'default' => NULL,
),
'type' => array(
'description' => 'The {node_type}.type of this node.',
@@ -900,5 +902,18 @@ function node_update_7012() {
}
/**
+ * Change {node}.vid default value from 0 to NULL to avoid deadlock issues on MySQL.
+ */
+function node_update_7013() {
+ db_change_field('node', 'vid', 'vid', array(
+ 'description' => 'The current {node_revision}.vid version identifier.',
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => FALSE,
+ 'default' => NULL,
+ ));
+}
+
+/**
* @} End of "addtogroup updates-6.x-to-7.x"
*/