MySQL client, prompt, redux

Andy Koppe andy.koppe@gmail.com
Wed Apr 7 05:44:00 GMT 2010


Jeremy Bopp:
> Tim McDaniel wrote:
>>  From 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.  Is there yet
>> any workaround other than simply using cmd.exe instead?  (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.  That build of the client expects to have 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



More information about the Cygwin mailing list