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

[OSSTEST PATCH 3/4] cs-bisection-step: Provide no-urls variant of the main query



This variant just returns '' for urls.  Unlike the with-urls variant,
it does not ignore trees without urls.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 cs-bisection-step | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/cs-bisection-step b/cs-bisection-step
index b36bac05..2f75313e 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -181,6 +181,7 @@ END
 
 sub flight_rmap ($) {
     my ($flight) = @_;
+    my $need_urls = 1;
 
     $dbh_tests->do(<<END, {});
           CREATE TEMP TABLE tmp_build_info (
@@ -241,7 +242,19 @@ END
                   rev.name LIKE E'revision\\_%')
 END
 
-    my $sth= db_prepare(<<END);
+    my $sth= db_prepare(!$need_urls ? <<END_NOURLS : <<END_URLS);
+        SELECT
+$qtxt_common_results
+              '' AS uval
+
+$qtxt_common_tables
+
+           WHERE
+$qtxt_common_rev_condition
+
+          ORDER by rev.name;
+
+END_NOURLS
         SELECT
 $qtxt_common_results
               url.val AS uval
@@ -258,7 +271,8 @@ $qtxt_common_rev_condition
                   rev.name = 'revision_'       || substr(url.name,6))
 
           ORDER by url.val;
-END
+END_URLS
+
     $sth->execute();
     my $row;
     my $mixed=0;
-- 
2.20.1




 


Rackspace

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