Grzegorz Sobanski wrote: > * Christian Boos <cb...@neuf.fr> [2009-11-23 18:22]: > >> This should work... it worked for me on Windows (older SQLite and >> Pysqlite versions, then same versions) and Linux (same SQLite and >> Pysqlite versions as you), using Trac 0.11.6rc1. >> > > Great. Thanks for testing. It seems something is broken in my > environment. > > >> you use the cursor are quite low. If you see the error systematically, >> it must be something else... which I don't see right now. Please >> continue to debug this issue, I'm very interested in seeing the >> explanation for this. >> > > I can reproduce it with just a one request, 100% of time, so it is > either something really stupid or really bad setup somewhere. > I'll debug it more next week. >
Take 2, now I have no idea why it worked for me last time... The "Cannot operate on a closed cursor" error happens everytime for me as well... What I wrote about the cache in my previous mail was correct, simply I forgot about the following: - when a connection is put back in the cache, or rather, as soon as the connection wrapper you got from get_db_cnx() gets garbage collected, the connection is rolled back - rollback used to fail when there with active cursors, for old pysqlite version (<= 2.3.3), so for each connection we maintain a list of active cursors, and before the actual rollback we explicitly close the cursors - anyway, newer pysqlite versions would do that by themselves (pysqlite:#197) So... scratch the "This should work..." from my previous mail, this should actually *not* work. You have to keep a reference to the db connection while working with a cursor. -- Christian -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to trac-...@googlegroups.com. To unsubscribe from this group, send email to trac-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.