X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 	tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,TW_RX,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4BBBD475.2000307@bopp.net>
References: <Pine.NEB.4.64.1004061803190.4624@panix2.panix.com> 	 <4BBBD475.2000307@bopp.net>
Date: Wed, 7 Apr 2010 06:44:32 +0100
Received: by 10.239.182.82 with SMTP id p18mr807668hbg.31.1270619072084; Tue,  	06 Apr 2010 22:44:32 -0700 (PDT)
Message-ID: <n2m416096c61004062244h1be84292u973ddb717ab8d6d5@mail.gmail.com>
Subject: Re: MySQL client, prompt, redux
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Jeremy Bopp:
> Tim McDaniel wrote:
>> =C2=A0From Google searches and some experience, it appears that it's a
>> long-standing situation that, if you run the mysql.exe client program
>> under mintty or rxvt from Cygwin, then mysql figures that it's not on
>> an interactive terminal and therefore does not prompt. =C2=A0Is there yet
>> any workaround other than simply using cmd.exe instead? =C2=A0(In mintty,
>> BTW, "cmd /c mysql ..." doesn't prompt, presumably for the same reason
>> that mysql alone doesn't prompt.)
>
> If you are using the Windows-native build of the mysql client, then
> there is no way to fix this. =C2=A0That build of the client expects to ha=
ve a
> real Windows console which mintty and rxvt are unable to provide.

Yep. It probably calls isatty() on the standard streams, which in the
case of the Windows C library (MSVCRT) returns false for pipes, which
Cygwin's pty emulation is based on.

It shouldn't be horrendously difficult, however, to add a switch for
forcing interactive mode to the mysql client. Python does have such a
switch. Perhaps you could raise this on the relevant mysql mailing
list?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

