From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0F39C433DF for ; Fri, 31 Jul 2020 11:38:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A91720838 for ; Fri, 31 Jul 2020 11:38:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A91720838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k1TMz-0005mh-3A; Fri, 31 Jul 2020 11:38:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k1TMy-0005kZ-0D for xen-devel@lists.xenproject.org; Fri, 31 Jul 2020 11:38:36 +0000 X-Inumbo-ID: 59a52144-d322-11ea-8e26-bc764e2007e4 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 59a52144-d322-11ea-8e26-bc764e2007e4; Fri, 31 Jul 2020 11:38:27 +0000 (UTC) Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1k1TMp-0001W4-15; Fri, 31 Jul 2020 12:38:27 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Subject: [OSSTEST PATCH v2 02/41] SQL: Use "LIKE" rather than "like", etc. Date: Fri, 31 Jul 2020 12:37:41 +0100 Message-Id: <20200731113820.5765-3-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200731113820.5765-1-ian.jackson@eu.citrix.com> References: <20200731113820.5765-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is more like the rest of the style. It will also make it easier to find instances of the mistaken LIKE syntax. I found these with "git grep" and manually edited them. I have checked the before-and-after result of find * -type f | xargs perl -i~ -pe 's/\bLIKE\b/like/g' and it has only the few expected changes to ANDs and ORs. No functional change. Signed-off-by: Ian Jackson --- New in v2. --- cr-ensure-disk-space | 4 ++-- cs-adjust-flight | 2 +- mg-force-push | 2 +- mg-report-host-usage-collect | 10 +++++----- ms-planner | 2 +- sg-report-flight | 2 +- sg-report-host-history | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 3e0288f9..11d801b0 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -99,8 +99,8 @@ my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?"); my $refq= db_prepare(<= ? END diff --git a/cs-adjust-flight b/cs-adjust-flight index 98d40891..d04a2fd7 100755 --- a/cs-adjust-flight +++ b/cs-adjust-flight @@ -526,7 +526,7 @@ sub change__repro_buildjobs { } } my $testq = db_prepare(</dev/null"; -my $namecond= "(name = 'host' or name like '%_host')"; +my $namecond= "(name = 'host' OR name LIKE '%_host')"; csreadconfig(); while (@ARGV && $ARGV[0] =~ m/^-/) { @@ -456,7 +456,7 @@ foreach my $host (@ARGV) { SELECT DISTINCT val FROM runvars WHERE flight=? - AND (name = 'host' or name like '%_host') + AND (name = 'host' OR name LIKE '%_host') END $hostsinflightq->execute($flight); while (my $row = $hostsinflightq->fetchrow_hashref()) { -- 2.20.1