unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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

* Re: sql-connect-mysql dies if sql-port is nil (the default)
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2010-06-15  3:36 UTC (permalink / raw)
  To: rogers-emacs; +Cc: emacs-devel


It is better to report bugs to the bug list; but thanks, and applied.



^ 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).