background and partial solution of sql-myql mode of Emacs on WinNT

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I collect the following messages from Usenet and make a summary.

There is no buffer output or output prompt ( the line after output),
when a mysql process is initiated in Emacs WinNT.

*Partial solution*:

(setq sql-mysql-options '("-C" "-t" "-f" "-n"))

display the output, but still without output prompt.

*options details*:

`-C' --compress        Use compression in server/client protocol.
`-t' --table           Output in table format.
`-f' --force           Continue even if we get an sql error.
`-n' --unbuffered      Flush buffer after each query.

*Related messages:*

From:           Benjamin Riefenstahl - view profile
Groups:                 comp.emacs

With sql-mysql loaded, see C-h v sql-mysql-options.  Does it help to
customize this variable to include the option "-n"?

Background: MS Windows doesn't have pseudo-ttys (terminals) in the way
that Unix and GNU/Linux do.  Emacs on MS Windows runs programs with
pipes connected to stdin and stdout to communicate with them.  Lots of
programs switch to non-interactive mode when they see that stdin is
not a terminal.  This includes buffering their output and not
outputting prompts.

So on MS Windows you often need to force command-line shells to go to
interactive mode, if you want to run them in Emacs.

From:           Nesa - view profile
Groups:                 comp.emacs

Documentation for sql-mysql-options also
suggested to use "-C" "-t" "-f" switches on Windows and that also fixed
mysql process termination whenever there was a command syntax problem

From:           Jost Boekemeier - view profile

As I said, they require a tty to enter interactive mode. Even with
the switches you've given, mysql doesn't enter interactive mode. The
-f switch just causes it to not exit from batch mode when an
error occurs.

Site Timeline