From: Ian Jackson Subject: [OSSTEST PATCH 17/25] sg-report-host-history: Move query preparation into jobquery Date: Wed, 17 Jun 2015 17:45:13 +0100 Message-ID: <1434559521-8751-18-git-send-email-ian.jackson@eu.citrix.com> References: <1434559521-8751-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5GTN-0004hu-Or for xen-devel@lists.xenproject.org; Wed, 17 Jun 2015 16:45:57 +0000 In-Reply-To: <1434559521-8751-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org To get the scope of database locking, and of the SET LOCAL workaround, right, it is convenient to move these query preparations into the jobquery function. No functional change. Signed-off-by: Ian Jackson --- sg-report-host-history | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/sg-report-host-history b/sg-report-host-history index c56ed71..f7a773d 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -102,40 +102,6 @@ $dbh_tests->do("SET LOCAL enable_seqscan=false"); # of the runvars table, rather than walking backwards through the # flights until it has what we've told it is enough. -my $runvarq = db_prepare(<execute($jr->{flight}, $jr->{job}); @@ -167,6 +133,40 @@ sub reporthost ($) { print H "\n"; + our $runvarq //= db_prepare(<execute($hostname); -- 1.7.10.4