List:General Discussion« Previous MessageNext Message »
From:Shankar Unni Date:October 30 2001 6:29pm
Subject:BUG: Need option to disable "tty" check in mysql client
View as plain text  
Please treat this as a fairly urgent problem. It's simple to fix, but the 
effects of the bug are a severe loss of functionality under Win32.

Several options in the mysql client (--batch, --silent, etc.) have no 
corresponding options to reverse that behavior (e.g. --no-batch, 
--no-silent, etc.), which is generally accepted option style.

Compounded with this is the fact that the mysql client does a check on 
isatty(0) and isatty(1), and if it fails this check, it automatically 
forces the client into batch, silent, quit-on-error mode.

Two things need to be done:

(a) There needs to be an option to disable the TTY check in the client. 
This is most important when running "mysql" under Emacs (using "sql-mysql") 
on non-Unix platforms (which don't have pseudo-ttys). How about "--assume-tty"?

(b) Also, the check of isatty(0), etc., should be done *AFTER* the option 
checks, not before, and should be disabled if the option above is set.

Finally, as a matter of style,

(c) Options like "--batch", "--silent", etc., that toggle boolean states, 
all need to have opposite options of the form "--no-batch", "--no-silent", 
etc.  It's enough to implement these as long-form-only.

These changes are actually fairly trivial to implement, and I would have 
been glad to submit a patch for this, except that the Win32 port of MySQL 
needs Visual C++ to compile, which I don't have access to.

Thanks much in advance,
--
Shankar Unni.

Thread
BUG: Need option to disable "tty" check in mysql clientShankar Unni30 Oct
  • Re: BUG: Need option to disable "tty" check in mysql clientSinisa Milivojevic31 Oct