Change {node}.vid default value from 0 to NULL to avoid deadlock issues on MySQL.
function node_update_7013() {
db_drop_unique_key('node', 'vid');
db_change_field('node', 'vid', 'vid', array(
'description' => 'The current {node_revision}.vid version identifier.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'default' => NULL,
));
db_add_unique_key('node', 'vid', array(
'vid',
));
}