Non-closed ResultSet causes readonly DB locked!
Reported by SemigodKing, Jul 13, 2011 What steps will reproduce the problem?
- Get a readonly connection to the database.
- Perform a SELECT query and do not invoke close() method of the result set.
- Hang the process with a call to System.in.read()
- Try to update the DB with sqlite3 command lien util.
What is the expected output? What do you see instead?
It is expected that sqlite3 should be able to update the DB. But, sqlite3 reports the database is locked. If you invoked close() method of the result set before hanging the process, the db is not locked anymore.
For a readonly connection, result set should not cause DB locked. Otherwise, what is the meaning of readonly connection? I guess this is a bug.
What version of the product are you using? On what operating system?
Windows & Linux The latest snapshort of 188.8.131.52.
Please provide any additional information below.
Code snipset to help reproduce the problem is attached.