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

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

am 20.08.2006 03:51:47 von sparkw

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

*Problem*:
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:*

1.
From: Benjamin Riefenstahl - view profile
Email: Benjamin Riefenstahl
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.

2.
From: Nesa - view profile
Email: Nesa
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



3.
From: Jost Boekemeier - view profile
Email: Jost Boekemeier
Groups: gnu.emacs.help

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.