GNU bug report logs - #19452
24.4; sql-connect fails in first invocation: "Attempt to set a constant symbol: nil"

Previous Next

Package: emacs;

Reported by: JuanLeon Lahoz <juanleon.lahoz <at> gmail.com>

Date: Sat, 27 Dec 2014 06:46:01 UTC

Severity: normal

Merged with 21458, 23280

Found in versions 24.4, 25.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 19452 <at> debbugs.gnu.org (full text, mbox):

From: Nikolay Kudryavtsev <nikolay.kudryavtsev <at> gmail.com>
To: 19452 <at> debbugs.gnu.org
Subject: Re: 24.4; sql-connect fails in first invocation: "Attempt to set a
 constant symbol: nil"
Date: Mon, 25 Jul 2016 23:12:47 +0300
[Message part 1 (text/plain, inline)]
Ok, this bug has been bugging me long enough.

What happens is that there's a dynamic let block that looks like this:

(eval `(let ((,param-var ',rem-params))
                         (sql-product-interactive ',sql-product 
',new-name))))

Here's the code that sets param-var:

(setq param-var
          (sql-get-product-feature sql-product :sqli-login nil t))

It uses global variable sql-product. The default sql-product is ansi and 
running the above for it results in nil. Running "(let ((nil ..." leads 
to this error. In the same function there is a block that sets it to a 
proper value based on the current connection, but it is executed after 
param-var is already set. That's why the second time works.


I've attached a simple patch that just reorders code within sql-connect.

-- 
Best Regards,
Nikolay Kudryavtsev

[19452.patch (text/plain, attachment)]

This bug report was last modified 8 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.