all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Michael Mauger <mmaug@yahoo.com>
Cc: 1904@emacsbugs.donarmstrong.com, Ian Eure <ian@digg.com>
Subject: bug#1904: 23.0.60; [PATCH] sql-sqlite doesn't work
Date: Thu, 15 Jan 2009 09:06:40 -0500	[thread overview]
Message-ID: <8763kgoe8f.fsf@cyd.mit.edu> (raw)

Hi Michael, could you evaluate this bug report and patch?  Thanks.

Ian Eure <ian@digg.com> wrote:

> The (sql-sqlite) function prompts for username, password, and server
> even though these don’t apply to SQLite. Further, it adds options for
> them (--host, --user, --password) to the arguments of sql-sqlite-
> program. The SQLite CLI doesn’t understand or support these, and
> returns this error if they’re provided:
>
> sqlite3: unknown option: -user=ieure
>
> (The sqlite 2.8.x binary behaves in the same way.)
>
> For these reasons, I’ve taken the following measures:
>
>  1. Removed 'user, 'password and 'server from :sqli-login for sqlite  
> in sql-product-alist; this prevents them from being read from the user  
> when (sql-sqlite) is invoked.
>  2. Removed the addition of the --host, --user, and --password  
> 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= "" sql-database))
     (setq params (append (list sql-database) params)))
-    (if (not (string= "" sql-server))
-    (setq params (append (list (concat "--host=" sql-server)) params)))
-    (if (not (string= "" sql-password))
-    (setq params (append (list (concat "--password=" sql-password)) params)))
-    (if (not (string= "" sql-user))
-    (setq params (append (list (concat "--user=" 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






             reply	other threads:[~2009-01-15 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 14:06 Chong Yidong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-14 18:57 bug#1904: 23.0.60; [PATCH] sql-sqlite doesn't work Ian Eure

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763kgoe8f.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=1904@emacsbugs.donarmstrong.com \
    --cc=ian@digg.com \
    --cc=mmaug@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.