Commit e34e7b02 authored by Gary Wong's avatar Gary Wong

Add reservation version tag (used for efficient transactional semantics).

parent eddd067b
......@@ -4239,6 +4239,16 @@ CREATE TABLE `reposition_status` (
PRIMARY KEY (`node_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `reservation_version`
--
DROP TABLE IF EXISTS `reservation_version`;
CREATE TABLE `reservation_version` (
`version` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `reserved`
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("reservation_version")) {
DBQueryFatal( "CREATE TABLE `reservation_version` ( ".
" `version` int(11) NOT NULL default '0', " .
" PRIMARY KEY( `version` ) " .
") ENGINE=MyISAM DEFAULT CHARSET=latin1" );
DBQueryFatal( "INSERT INTO reservation_version SET version=0" );
}
return 0;
}
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment