diff mbox series

[OSSTEST,54/82] host reuse: Use literal for the hosts_infraprioritygroup runvar

Message ID 20201007180024.7932-55-iwj@xenproject.org (mailing list archive)
State New, archived
Headers show
Series Reuse test hosts | expand

Commit Message

Ian Jackson Oct. 7, 2020, 5:59 p.m. UTC
From: Ian Jackson <ian.jackson@eu.citrix.com>

At some point this might make the database smarter about indexing.
It's certainly clearer.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/JobDB/Executive.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm
index 8c235d45..8fde2934 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(<<END);
-        INSERT INTO runvars (flight,job, name,val, synth)
-                     VALUES (?,     ?,   ?,   ?,   't')
+        INSERT INTO runvars (flight,job, name,  val, synth)
+                     VALUES (?,     ?,   '$vn', ?,   't')
 END
 
     my $resulting;
     db_retry($dbh_tests,[],sub {
 	my $use = 1;
 	$resulting = undef;
-        $queryq->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;
 }