help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MySQL exits abnormally in Emacs


From: Corey Foote
Subject: Re: MySQL exits abnormally in Emacs
Date: Fri, 15 Dec 2006 22:37:36 -0500

Thanks for your reply to my posting. However, I think I didn't explain
the problem I'm having well enough. Please allow me to try to describe it
more clearly.

When I type queries into the process buffer and press enter, no
results are returned until I interrupt the process with C-c C-c. Only
when the process is interrupted are any results returned. The results
off all queries are then returned together and without any boxes being
drawn around them. For example, if I type into the process buffer the
following:

select now();RET

select count(*) from mysql.user;RET

No results are returned until I type C-c C-c in the process buffer at
which point the results are returned all at once and without
formatting:

 C-c C-cnow()
2006-12-15 22:15:55
count(*)
5

Process SQL exited abnormally with code 1

It would be nice to be able to get the results I need without having
to terminate the process in order to see them.

Thanks again,

Corey Foote
coreyfoote@hotmail.com



From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Corey Foote" <coreyfoote@hotmail.com>
CC: help-gnu-emacs@gnu.org
Subject: Re: MySQL exits abnormally in Emacs
Date: Fri, 15 Dec 2006 19:16:55 +0100

On 12/14/06, Corey Foote <coreyfoote@hotmail.com> wrote:

I type my query and press C-c C-c and get the following error:

select now();  C-c C-cnow()
2006-12-14 14:11:25

Process SQL exited abnormally with code 1

Where do you type C-c C-c? If it is in the process buffer (the one
where mysql is running), C-c C-c is bound to
`comint-interrupt-subjob', so it's no wonder that it gets interrupted.
In that buffer it's enough to press ENTER after queries:

select count(*) from mysql.user;
+----------+
| count(*) |
+----------+
|        5 |
+----------+

C-c C-c (`sql-send-paragraph') is used from a SQL buffer that you
associate with the inferior process (the subprocess) that is running
mysql.  For example, create a buffer in SQL mode (either setting it
with "M-x sql-mode" or visiting a .SQL file), and then do "M-x
sql-product-interactive", or choose the option "Start SQLi Session" in
the SQL menu.  That way you'll have a running mysql client in a buffer
associated with your SQL source buffer. Then you can write SQL code in
your source buffer and send it to the inferior process with C-c C-c.

Take a look at the file lisp/progmodes/sql.el.

                   /L/e/k/t/u

_________________________________________________________________
Get the latest Windows Live Messenger 8.1 Beta version. Join now. http://ideas.live.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]