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: Juanma Barranquero
Subject: Re: MySQL exits abnormally in Emacs
Date: Fri, 15 Dec 2006 19:16:55 +0100

On 12/14/06, Corey Foote <address@hidden> 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




reply via email to

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