Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
34a30f9f
Commit
34a30f9f
authored
Nov 14, 2007
by
Russ Fish
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patches that went from Leigh to Keith and back again.
parent
79897db0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
sql/resources.pl
sql/resources.pl
+19
-0
sql/step4_newids.pl
sql/step4_newids.pl
+1
-1
No files found.
sql/resources.pl
View file @
34a30f9f
...
@@ -158,6 +158,25 @@ my $query_result =
...
@@ -158,6 +158,25 @@ my $query_result =
(
$nextidx
)
=
$query_result
->
fetchrow_array
();
(
$nextidx
)
=
$query_result
->
fetchrow_array
();
$nextidx
+=
100000
;
$nextidx
+=
100000
;
$query_result
=
DBQueryFatal
("
select e.pid,e.eid,e.idx,r.idx,
"
.
"
e.expt_head_uid,e.creator_idx,e.expt_created
"
.
"
from experiments as e
"
.
"
left join testbed_stats_new as s on e.idx=s.exptidx
"
.
"
left join experiment_resources_new as r on
"
.
"
r.exptidx=e.idx
"
.
"
where s.exptidx is null and e.pid='emulab-ops'
");
while
(
my
(
$pid
,
$eid
,
$exptidx
,
$rsrcidx
,
$uid
,
$uid_idx
,
$created
)
=
$query_result
->
fetchrow_array
())
{
print
"
Adding missing testbed_stats record for
$pid
,
$eid
,
$exptidx
\n
";
DBQueryFatal
("
insert into testbed_stats_new
"
.
"
(idx, start_time, end_time, exptidx, rsrcidx, action,
"
.
"
exitcode, uid, uid_idx) values
"
.
"
(NULL, '
$created
', '
$created
',
$exptidx
,
$rsrcidx
,
"
.
"
'new', 0, '
$uid
', '
$uid_idx
')
");
}
$query_result
=
$query_result
=
DBQueryFatal
("
select s.exptidx,e.state from experiment_stats as s
"
.
DBQueryFatal
("
select s.exptidx,e.state from experiment_stats as s
"
.
"
left join experiments as e on e.idx=s.exptidx
"
.
"
left join experiments as e on e.idx=s.exptidx
"
.
...
...
sql/step4_newids.pl
View file @
34a30f9f
...
@@ -242,7 +242,7 @@ while (my ($old_imageid, $old_part1, $old_part2,
...
@@ -242,7 +242,7 @@ while (my ($old_imageid, $old_part1, $old_part2,
DBQueryFatal
("
alter table temp_images add PRIMARY KEY (`imageid`)
");
DBQueryFatal
("
alter table temp_images add PRIMARY KEY (`imageid`)
");
DBQueryFatal
("
replace into emulab_indicies (name, idx)
"
.
DBQueryFatal
("
replace into emulab_indicies (name, idx)
"
.
"
values ('next_osid',
$index
)
");
"
values ('next_osid',
$index
), ('next_imageid',
$index
)
");
# osidtoimageid
# osidtoimageid
$query_result
=
DBQueryFatal
("
select * from osidtoimageid
");
$query_result
=
DBQueryFatal
("
select * from osidtoimageid
");
...
...
Write
Preview
Markdown
is supported
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