emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sql-connect-mysql dies if sql-port is nil (the default)


From: rogers-emacs
Subject: sql-connect-mysql dies if sql-port is nil (the default)
Date: 2010年6月12日 16:21:37 -0400

 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)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]

AltStyle によって変換されたページ (->オリジナル) /