$anypassq is used for the "never pass" check; the distinction between
this and simply "fail" is cosmetic (although it can be informative).
On non-"real" flights, it can easily happen that the flight never
passed *on this branch with this blessing* but has passed on real. So
the steps subquery does not find us an answer within reasonable time.
Work around this by always searching for "real". This keeps the
performance within acceptable bounds even during ad-hoc testing.
We don't actually use the row from this query, so the only effect is
that when the job passed in a "real" flight, we go on to the full
regresson analysis rather than short-circuiting and reporting "never
pass".
Signed-off-by: Ian Jackson <iwj@xenproject.org>
)
SELECT * FROM flights JOIN s USING (flight)
WHERE $branches_cond_q
- AND $blessingscond
+ AND ($blessingscond) OR blessing = 'real'
LIMIT 1
END
$anypassq= db_prepare($anypassq);