You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FWIW using node from master (0.5pre) and gcc 4.5.2. I couldn't do the tests because the first test used 2Gb of swap and I had to kill it after 15 mins.
~ node db-test.js
1: Ipsum 0
2: Ipsum 1
3: Ipsum 2
4: Ipsum 3
5: Ipsum 4
6: Ipsum 5
7: Ipsum 6
8: Ipsum 7
9: Ipsum 8
10: Ipsum 9
events.js:45
throw arguments[1]; // Unhandled 'error' event
^
Error: SQLITE_BUSY: unable to close due to unfinalised statements
The text was updated successfully, but these errors were encountered:
Can you please post the test files? Without these, it's pretty hard to determine why this error occurs. My guess is that one of the statements in your code isn't finalized. When you create statements with Database#prepare(), you have to call .finalize() on them; otherwise, sqlite will keep them around infinitely and won't allow closing the database.
Yes, of course, sorry. It was just the example at the top of README.md but with :memory: changed to an on disk file so I could check the results against my /usr/bin/sqlite3 v3.7.5.
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('./test.sqlite');
db.serialize(function() {
db.run("CREATE TABLE lorem (info TEXT)");
var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
for (var i = 0; i < 10; i++) {
stmt.run("Ipsum " + i);
}
db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
console.log(row.id + ": " + row.info);
});
});
db.close();
FWIW using node from master (0.5pre) and gcc 4.5.2. I couldn't do the tests because the first test used 2Gb of swap and I had to kill it after 15 mins.
The text was updated successfully, but these errors were encountered: