Commit 34a30f9f authored by Russ Fish's avatar Russ Fish

Patches that went from Leigh to Keith and back again.

parent 79897db0
......@@ -158,6 +158,25 @@ my $query_result =
($nextidx) = $query_result->fetchrow_array();
$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 =
DBQueryFatal("select s.exptidx,e.state from experiment_stats as s ".
"left join experiments as e on e.idx=s.exptidx ".
......
......@@ -242,7 +242,7 @@ while (my ($old_imageid, $old_part1, $old_part2,
DBQueryFatal("alter table temp_images add PRIMARY KEY (`imageid`)");
DBQueryFatal("replace into emulab_indicies (name, idx) ".
"values ('next_osid', $index)");
"values ('next_osid', $index), ('next_imageid',$index)");
# osidtoimageid
$query_result = DBQueryFatal("select * from osidtoimageid");
......
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