lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

JaQu: doesn't close ResultSets #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)

In Query.java there are a couple of select() functions that work with
ResultSets but forget to close them.

What is the expected output? What do you see instead?

If the code doesn't return the ResultSet, the ResultSet should always be
closed, in a finally block.

What version of the product are you using? On what operating system, file
system, and virtual machine?

H2 rev. 1849
Windows XP
JDK 1.5.0.14

Do you know a workaround?

Yes, see patch below.

How important/urgent is the problem for you?

important

In your view, is this a defect or a feature request?

defect

Please provide any additional information below.

See patch below.

Original issue reported on code.google.com by dmoeb...@gmx.net on 21 Sep 2009 at 7:18

Attachments:

GoogleCodeExporter commented 9 years ago
Also, JaQu doesn't close some statements.
Hopefully I'll find the time to fix those places, too.

Original comment by dmoeb...@gmx.net on 21 Sep 2009 at 12:36

GoogleCodeExporter commented 9 years ago
Thanks for the patch! I will apply it. For H2 closing statements and result 
sets is
not that important, but for other databases it may be.

There is one case I know where the statement is not closed: Db.executeQuery. But
closing the statement would close the result set... Maybe I should remove this 
method.

Original comment by thomas.t...@gmail.com on 22 Sep 2009 at 5:21

GoogleCodeExporter commented 9 years ago
This should be fixed in version 1.1.119

Original comment by thomas.t...@gmail.com on 26 Sep 2009 at 11:34