[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1904: 23.0.60; [PATCH] sql-sqlite doesn't work
From: |
Chong Yidong |
Subject: |
bug#1904: 23.0.60; [PATCH] sql-sqlite doesn't work |
Date: |
Thu, 15 Jan 2009 09:06:40 -0500 |
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