Summary
sql-de-lite: `close-database' throws `Error: bad argument type - not a structure of the required type #<lru-node>'
Metadata
- Id: 7d3adccf6c13725c3677e912f10ae4fdd8a40674
- Trac id: 406
- Type: defect
- Reporter: mario
- Owner: zbigniew
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: invalid
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2010-10-04 01:31:11 UTC
- Keywords: sql-de-lite
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
Changes and comments
[2010-10-06 19:10:00 UTC] zbigniew wrote:
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.
[2010-10-06 19:16:23 UTC] mario wrote:
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.
[2010-10-06 22:15:42 UTC] zbigniew wrote:
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.
[2010-10-06 22:57:52 UTC] mario changed status from new to closed
[2010-10-06 22:57:52 UTC] mario set resolution to invalid
[2010-10-06 22:57:52 UTC] mario wrote:
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.
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted