1. Taro L. Saito
  2. sqlite-jdbc
  3. Issues
Issue #21 wontfix

Non-closed ResultSet causes readonly DB locked!

Grace Batumbya
created an issue

From http://code.google.com/p/sqlite-jdbc/issues/detail?id=9

Reported by SemigodKing, Jul 13, 2011 What steps will reproduce the problem?

  1. Get a readonly connection to the database.
  2. Perform a SELECT query and do not invoke close() method of the result set.
  3. Hang the process with a call to System.in.read()
  4. 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

Please provide any additional information below.

Code snipset to help reproduce the problem is attached.

Comments (2)

  1. Log in to comment