[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19452: 24.4; sql-connect fails in first invocation: "Attempt to set
From: |
Nikolay Kudryavtsev |
Subject: |
bug#19452: 24.4; sql-connect fails in first invocation: "Attempt to set a constant symbol: nil" |
Date: |
Mon, 25 Jul 2016 23:12:47 +0300 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
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
Description: Text document
- bug#19452: 24.4; sql-connect fails in first invocation: "Attempt to set a constant symbol: nil",
Nikolay Kudryavtsev <=