unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: rogers-emacs@rgrjr.dyndns.org
To: emacs-devel@gnu.org
Subject: sql-connect-mysql dies if sql-port is nil (the default)
Date: Sat, 12 Jun 2010 16:21:37 -0400	[thread overview]
Message-ID: <19475.60497.130003.201595@rgr.rgrjr.com> (raw)

   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	other threads:[~2010-06-12 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12 20:21 rogers-emacs [this message]
2010-06-15  3:36 ` sql-connect-mysql dies if sql-port is nil (the default) Glenn Morris

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=19475.60497.130003.201595@rgr.rgrjr.com \
    --to=rogers-emacs@rgrjr.dyndns.org \
    --cc=emacs-devel@gnu.org \
    /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 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).