From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UCKmD9cjxGMfHwAAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 17:03:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yFWvD9cjxGMfzAAA9RJhRA (envelope-from ) for ; Sun, 15 Jan 2023 17:03:35 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BB6A414429 for ; Sun, 15 Jan 2023 17:03:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH5Sb-0006TK-Nb; Sun, 15 Jan 2023 11:02:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH5S8-00067j-SF for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 11:01:48 -0500 Received: from mail.bundesbrandschatzamt.de ([198.7.63.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH5RQ-0001sF-TG for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 11:01:08 -0500 Received-SPF: pass (mail.bundesbrandschatzamt.de: authenticated connection) receiver=mail.bundesbrandschatzamt.de; client-ip=91.64.203.22; helo=smtpclient.apple; envelope-from=baron@bundesbrandschatzamt.de; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from smtpclient.apple (ip5b40cb16.dynamic.kabel-deutschland.de [91.64.203.22]) (authenticated bits=0) by mail.bundesbrandschatzamt.de (8.14.7/8.14.7) with ESMTP id 30FG0iWE005232 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 15 Jan 2023 16:00:46 GMT From: Andreas Gerler Content-Type: multipart/signed; boundary="Apple-Mail=_039D28D8-E8CD-41DF-B41F-3DCCC5F3614F"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: [BUG] ob-sql sql-connection-alist Message-Id: Date: Sun, 15 Jan 2023 17:00:37 +0100 To: emacs-orgmode@gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.bundesbrandschatzamt.de [198.7.63.95]); Sun, 15 Jan 2023 16:00:46 +0000 (UTC) X-DCC-MGTINTERNET-Metrics: heimdall.bundesbrandschatzamt.de 1170; Body=1 Fuz1=1 Fuz2=1 X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: PGP_BLOCK,SPF_PASS,UNPARSEABLE_RELAY Received-SPF: permerror client-ip=198.7.63.95; envelope-from=baron@bundesbrandschatzamt.de; helo=mail.bundesbrandschatzamt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673798615; a=rsa-sha256; cv=none; b=Tri1Q0L+D9sieNjQVuwXEIPgeQbxgM4Znb+mQTbghfaG/1Yd7ZxODzTQqClhLlAMvZN1iC i2zUOvA2RSOLIYr+UoqYlQOSVyzo6crMhEEqqO5z/IU/e6mLgDJh3eHOYBRLOfL+XXHAqG vVbQq3m2np2ysuI/eq0MTrSwKkcqYW26NRuVxsR3mYVCwX3jNgKJi8UUlqCxHpEIx014Ib pFIUxv1Vl/+SIJeTCWLPkLA8J6TAPVL4ODeFiDAjI+jbgdGr10srEPaIrdpv3xneX0GsMd AdDOjo/v03Lj22JqTMZvSavB0lQnZB0eQLfl6uxViEFhEyQMNlRavMiSH6HXYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673798615; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=yA7HuWK++F2pDj15zHxoRIpKK8+Jxqx8DYMG51mvYdU=; b=Fhb+P6p7PJFc1iRC8r2fCIERBNJEqQqzLdG7t6cJw0RPJOt+FFLzOecNtoRp+jhSCrJSn5 y7IpIakwHbylb1Cf71M6+JBDMfoYfDucVedKrMNoBe+rZKGvBgNiaAX4z1eU0X7taXx99Q wIlP4satvy5ZMlAQciCAqGJs+L7ltrO1jMvphVpCAlEkwNgMZ+dmB3nlf25/Rhm0thD/yK yu2TXnSxzHjoTS805TSDjGgKKT6/jU9Q4Ka1eb85z9o5YEZVC3eSC3+Zsi9dc6oxu2h9Ml i31dobYs0YWpLojBWqEpOKWFRmgQaGHoEWokaDXBMrpMI8p8hD1Ptb8R3c7dcA== X-Migadu-Spam-Score: -4.52 X-Spam-Score: -4.52 X-Migadu-Queue-Id: BB6A414429 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-TUID: 7f8llLDk+YvY --Apple-Mail=_039D28D8-E8CD-41DF-B41F-3DCCC5F3614F Content-Type: multipart/mixed; boundary="Apple-Mail=_44F233BD-363C-484F-9B80-9A1D0EADFF84" --Apple-Mail=_44F233BD-363C-484F-9B80-9A1D0EADFF84 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 HI! Last week I heard about using ob-sql with credentials stored in the = variable used by isql. However I had to modify ob-sql to get it actually working. Can somebody test the pach before I send in a commit? #+begin_src sql :engine mysql :dbconnection testdb show tables; #+end_src (setq sql-connection-alist '((testdb (sql-product 'mysql) (sql-server "127.0.0.1") (sql-user "mysql=E2=80=9D) (sql-port 3306) (sql-password =E2=80=9Cfoo") (sql-database "mysql")))) I was considering writing another patch to map the sql-product to = engine. That way we could get rid of another parameter in the src block. Opinions? --Apple-Mail=_44F233BD-363C-484F-9B80-9A1D0EADFF84 Content-Disposition: attachment; filename=ob-sql.el.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="ob-sql.el.diff" Content-Transfer-Encoding: 7bit diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 39a4573a5..92a157085 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -1,6 +1,6 @@ ;;; ob-sql.el --- Babel Functions for SQL -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2023 Free Software Foundation, Inc. +;; Copyright (C) 2009-2022 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Maintainer: Daniel Kraus @@ -234,7 +234,7 @@ database connections." (:database . sql-database))) (mapped-name (cdr (assq name name-mapping)))) (cadr (assq mapped-name - (cdr (assoc dbconnection sql-connection-alist)))))))) + (cdr (assoc-string dbconnection sql-connection-alist t)))))))) (defun org-babel-execute:sql (body params) "Execute a block of Sql code with Babel. --Apple-Mail=_44F233BD-363C-484F-9B80-9A1D0EADFF84 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks in advance=E2=80=A6 Andreas Gerler =E2=80=94 http://www.bundesbrandschatzamt.de/~baron --Apple-Mail=_44F233BD-363C-484F-9B80-9A1D0EADFF84-- --Apple-Mail=_039D28D8-E8CD-41DF-B41F-3DCCC5F3614F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIzBAEBCgAdFiEERvQn3i5iUQoCDew4lRrK1qSO/JEFAmPEIyUACgkQlRrK1qSO /JFD8Q/+IXJ/gAWdSwOM9iWAaUpugVpnPr45XkNYVxWzHgpqXVkC6bFw2Z+2VhXM CVH5OaDmxFGCMgoLfOoyQYfAVwC/aOt3QZcLimQ8ZswaHsYcUTxcasaEGPsJ+Ygh hxikjqFnIr1fdCgPqzlbiCCkQy2k68YQe2zEHpNpxBt8Bbr0oTW6gJmQuEZq2svv 9J4xRWipiqdQUOnhlq0XqIITu22fZ1DefT3r03cM4/b5lP4bsl4lv5s/BLgwDoea ofq+RQmhkR1uLdPm2a+4mmNtbb9Gu8D48rzhl0ZUGjtiQC49i3ZlPwzq62dSFKhS 9tLdLhCwleb8JB1c+dhEza16xSN2dNE0RnZBIHiK96VUPR4LBUFv+GNKoCWo5A2X vGJRDlT3nT8/bWerluUaDyar1EH6Yx9uS1BTQqB2OSO44QE0qJ5qMk5va3EPMXzA yQLJcErqbxA4fTqXCTnhj2glcrPsUmMxiq6s3Hny1GMWZa3OkmmE3KLnrSM91yyW wbvJ+qD2jpRl4sUiePDxaiSaHu6he9VMg//Kgz5znfhd1rEvKwirlYgypBD7qB11 GCGjvhv6zTKOlMebLwTFODVJ9Wnw00SEnjKYcw9KNGqLd3YYbTPaB1XbjZjQeZ9K 3nD6Qxi3Yay8HbsBswjYE8aN+5sv5mWorXvU6jjr6WmslZoomO0= =jg2e -----END PGP SIGNATURE----- --Apple-Mail=_039D28D8-E8CD-41DF-B41F-3DCCC5F3614F--