From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 07:39:20 2012 Received: (at submit) by debbugs.gnu.org; 11 Jul 2012 11:39:20 +0000 Received: from localhost ([127.0.0.1]:33120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SovGK-0004uA-Ap for submit@debbugs.gnu.org; Wed, 11 Jul 2012 07:39:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60941) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SovGI-0004u3-4O for submit@debbugs.gnu.org; Wed, 11 Jul 2012 07:39:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SovAu-0005lB-Ca for submit@debbugs.gnu.org; Wed, 11 Jul 2012 07:33:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_XBL autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:43402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SovAu-0005kv-9e for submit@debbugs.gnu.org; Wed, 11 Jul 2012 07:33:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SovAp-0000sG-8z for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 07:33:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SovAh-0005gj-2p for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 07:33:38 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:51742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SovAg-0005c0-P6 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 07:33:31 -0400 Received: from murr.brightoffice.local (no-dns-yet-88-98-41-121.zen.net.uk [88.98.41.121]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MWOFC-1SIOlh3Iss-00XgqW; Wed, 11 Jul 2012 13:33:27 +0200 From: Francis Devereux Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 24.1; "Unable to locate SQL program" when using sql-mysql with tramp and the client does not have the SQL program (but the server does) Date: Wed, 11 Jul 2012 12:33:27 +0100 Message-Id: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) X-Provags-ID: V02:K0:VUaHciGq6wi7pDSkM1J3TxfsCJ8RZOkhopY0C/lvsny Cj5njg7XoXfJTTdiJvxhaVVArAM0ZGVUl8Wvvk+NmRgIByZuea 8UjKeQU/Kgebe18uxU6UpD8fi1A//+aT3iKqwBhTfkMwfLj37C 6RRqDhHdEZViziIFdFAMsvpbGnUeHUk5HsBc1Vjf5d2jD2Q9nw +wojomRuSDyy26rnf47XKh3CWWNi6/ja+vRVevtSA4BGFd3DWf treNExvQv6gwoFaIa4b/xLMy/s2hrSfytUXEndMsaHAGF3xiWZ YoVejupUIKMdfMsa+VJSW1LhSeAIX3OtnRvkI3SlBxVMNwAH/g 2Du8FtF+nxECq2quaQmzLBDAFP2Bi9i2r0g8SouxdYeeZ1KWvG DW2o+69XcueNA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Steps to reproduce: 1) Have a client machine (i.e. the machine running emacs) with no mysql executable on the PATH, and a server machine which does have mysql on the path. 2) C-x C-f /server: RETURN (to open a tramp dired buffer to the server) 3) M-x sql-mysql RETURN, and then fill in username/password/database, leave server blank 4) You get the message "Unable to locate SQL program 'mysql'" However, if you comment out the following lines in sql-comint in sql.el: ; (unless (executable-find program) ; (error "Unable to locate SQL program \'%s\'" program)) then it works - you get an SQLi buffer running mysql in an ssh session on the server. I'm running Emacs on OS X, server is running Debian GNU/Linux 6.0 (also happens with Red Hat servers). Can test with a GNU/Linux client if required. Francis In GNU Emacs 24.1.1 (x86_64-apple-darwin11.4.0, NS apple-appkit-1138.47) of 2012-06-10 on jupiter-wifi.repton.int Windowing system distributor `Apple', version 10.3.1138 Configured using: `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Dired by date Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: a s s e t b a n k _ M-x r e p o r t - e m Recent messages: Making completion list... Quit [3 times] Loading sql...done goto-history-element: Beginning of history; no preceding item Creating customization items... Creating customization items ...done Resetting customization items...done Creating customization setup...done Quit Login... sql-comint: Unable to locate SQL program 'mysql' Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils sql thingatpt cus-edit cus-start cus-load wid-edit help-mode easymenu view dired tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ansi-color ring format-spec advice help-fns advice-preload tramp-loaddefs regexp-opt time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 10:37:09 2012 Received: (at 11908) by debbugs.gnu.org; 13 Jul 2012 14:37:09 +0000 Received: from localhost ([127.0.0.1]:39478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpgzU-0008IS-2A for submit@debbugs.gnu.org; Fri, 13 Jul 2012 10:37:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:56283) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SpgzR-0008IK-AP for 11908@debbugs.gnu.org; Fri, 13 Jul 2012 10:37:06 -0400 Received: (qmail invoked by alias); 13 Jul 2012 14:31:25 -0000 Received: from p57BB97A2.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.162] by mail.gmx.net (mp001) with SMTP; 13 Jul 2012 16:31:25 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18YojAUAMQY5uCW/lJii5J9e9GefcJ39YWVBSl7yA XPDrLDMAyV5btI From: Michael Albinus To: Francis Devereux Subject: Re: bug#11908: 24.1; "Unable to locate SQL program" when using sql-mysql with tramp and the client does not have the SQL program (but the server does) References: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> Date: Fri, 13 Jul 2012 16:31:23 +0200 In-Reply-To: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> (Francis Devereux's message of "Wed, 11 Jul 2012 12:33:27 +0100") Message-ID: <87fw8vg2bo.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11908 Cc: 11908@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Francis Devereux writes: > However, if you comment out the following lines in sql-comint in sql.el: > ; (unless (executable-find program) > ; (error "Unable to locate SQL program \'%s\'" program)) > then it works - you get an SQLi buffer running mysql in an ssh session on > the server. Indeed, `executable-find' does not work in this case. I would propose the following check, which keeps the test for local processes: --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs/lisp/progmodes/sql.el.~109053~ 2012-07-13 16:25:32.863194360 +0200 --- /home/albinus/src/emacs/lisp/progmodes/sql.el 2012-07-13 16:24:52.026991734 +0200 *************** *** 4146,4153 **** passed as command line arguments." (let ((program (sql-get-product-feature product :sqli-program)) (buf-name "SQL")) ! ;; make sure we can find the program ! (unless (executable-find program) (error "Unable to locate SQL program \'%s\'" program)) ;; Make sure buffer name is unique (when (sql-buffer-live-p (format "*%s*" buf-name)) --- 4146,4155 ---- passed as command line arguments." (let ((program (sql-get-product-feature product :sqli-program)) (buf-name "SQL")) ! ;; Make sure we can find the program. `executable-find' does not ! ;; work for remote hosts; we suppress the check there. ! (unless (or (file-remote-p default-directory) ! (executable-find program)) (error "Unable to locate SQL program \'%s\'" program)) ;; Make sure buffer name is unique (when (sql-buffer-live-p (format "*%s*" buf-name)) --8<---------------cut here---------------end--------------->8--- Could you, please, check, whether this works for you? > Francis Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 10:51:24 2012 Received: (at 11908) by debbugs.gnu.org; 13 Jul 2012 14:51:24 +0000 Received: from localhost ([127.0.0.1]:39483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SphDI-0000CR-4e for submit@debbugs.gnu.org; Fri, 13 Jul 2012 10:51:24 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:52478) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SphDF-0000CH-Jg for 11908@debbugs.gnu.org; Fri, 13 Jul 2012 10:51:22 -0400 Received: from neptune.brightoffice.local (no-dns-yet-88-98-41-121.zen.net.uk [88.98.41.121]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MNyEJ-1Sx76s3BOt-006y4O; Fri, 13 Jul 2012 16:45:41 +0200 Subject: Re: bug#11908: 24.1; "Unable to locate SQL program" when using sql-mysql with tramp and the client does not have the SQL program (but the server does) Mime-Version: 1.0 (Apple Message framework v1280) Content-Type: text/plain; charset=us-ascii From: Francis Devereux In-Reply-To: <87fw8vg2bo.fsf@gmx.de> Date: Fri, 13 Jul 2012 15:45:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <81E3E56C-E75C-4F0C-9F81-B08B11EB0611@devrx.org> References: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> <87fw8vg2bo.fsf@gmx.de> To: Michael Albinus X-Mailer: Apple Mail (2.1280) X-Provags-ID: V02:K0:O/DFKFAmAxSOpROIzq78UHwTrl+mHYlpZHafP7HaZW/ ZPV5RSYxGKFlFXb+qSPz4u0+id3pa3GoMrnniD0MBl8T9vXKGT UANg6I6ca3N1OdRLPXFmmsOIn+bwVeR7oumCNHZXPEADoImmde dsGm8qUHGmLHh9eTt0occObvEpVjOJIW7ymtHPbPGKXWE4zyJJ 4o8q9YNrtx58jYBzhEzr2pDtdm4iCs9rZStGggApV9myUL+Mfe 2lPZFMxFNM0RnnCzg1n2HOBMX+LzJnmbPBrFyZn0WirnfznHWw 8a4zWYQ3ohiK/tcnEgMeYYJw+B7BBvB67by0whzwi2cgD0sax7 wBuYirqF6OMjySFKeeiOGd4hyWqL2E/WMFGtI4BFGBPt0TEci1 62U3x0Axrf7ZA== X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11908 Cc: 11908@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 13 Jul 2012, at 15:31, Michael Albinus wrote: > Francis Devereux writes: >=20 >> However, if you comment out the following lines in sql-comint in = sql.el: >> ; (unless (executable-find program) >> ; (error "Unable to locate SQL program \'%s\'" program)) >> then it works - you get an SQLi buffer running mysql in an ssh = session on >> the server. >=20 > Indeed, `executable-find' does not work in this case. I would propose > the following check, which keeps the test for local processes: [ patch snipped] > Could you, please, check, whether this works for you? Yes, this does work for me. I have tested both for a remote host, where = the check is correctly skipped, and for the local host, where the check = is done and correctly fails when sql-mysql-program can't be found. Thanks Michael :-) Francis From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 11:06:19 2012 Received: (at 11908-done) by debbugs.gnu.org; 13 Jul 2012 15:06:19 +0000 Received: from localhost ([127.0.0.1]:39501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SphRh-0000Y8-Py for submit@debbugs.gnu.org; Fri, 13 Jul 2012 11:06:18 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:35435) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SphRe-0000Xz-IY for 11908-done@debbugs.gnu.org; Fri, 13 Jul 2012 11:06:16 -0400 Received: (qmail invoked by alias); 13 Jul 2012 15:00:35 -0000 Received: from p57BB97A2.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.162] by mail.gmx.net (mp071) with SMTP; 13 Jul 2012 17:00:35 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+g0f4tTsGgQZ+K+x9c7TReMM0NHwELv238C2c66y NkJMecPBE+rWP1 From: Michael Albinus To: Francis Devereux Subject: Re: bug#11908: 24.1; "Unable to locate SQL program" when using sql-mysql with tramp and the client does not have the SQL program (but the server does) References: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> <87fw8vg2bo.fsf@gmx.de> <81E3E56C-E75C-4F0C-9F81-B08B11EB0611@devrx.org> Date: Fri, 13 Jul 2012 17:00:33 +0200 In-Reply-To: <81E3E56C-E75C-4F0C-9F81-B08B11EB0611@devrx.org> (Francis Devereux's message of "Fri, 13 Jul 2012 15:45:41 +0100") Message-ID: <87bojjg0z2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11908-done Cc: 11908-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Francis Devereux writes: > Yes, this does work for me. I have tested both for a remote host, > where the check is correctly skipped, and for the local host, where > the check is done and correctly fails when sql-mysql-program can't be > found. Thanks for the test. I've committed the patch to the trunk, closing this bug. > Thanks Michael :-) > > Francis Best regards, Michael. From unknown Fri Aug 15 15:38:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Aug 2012 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator