From fe809b6e2a8f0cdfcb49fc493ea335b1bbc8a3ef Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 31 Jul 2020 11:43:55 +0100 Subject: [PATCH] duration_estimator: Clarify recentflights query a bit 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 Reviewed-by: George Dunlap --- v3: Fix daft syntax error. v2: New patch. --- Osstest/Executive.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index aed2d4b..c46a979 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -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=? -- 2.39.5