From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.help Subject: Re: MySQL exits abnormally in Emacs Date: Fri, 15 Dec 2006 19:16:55 +0100 Message-ID: References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166206645 7017 80.91.229.10 (15 Dec 2006 18:17:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2006 18:17:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 15 19:17:23 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GvHcU-0001nz-6B for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Dec 2006 19:17:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvHcT-0008OF-Ih for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Dec 2006 13:17:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GvHcC-0008Kw-9s for help-gnu-emacs@gnu.org; Fri, 15 Dec 2006 13:17:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GvHc9-0008Io-RE for help-gnu-emacs@gnu.org; Fri, 15 Dec 2006 13:16:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvHc9-0008Ih-Ln for help-gnu-emacs@gnu.org; Fri, 15 Dec 2006 13:16:57 -0500 Original-Received: from [66.249.92.172] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GvHc9-0000IZ-DZ for help-gnu-emacs@gnu.org; Fri, 15 Dec 2006 13:16:57 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so1057432ugf for ; Fri, 15 Dec 2006 10:16:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f+mfYZ0ifrKAD9u6fFBa/I1mdR8W4R38YdAykmm9uo2smxAVgwYASWfeRrvjxUdtpRDjk1B1wey6CWHfMkz2WMeOxiG+jmmgrMum7oQ4p/Nq1avEw6eJLWQLEHACGKCVP4lboHlVDh/NpFczSTmp8XQliEM4DBDlsHZilMhET1s= Original-Received: by 10.82.152.16 with SMTP id z16mr79576bud.1166206615942; Fri, 15 Dec 2006 10:16:55 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Fri, 15 Dec 2006 10:16:55 -0800 (PST) Original-To: "Corey Foote" In-Reply-To: Content-Disposition: inline X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39588 Archived-At: On 12/14/06, Corey Foote 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