From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1904: 23.0.60; [PATCH] sql-sqlite doesn't work Date: Thu, 15 Jan 2009 09:06:40 -0500 Message-ID: <8763kgoe8f.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 1904@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1232029595 18016 80.91.229.12 (15 Jan 2009 14:26:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 14:26:35 +0000 (UTC) Cc: 1904@emacsbugs.donarmstrong.com, Ian Eure To: Michael Mauger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 15:27:46 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNTBs-0003vj-Nh for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 15:27:24 +0100 Original-Received: from localhost ([127.0.0.1]:35851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNTAc-0007kK-4k for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 09:26:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNT8C-0006c3-1i for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNT88-0006YH-1l for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:33 -0500 Original-Received: from [199.232.76.173] (port=49130 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNT87-0006Y7-P1 for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46576) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNT87-0004tj-87 for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:31 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FENQSL015912; Thu, 15 Jan 2009 06:23:29 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0FEA5in011530; Thu, 15 Jan 2009 06:10:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 15 Jan 2009 14:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1904 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1904-submit@emacsbugs.donarmstrong.com id=B1904.123202838611053 (code B ref 1904); Thu, 15 Jan 2009 14:10:05 +0000 Original-Received: (at 1904) by emacsbugs.donarmstrong.com; 15 Jan 2009 14:06:26 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FE6NZM011047 for <1904@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 06:06:24 -0800 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id DE70657E21A; Thu, 15 Jan 2009 09:06:40 -0500 (EST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 15 Jan 2009 09:23:33 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24162 Archived-At: Hi Michael, could you evaluate this bug report and patch? Thanks. Ian Eure wrote: > The (sql-sqlite) function prompts for username, password, and server > even though these don=E2=80=99t apply to SQLite. Further, it adds options= for > them (--host, --user, --password) to the arguments of sql-sqlite- > program. The SQLite CLI doesn=E2=80=99t understand or support these, and > returns this error if they=E2=80=99re provided: > > sqlite3: unknown option: -user=3Dieure > > (The sqlite 2.8.x binary behaves in the same way.) > > For these reasons, I=E2=80=99ve taken the following measures: > > 1. Removed 'user, 'password and 'server from :sqli-login for sqlite=20=20 > in sql-product-alist; this prevents them from being read from the user=20= =20 > when (sql-sqlite) is invoked. > 2. Removed the addition of the --host, --user, and --password=20=20 > arguments to 'params in (sql-connect-sqlite). > > Patch against Emacs CVS HEAD (sql-mode 2.0.2) follows. --- sql.el.~1.61.~ 2009-01-14 10:44:58.000000000 -0800 +++ sql.el 2009-01-14 10:50:09.000000000 -0800 @@ -356,7 +356,7 @@ :sqli-prompt-length 0) (sqlite :font-lock sql-mode-sqlite-font-lock-keywords - :sqli-login (user password server database) + :sqli-login (database) :sqli-connect sql-connect-sqlite :sqli-prompt-regexp "^sqlite> " :sqli-prompt-length 8) @@ -2611,12 +2611,6 @@ (let ((params)) (if (not (string=3D "" sql-database)) (setq params (append (list sql-database) params))) - (if (not (string=3D "" sql-server)) - (setq params (append (list (concat "--host=3D" sql-server)) params))) - (if (not (string=3D "" sql-password)) - (setq params (append (list (concat "--password=3D" sql-password)) para= ms))) - (if (not (string=3D "" sql-user)) - (setq params (append (list (concat "--user=3D" sql-user)) params))) (if (not (null sql-sqlite-options)) (setq params (append sql-sqlite-options params))) (set-buffer (apply 'make-comint "SQL" sql-sqlite-program