]> xenbits.xensource.com Git - osstest.git/commitdiff
duration_estimator: Clarify recentflights query a bit
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 31 Jul 2020 10:43:55 +0000 (11:43 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 6 Aug 2020 09:23:19 +0000 (10:23 +0100)
The condition on r.job is more naturally thought of as a join
condition than a where condition.  (This is an inner join, so the
semantics are identical.)

Also, for clarity, swap the flight and job conditions round, so that
the ON clause is a series of r.thing = otherthing.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: George Dunlap <George.Dunlap@citrix.com>
---
v3: Fix daft syntax error.
v2: New patch.

Osstest/Executive.pm

index aed2d4b715100154e77394791916a8a0e6a9f407..c46a979d7e01bcef0fdf30f54704ed69dd0575bc 100644 (file)
@@ -1153,10 +1153,10 @@ sub duration_estimator ($$;$$) {
                     FROM flights f
                      JOIN jobs j USING (flight)
                      JOIN runvars r
-                             ON  f.flight=r.flight
+                             ON  r.flight=f.flight
+                            AND  r.job=j.job
                             AND  r.name=?
-                    WHERE  j.job=r.job
-                      AND  f.blessing=?
+                    WHERE  f.blessing=?
                       AND  f.branch=?
                       AND  j.job=?
                       AND  r.val=?