* sql-connect-mysql dies if sql-port is nil (the default)
@ 2010-06-12 20:21 rogers-emacs
2010-06-15 3:36 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: rogers-emacs @ 2010-06-12 20:21 UTC (permalink / raw)
To: emacs-devel
To reproduce, simply do "emacs -Q", then invoke "M-x sql-mysql", and
give it some random database parameters. It is not necessary to have a
valid database, or even a working server, as emacs dies before starting
the client. See below for a simple fix.
-- Bob Rogers
http://www.rgrjr.com/
------------------------------------------------------------------------
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index e4df102..19e60da 100644
*** a/lisp/progmodes/sql.el
--- b/lisp/progmodes/sql.el
***************
*** 3119,3125 ****
(setq params (append (list sql-database) params)))
(if (not (string= "" sql-server))
(setq params (append (list (concat "--host=" sql-server)) params)))
! (if (not (and sql-port (numberp sql-port)))
(setq params (append (list (concat "--port=" (number-to-string sql-port))) params)))
(if (not (string= "" sql-password))
(setq params (append (list (concat "--password=" sql-password)) params)))
--- 3119,3125 ----
(setq params (append (list sql-database) params)))
(if (not (string= "" sql-server))
(setq params (append (list (concat "--host=" sql-server)) params)))
! (if (and sql-port (numberp sql-port))
(setq params (append (list (concat "--port=" (number-to-string sql-port))) params)))
(if (not (string= "" sql-password))
(setq params (append (list (concat "--password=" sql-password)) params)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-15 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12 20:21 sql-connect-mysql dies if sql-port is nil (the default) rogers-emacs
2010-06-15 3:36 ` Glenn Morris
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.