[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH v2 41/41] 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 <ian.jackson@xxxxxxxxxxxxx>
CC: George Dunlap <George.Dunlap@xxxxxxxxxx>
---
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 8e4c5b9a..a69c624f 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.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.