[OSSTEST,v2,35/41] cs-bisection-step: Break out qtxt_common_ok
diff mbox series

Message ID 20200731113820.5765-36-ian.jackson@eu.citrix.com
State New
Headers show
Series
  • Performance work
Related show

Commit Message

Ian Jackson July 31, 2020, 11:38 a.m. UTC
Make this bit of query into a subref which takes a $table argument.

No change to the generated query.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch.
---
 cs-bisection-step | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/cs-bisection-step b/cs-bisection-step
index f11726aa..ba0c6424 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -190,6 +190,13 @@  sub flight_rmap ($$) {
 END
     };
 
+    my $qtxt_common_tree_ok = sub {
+	my ($table) = @_;
+	[<<END];
+  	      $table.name LIKE E'tree\\_%'
+END
+    };
+
     $dbh_tests->do(<<END, {});
           CREATE TEMP TABLE tmp_build_info (
               use varchar NOT NULL,
@@ -267,7 +274,7 @@  $qtxt_common_tables
 
            WHERE
 @{ $qtxt_common_rev_ok->('rev') } AND
-  	          url.name LIKE E'tree\\_%'
+@{ $qtxt_common_tree_ok->('url') }
 	     AND  url.use = rev.use
 	     AND  url.job = rev.job
 	     AND (rev.name = 'built_revision_' || substr(url.name,6) OR