#406 closed defect (invalid)
sql-de-lite: `close-database' throws `Error: bad argument type - not a structure of the required type #<lru-node>'
Reported by: | Mario Domenech Goulart | Owned by: | Jim Ursetto |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | extensions | Version: | 4.6.x |
Keywords: | sql-de-lite | Cc: | |
Estimated difficulty: |
Description
Myabe I'm doing something stupid, but I get an error when closing a database connection with sql-de-lite. Here's a simple example:
$ sqlite3 test.db SQLite version 3.6.22 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table my_table ( col text );
$ cat test-db.scm (use sql-de-lite) (let ((db (open-database "test.db"))) (exec (sql db "insert into my_table (col) values ('foo');")) (close-database db))
$ csi -s test-db.scm Error: bad argument type - not a structure of the required type #<lru-node> lru-cache#lru-node Call history: ##sys#block-set! sql-de-lite#bind-parameter-count sql-de-lite#exec* sql-de-lite#fetch sql-de-lite#step ##sys#block-set! sql-de-lite#column-count sql-de-lite#change-count <eval> (close-database db) lru-cache#lru-cache-flush! <--
If I remove close-database
, I don't get the error message.
Some environment info (Ubuntu 10.04):
$ csi -version CHICKEN (c)2008-2010 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.6.1 linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2010-09-22 on dellito (Linux) $ chicken-status '^sql-de-lite$' '^lru-cache$' lru-cache ..................................................... version: 0.5.3 sql-de-lite ................................................... version: 0.4.1
Change History (6)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Hmmm. Weird. I think 4.6.1 is 4.6.0 bootstrapped by 4.6.0. IIRC, there is no change in the scheme code (I may be wrong, though). I'll try the example code with other chicken versions.
comment:3 Changed 14 years ago by
Your test works okay with csi 4.5.8 (experimental), and the same egg versions you have. And the egg tests complete without error. I haven't tried a later chicken version yet.
comment:4 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
It works with 4.5.0, 4.6.0 and 4.6.2. It doesn't work with 4.6.1, so it seems that some change after the 4.6.0 release and before the creation of the 4.6.1 tarball is what breaks sql-de-lite. I'm closing this ticket as invalid.
I'm thinking this has to do with an incompatibility between record-variants and the record namespacing introduced into and then removed from the Chicken core. Looks like this was introduced after the 4.6.0 release so I would either downgrade to 4.6.0 or upgrade to somewhere after the change was reverted: the soonest being master d27f3ec (corresponding to 4.6.2) or experimental 1c63d74.