diff --git a/modules/node/node.install b/modules/node/node.install index a1f77bb..c54ebfb 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" */