From: Ian Jackson Date: Mon, 24 Aug 2020 11:03:11 +0000 (+0100) Subject: host reuse: Use literal for the hosts_infraprioritygroup runvar X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f58fbf9260b0c5cb5e1e18bac4e646dc7e723d3f;p=osstest.git host reuse: Use literal for the hosts_infraprioritygroup runvar At some point this might make the database smarter about indexing. It's certainly clearer. Signed-off-by: Ian Jackson --- diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 8c235d4..8fde293 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -403,19 +403,19 @@ sub jobdb_set_hosts_infraprioritygroup ($$$$;$) { # method (job = ?) AS thisjob FROM runvars WHERE flight=? - AND name=? + AND name='$vn' ORDER BY thisjob DESC END my $insertq = $dbh_tests->prepare(<execute($job, $flight, $vn); + $queryq->execute($job, $flight); while (my ($tjob, $tval, $thisjob) = $queryq->fetchrow_array()) { if ($thisjob) { logm("$vn: job is already in group $tval"); @@ -431,7 +431,7 @@ END } $resulting = "$use:$group_key"; logm("$vn: inserting job into group $resulting"); - $insertq->execute($flight,$job,$vn, $resulting); + $insertq->execute($flight,$job, $resulting); }); $rref->{$vn} = $resulting if $rref && defined $resulting; }