Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
37b9bdd2
Commit
37b9bdd2
authored
May 24, 2012
by
Leigh B Stoller
Browse files
More KEYs for the node_history table.
parent
824f5786
Changes
2
Hide whitespace changes
Inline
Side-by-side
sql/database-create.sql
View file @
37b9bdd2
...
@@ -2380,7 +2380,9 @@ CREATE TABLE `node_history` (
...
@@ -2380,7 +2380,9 @@ CREATE TABLE `node_history` (
KEY
`node_id`
(
`node_id`
,
`history_id`
),
KEY
`node_id`
(
`node_id`
,
`history_id`
),
KEY
`exptidx`
(
`exptidx`
),
KEY
`exptidx`
(
`exptidx`
),
KEY
`stamp`
(
`stamp`
),
KEY
`stamp`
(
`stamp`
),
KEY
`cnet_IP`
(
`cnet_IP`
)
KEY
`cnet_IP`
(
`cnet_IP`
),
KEY
`nodestamp`
(
`node_id`
,
`stamp`
);
KEY
`ipstamp`
(
`cnet_IP`
,
`stamp`
);
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
--
...
...
sql/updates/4/294
0 → 100644
View file @
37b9bdd2
#
# Add keys to node_history.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("node_history", "nodestamp")) {
DBQueryFatal("alter table node_history add " .
" KEY `nodestamp` (`node_id`,`stamp`)");
}
if (!DBKeyExists("node_history", "ipstamp")) {
DBQueryFatal("alter table node_history add " .
" KEY `ipstamp` (`cnet_IP`,`stamp`)");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment