From unknown Thu Sep 11 08:10:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12019 <12019@debbugs.gnu.org> To: bug#12019 <12019@debbugs.gnu.org> Subject: Status: join command - wrong column moved to start of line with the -v2 option Reply-To: bug#12019 <12019@debbugs.gnu.org> Date: Thu, 11 Sep 2025 15:10:15 +0000 retitle 12019 join command - wrong column moved to start of line with the -= v2 option reassign 12019 coreutils submitter 12019 Jean-Pierre Tosoni severity 12019 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 21 17:16:55 2012 Received: (at submit) by debbugs.gnu.org; 21 Jul 2012 21:16:56 +0000 Received: from localhost ([127.0.0.1]:56292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ssh2l-000161-9n for submit@debbugs.gnu.org; Sat, 21 Jul 2012 17:16:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57453) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SseOR-0005fI-8q for submit@debbugs.gnu.org; Sat, 21 Jul 2012 14:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SseIE-0002MQ-EV for submit@debbugs.gnu.org; Sat, 21 Jul 2012 14:20:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SseIE-0002MM-AK for submit@debbugs.gnu.org; Sat, 21 Jul 2012 14:20:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SseID-00036T-CM for bug-coreutils@gnu.org; Sat, 21 Jul 2012 14:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SseIC-0002MC-6D for bug-coreutils@gnu.org; Sat, 21 Jul 2012 14:20:41 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:58213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SseIB-0002M4-Uv for bug-coreutils@gnu.org; Sat, 21 Jul 2012 14:20:40 -0400 Received: by weys10 with SMTP id s10so4037054wey.0 for ; Sat, 21 Jul 2012 11:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EN/rnaUvf5dhl5LXFxo+TFWPOrioZpLHfRqrL0ee3No=; b=aEUSFFpzw5KbxBmgnkbyWRWRzzo1xTbDghbMqyQDPZShgbsqMnYd6K9SdunuDDL1we 7lDFsJhg5cuGCGSsl5gPkK6NVVnhBZirn6lySV9ubAOt6u/LMW8JL4xvJ1jenAqM6Jlj ow2cgaiN1yI53Mnza4zGIcfQOeEfvURTRSnybtUG436Qjqj+Z/T9YVmWyhbYIGnP82D+ TflR8CoYm+k+sovrouC7c6gPiSkaEdTdxSD23xc2CkobAaYA7uU3EqqpY1fwyIQeGmq1 L8mgLU60QfG9B0KOlyh8ixSTY5i5O/7xuLB4dwFZQ8znCEnR/4/jaHQaq+T33PNW303+ bhZA== MIME-Version: 1.0 Received: by 10.180.79.229 with SMTP id m5mr23656530wix.13.1342894838769; Sat, 21 Jul 2012 11:20:38 -0700 (PDT) Received: by 10.194.42.68 with HTTP; Sat, 21 Jul 2012 11:20:38 -0700 (PDT) Date: Sat, 21 Jul 2012 20:20:38 +0200 Message-ID: Subject: join command - wrong column moved to start of line with the -v2 option From: Jean-Pierre Tosoni To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=f46d04182658d5e6b104c55b110d X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 21 Jul 2012 17:16:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --f46d04182658d5e6b104c55b110d Content-Type: text/plain; charset=ISO-8859-1 Hello Maintainer, I am using join v8.5 from debian squeeze. When using the -v2 option with different join fields in files 1 and 2, the join field which gets moved to the beginning of the result lines is the one identified by the -1 option, not the one identified by the -2 option. Here are my test files: ==== file a ==== axx111 keyX axx222 ayy111 keyY ayy222 ==== file b ==== xxx111 xxx222 keyX xxx333 zzz111 zzz222 keyZ zzz333 now, the command: join -v 2 -1 2 -2 3 a b produces ==== wrong output ==== zzz222 zzz111 keyZ zzz333 instead of ==== expected output ==== keyZ zzz111 zzz222 zzz333 The two following other commands work as expected: join -v 1 -1 2 -2 3 a b join -1 2 -2 3 a b I did not find this problem in your database - or am I mistaken ? Best regards, -- Jean-Pierre Tosoni --f46d04182658d5e6b104c55b110d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Maintainer,

I am using join v8.5 from debian squee= ze.

When using the -v2 option with different join = fields in files 1 and 2, the join field which gets moved to the beginning o= f the result lines is the one identified by the -1 option, not the one iden= tified by the -2 option.


Here are my test files:
=3D=3D= =3D=3D file a =3D=3D=3D=3D
axx111 =A0keyX =A0 =A0axx222
ayy111 =A0keyY =A0 =A0ayy222

=3D=3D=3D= =3D file b =3D=3D=3D=3D
xxx111 =A0xxx222 =A0keyX =A0 =A0xxx3= 33
zzz111 =A0zzz222 =A0keyZ =A0 =A0zzz333

= now, the command:
=A0 =A0join =A0 -v 2 =A0 -1 2 =A0 -2 3 =A0 a = =A0 b
produces
=3D=3D=3D=3D wrong output =3D=3D=3D=3D
zzz222 zzz111 keyZ zzz333

instead of
=3D=3D=3D=3D expected output =3D= =3D=3D=3D
keyZ zzz111 zzz222 zzz333


The two following other commands work as expected:
=A0 =A0join =A0 =A0-v 1 =A0 =A0-1 2 =A0 =A0-2 3 =A0 =A0a b
=A0 =A0join=A0 =A0=A0-1 2 =A0 =A0-2 3 =A0 =A0a b

<= /div>
I did not find this problem in your database - or am I mistaken ?=
Best regards,

--
Jean-Pierre Tosoni
--f46d04182658d5e6b104c55b110d-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 21 18:17:58 2012 Received: (at 12019) by debbugs.gnu.org; 21 Jul 2012 22:17:58 +0000 Received: from localhost ([127.0.0.1]:56406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sshzp-00049y-MG for submit@debbugs.gnu.org; Sat, 21 Jul 2012 18:17:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7231) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sshzn-00049p-Nr for 12019@debbugs.gnu.org; Sat, 21 Jul 2012 18:17:57 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6LMBPeN007918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 Jul 2012 18:11:28 -0400 Received: from [10.3.113.13] ([10.3.113.13]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6LMBO8L006352; Sat, 21 Jul 2012 18:11:24 -0400 Message-ID: <500B290B.9010409@redhat.com> Date: Sat, 21 Jul 2012 16:11:23 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Jean-Pierre Tosoni Subject: Re: bug#12019: join command - wrong column moved to start of line with the -v2 option References: In-Reply-To: X-Enigmail-Version: 1.4.3 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDA46730E731475F218DF66A8" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12019 Cc: 12019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDA46730E731475F218DF66A8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tag 12019 moreinfo thanks On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote: > Hello Maintainer, >=20 > I am using join v8.5 from debian squeeze. >=20 > now, the command: > join -v 2 -1 2 -2 3 a b > produces > =3D=3D=3D=3D wrong output =3D=3D=3D=3D > zzz222 zzz111 keyZ zzz333 I tried reproducing this with coreutils 8.17: $ cat a b axx111 keyX axx222 ayy111 keyY ayy222 xxx111 xxx222 keyX xxx333 zzz111 zzz222 keyZ zzz333 $ join -v2 -1 2 -2 3 a b keyZ zzz111 zzz222 zzz333 but I get the expected order. I don't see a specific mention of a fix for this in NEWS, so I have to wonder if this might be a bug in a debian-specific patch. Can you do some more investigating, such as compiling upstream coreutils to see if the problem still persists for you= ? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigDA46730E731475F218DF66A8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQCykMAAoJEKeha0olJ0NqBpkIAJA/hWf6b4USP5M/j3Prr96a gMnTQyNZATCGoWcAf/G1+v3FCSmaShAoMCTuL0RT8AOTeM6Q1zjwkgTDY7rfDQK9 AwcbedcU/d0+tIfz493YZyVQF/ep3605ClXmwAbykf82rT3WRdaHtovOds+fpNSu QuEov0HhAKFhJ3ElhhMJzRUcgqTR8/MmkBK4JETqvEmTjRzfJOhKmU0zTQO79oD6 iNtOiMigf0evIGg40tvLTrOscbq9/DnplIINFgVXdRMSHkFB9gXxjthpXOq5XKum Dir6pgntsEvS+c6nk40Rv3ckh2EJIl0YJbVW6gQAtuSTjvQhXnwFbfhobovzSp8= =ejpD -----END PGP SIGNATURE----- --------------enigDA46730E731475F218DF66A8-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 21 19:28:57 2012 Received: (at 12019) by debbugs.gnu.org; 21 Jul 2012 23:28:57 +0000 Received: from localhost ([127.0.0.1]:56470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ssj6X-0005jL-Fi for submit@debbugs.gnu.org; Sat, 21 Jul 2012 19:28:57 -0400 Received: from c-98-226-12-79.hsd1.in.comcast.net ([98.226.12.79]:32881 helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1Ssj6V-0005jD-JJ for 12019@debbugs.gnu.org; Sat, 21 Jul 2012 19:28:56 -0400 Received: (qmail 4350 invoked by uid 1000); 21 Jul 2012 23:22:29 -0000 Message-ID: <20120721232229.4349.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#12019: join command - wrong column moved to start of line with To: eblake@redhat.com (Eric Blake) Date: Sat, 21 Jul 2012 18:22:29 -0500 (GMT+5) In-Reply-To: <500B290B.9010409@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.9 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote: > > Hello Maintainer, > >=20 > > I am using join v8.5 from debian squeeze. > >=20 > > > now, the command: > > join -v 2 -1 2 -2 3 a b > > produces > > =3D=3D=3D=3D wrong output =3D=3D=3D=3D > > zzz222 zzz111 keyZ zzz333 > > I tried reproducing this with coreutils 8.17: > > $ cat a b > axx111 keyX axx222 > ayy111 keyY ayy222 > xxx111 xxx222 keyX xxx333 > zzz111 zzz222 keyZ zzz333 > $ join -v2 -1 2 -2 3 a b > keyZ zzz111 zzz222 zzz333 > > but I get the expected order. I don't see a specific mention of a fix > for this in NEWS, so I have to wonder if this might be a bug in a > debian-specific patch. Can you do some more investigating, such as > compiling upstream coreutils to see if the problem still persists for you= > ? [...] Content analysis details: (3.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [98.226.12.79 listed in bb.barracudacentral.org] 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.12.79 listed in dnsbl.sorbs.net] 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.12.79 listed in zen.spamhaus.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 12019 Cc: Jean-Pierre Tosoni , 12019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 3.9 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote: > > Hello Maintainer, > >=20 > > I am using join v8.5 from debian squeeze. > >=20 > > > now, the command: > > join -v 2 -1 2 -2 3 a b > > produces > > =3D=3D=3D=3D wrong output =3D=3D=3D=3D > > zzz222 zzz111 keyZ zzz333 > > I tried reproducing this with coreutils 8.17: > > $ cat a b > axx111 keyX axx222 > ayy111 keyY ayy222 > xxx111 xxx222 keyX xxx333 > zzz111 zzz222 keyZ zzz333 > $ join -v2 -1 2 -2 3 a b > keyZ zzz111 zzz222 zzz333 > > but I get the expected order. I don't see a specific mention of a fix > for this in NEWS, so I have to wonder if this might be a bug in a > debian-specific patch. Can you do some more investigating, such as > compiling upstream coreutils to see if the problem still persists for you= > ? [...] Content analysis details: (3.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.12.79 listed in zen.spamhaus.org] 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.12.79 listed in dnsbl.sorbs.net] 1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [98.226.12.79 listed in bb.barracudacentral.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS Eric Blake writes: > > On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote: > > Hello Maintainer, > >=20 > > I am using join v8.5 from debian squeeze. > >=20 > > > now, the command: > > join -v 2 -1 2 -2 3 a b > > produces > > =3D=3D=3D=3D wrong output =3D=3D=3D=3D > > zzz222 zzz111 keyZ zzz333 > > I tried reproducing this with coreutils 8.17: > > $ cat a b > axx111 keyX axx222 > ayy111 keyY ayy222 > xxx111 xxx222 keyX xxx333 > zzz111 zzz222 keyZ zzz333 > $ join -v2 -1 2 -2 3 a b > keyZ zzz111 zzz222 zzz333 > > but I get the expected order. I don't see a specific mention of a fix > for this in NEWS, so I have to wonder if this might be a bug in a > debian-specific patch. Can you do some more investigating, such as > compiling upstream coreutils to see if the problem still persists for you= > ? It's not a Debian-specific problem. I can reproduce the bug with unaltered coreutils 8.9. It was apparently fixed by accident as a side effect of some other work on the join program. commit d4db0cb1827730ed5536c12c0ebd024283b3a4db Author: Pádraig Brady Date: Wed Jan 5 11:52:54 2011 +0000 join: add -o 'auto' to output a constant number of fields per line d4db0cb1827730ed5536c12c0ebd024283b3a4db can be cherry-picked and applied to older coreutils to fix the bug. I tested this with upstream 8.9 and Debian's 8.5, both applied with fuzz but worked correctly. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 22 11:19:22 2012 Received: (at 12019) by debbugs.gnu.org; 22 Jul 2012 15:19:22 +0000 Received: from localhost ([127.0.0.1]:57759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsxwH-0002On-TA for submit@debbugs.gnu.org; Sun, 22 Jul 2012 11:19:22 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:36433) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsxwF-0002Of-3P for 12019@debbugs.gnu.org; Sun, 22 Jul 2012 11:19:20 -0400 Received: by wgbdq10 with SMTP id dq10so4667850wgb.15 for <12019@debbugs.gnu.org>; Sun, 22 Jul 2012 08:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bwXM7c37Wm9hWSaV2iukKbDDo9poyaAWcInXbN1PjaA=; b=rvWWwYrPgOyQES66dQRMe/cEb2dBUdfPw3qlbLA1/zQeCkNDIerUEoFi+uGJVy99dE 7ltHo5p8910Ff79RwQBTll5IPXJWWFI8ldh04jH64grpoa8syszITzhCj2oV1GIEdJQQ TyueQ/7YzvxlP4PYdLdQYEtTKD893DZ9HzuY9T+SugHYaTTnBCUcpUDFLqIv5ch2F+dw 1GLs1WnxvkuFXLfHQCOoSFMdyTxTZKIFJRw6UmbkxiV6JyywBPLrj3k0nhvrIWuW6gUm CsyQ2RFbjYj4OcnqpzY3dQoCgKSLowzz9zsHby3hWlp5pmjtb7/Jd/zjNzRvPkl+fRQj dS+A== MIME-Version: 1.0 Received: by 10.216.182.210 with SMTP id o60mr6242200wem.110.1342969969378; Sun, 22 Jul 2012 08:12:49 -0700 (PDT) Received: by 10.194.42.68 with HTTP; Sun, 22 Jul 2012 08:12:49 -0700 (PDT) In-Reply-To: <500B290B.9010409@redhat.com> References: <500B290B.9010409@redhat.com> Date: Sun, 22 Jul 2012 17:12:49 +0200 Message-ID: Subject: Re: bug#12019: join command - wrong column moved to start of line with the -v2 option From: Jean-Pierre Tosoni To: Eric Blake Content-Type: multipart/alternative; boundary=0016e64c1f14f8064404c56c8f3b X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12019 Cc: 12019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) --0016e64c1f14f8064404c56c8f3b Content-Type: text/plain; charset=ISO-8859-1 Hello again, I investigated against various sources at gnu.org. The bug exists at least in versions 8.5 to 8.9, and was corrected in version 8.10, probably by chance during implementation of output formatting extensions. Hence the problem comes from debian-squeeze using an old release, and this issue can be closed, as far as I am concerned. Thanks for taking the time to test it anyway. Jean-Pierre --0016e64c1f14f8064404c56c8f3b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello again,

I investigated against various sources at <= a href=3D"http://gnu.org" target=3D"_blank">gnu.org.
The bug = exists at least in versions 8.5 to 8.9, and was corrected in version 8.10, = probably by chance during implementation of output formatting extensions.

Hence the problem comes from debian-squeeze using an ol= d release, and this issue can be closed, as far as I am concerned.

Thanks for taking the time to test it anyway.
=A0
Jean-Pierre
--0016e64c1f14f8064404c56c8f3b-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 23 05:07:48 2012 Received: (at 12019-done) by debbugs.gnu.org; 23 Jul 2012 09:07:48 +0000 Received: from localhost ([127.0.0.1]:58868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StEcF-0003NV-9l for submit@debbugs.gnu.org; Mon, 23 Jul 2012 05:07:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16796) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StEcC-0003NN-0b for 12019-done@debbugs.gnu.org; Mon, 23 Jul 2012 05:07:45 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6N9190F018478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2012 05:01:09 -0400 Received: from [10.36.116.75] (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6N916cH005008 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 23 Jul 2012 05:01:07 -0400 Message-ID: <500D12D1.40704@draigBrady.com> Date: Mon, 23 Jul 2012 10:01:05 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#12019: join command - wrong column moved to start of line with References: <20120721232229.4349.qmail@kosh.dhis.org> In-Reply-To: <20120721232229.4349.qmail@kosh.dhis.org> X-Enigmail-Version: 1.3.2 Content-Type: multipart/mixed; boundary="------------090008020809000404000504" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12019-done Cc: Jean-Pierre Tosoni , Eric Blake , 12019-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is a multi-part message in MIME format. --------------090008020809000404000504 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q6N9190F018478 On 07/22/2012 12:22 AM, Alan Curry wrote: > Eric Blake writes: >> >> On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote: >>> Hello Maintainer, >>> =3D20 >>> I am using join v8.5 from debian squeeze. >>> =3D20 >> >>> now, the command: >>> join -v 2 -1 2 -2 3 a b >>> produces >>> =3D3D=3D3D=3D3D=3D3D wrong output =3D3D=3D3D=3D3D=3D3D >>> zzz222 zzz111 keyZ zzz333 >> >> I tried reproducing this with coreutils 8.17: >> >> $ cat a b >> axx111 keyX axx222 >> ayy111 keyY ayy222 >> xxx111 xxx222 keyX xxx333 >> zzz111 zzz222 keyZ zzz333 >> $ join -v2 -1 2 -2 3 a b >> keyZ zzz111 zzz222 zzz333 >> >> but I get the expected order. I don't see a specific mention of a fix >> for this in NEWS, so I have to wonder if this might be a bug in a >> debian-specific patch. Can you do some more investigating, such as >> compiling upstream coreutils to see if the problem still persists for = you=3D >> ? >=20 > It's not a Debian-specific problem. I can reproduce the bug with unalte= red > coreutils 8.9. It was apparently fixed by accident as a side effect of = some > other work on the join program. >=20 > commit d4db0cb1827730ed5536c12c0ebd024283b3a4db > Author: P=C3=A1draig Brady > Date: Wed Jan 5 11:52:54 2011 +0000 >=20 > join: add -o 'auto' to output a constant number of fields per line >=20 > d4db0cb1827730ed5536c12c0ebd024283b3a4db can be cherry-picked and appli= ed to > older coreutils to fix the bug. I tested this with upstream 8.9 and Deb= ian's > 8.5, both applied with fuzz but worked correctly. >=20 Thanks for looking into that Alan, and thanks for reporting this Jean-Pie= rre. I've installed the attached to document the fix and add a test. cheers, P=E1draig. --------------090008020809000404000504 Content-Type: text/plain; name="join-v2-test.diff" Content-Disposition: attachment; filename="join-v2-test.diff" Content-Transfer-Encoding: 7bit >From d75e93cb76c504e766e317ea0891285e4510ae67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 23 Jul 2012 09:29:57 +0100 Subject: [PATCH] tests: add a test for a previously fixed output format bug in join Add a test and NEWS entry for a bug inadvertently fixed in a refactoring in commit v8.9-32-gd4db0cb * tests/misc/join (v2-format): Add a new test. * THANKS.in: Add the reporter. * NEWS: Mention the old bug. * cfg.mk (old_NEWS_hash): Update. Reported-by: Jean-Pierre Tosoni --- NEWS | 4 ++++ THANKS.in | 1 + cfg.mk | 2 +- tests/misc/join | 4 ++++ 4 files changed, 10 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 113b30a..f1255ea 100644 --- a/NEWS +++ b/NEWS @@ -477,6 +477,10 @@ GNU coreutils NEWS -*- outline -*- join --header now skips the ordering check for the first line even if the other file is empty. [bug introduced in coreutils-8.5] + join -v2 now ensures the default output format prints the match field + at the start of the line when it is different to the match field for + the first file. [bug present in "the beginning".] + rm -f no longer fails for EINVAL or EILSEQ on file systems that reject file names invalid for that file system. diff --git a/THANKS.in b/THANKS.in index dc0b9dd..5db443b 100644 --- a/THANKS.in +++ b/THANKS.in @@ -275,6 +275,7 @@ Jari Aalto jari.aalto@cante.net Jarkko Hietaniemi jhi@epsilon.hut.fi Jarod Wilson jwilson@redhat.com Jean Charles Delepine delepine@u-picardie.fr +Jean-Pierre Tosoni jpt.7196@gmail.com Jeff Moore jbm@mordor.com Jeff Sheinberg jeff@bsrd.net Jens Elkner elkner@imsgroup.de diff --git a/cfg.mk b/cfg.mk index f780511..261efa5 100644 --- a/cfg.mk +++ b/cfg.mk @@ -45,7 +45,7 @@ export VERBOSE = yes # 4914152 9e export XZ_OPT = -8e -old_NEWS_hash = 4f70c9ef883feff18d9d5f66a941f3a8 +old_NEWS_hash = 38cad4d11c6ce866fc52213e3a4dc437 # Add an exemption for sc_makefile_at_at_check. _makefile_at_at_check_exceptions = ' && !/^cu_install_program =/' diff --git a/tests/misc/join b/tests/misc/join index a3fd1a8..62074b7 100755 --- a/tests/misc/join +++ b/tests/misc/join @@ -147,6 +147,10 @@ my @tv = ( ["a,1,,2\nb,1,2\n", "a,3,4\nb,3,4\n"], "a,1,,2,3,4\nb,1,2,,3,4\n"], +# For -v2, print the match field correctly with the default output format, +# when that match field is different between file 1 and file 2. Fixed in 8.10 +['v2-order', '-v2 -2 2', ["", "2 1\n"], "1 2\n", 0], + # From Tim Smithers: fixed in 1.22l ['trailing-sp', '-t: -1 1 -2 1', ["a:x \n", "a:y \n"], "a:x :y \n", 0], -- 1.7.6.4 --------------090008020809000404000504-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 23 05:51:14 2012 Received: (at 12019) by debbugs.gnu.org; 23 Jul 2012 09:51:14 +0000 Received: from localhost ([127.0.0.1]:59091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StFIH-0004R1-VA for submit@debbugs.gnu.org; Mon, 23 Jul 2012 05:51:14 -0400 Received: from mx.meyering.net ([88.168.87.75]:53687) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StFIG-0004Qs-2W for 12019@debbugs.gnu.org; Mon, 23 Jul 2012 05:51:13 -0400 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8C4116404E; Mon, 23 Jul 2012 11:44:36 +0200 (CEST) From: Jim Meyering To: 12019@debbugs.gnu.org Subject: Re: bug#12019: join command - wrong column moved to start of line with In-Reply-To: <500D12D1.40704@draigBrady.com> (=?iso-8859-1?Q?=22P=E1draig?= Brady"'s message of "Mon, 23 Jul 2012 10:01:05 +0100") References: <20120721232229.4349.qmail@kosh.dhis.org> <500D12D1.40704@draigBrady.com> Date: Mon, 23 Jul 2012 11:44:36 +0200 Message-ID: <87txwyn75n.fsf@rho.meyering.net> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12019 Cc: P@draigBrady.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) P=E1draig Brady wrote: ... > Thanks for looking into that Alan, and thanks for reporting this Jean-Pie= rre. > I've installed the attached to document the fix and add a test. ... > Subject: [PATCH] tests: add a test for a previously fixed output format b= ug > in join > > Add a test and NEWS entry for a bug inadvertently fixed in > a refactoring in commit v8.9-32-gd4db0cb > > * tests/misc/join (v2-format): Add a new test. > * THANKS.in: Add the reporter. > * NEWS: Mention the old bug. > * cfg.mk (old_NEWS_hash): Update. > > Reported-by: Jean-Pierre Tosoni > --- > NEWS | 4 ++++ > THANKS.in | 1 + > cfg.mk | 2 +- > tests/misc/join | 4 ++++ Nice work. Thanks. From unknown Thu Sep 11 08:10:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Aug 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator