akarshan2701 / h2database

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

Default ResultSet concurrency violates JDBC specification #94

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1. Create a statement using the default type and concurrency.
2. Retrieve the default concurrency via Statement.getResultSetConcurrency()
3. Default concurrency is ResultSet.CONCUR_UPDATABLE.

What is the expected output? What do you see instead?
The JDBC 4.0 specification explicitly states:
"The default ResultSet concurrency is CONCUR_READ_ONLY."

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

Do you know a workaround?
No.  Statement.getResultSetConcurrency() is hard coded to return
CONCUR_UPDATABLE.

How important/urgent is the problem for you?
This prevents the HA-JDBC driver (http://ha-jdbc.sourceforge.net) from
properly load balancing read-only executeQuery() statements, since it
relies on the value of Statement.getResultSetConcurrency() to determine
whether the query requires execution against 1 database, or all databases
in cluster.

In your view, is this a defect or a feature request?
This is a defect, as it violates the JDBC specification.

Please provide any additional information below.
Adding support for CONCUR_READ_ONLY is not difficult.  It simply requires
the ResultSet.updateXXX() to throw a SQLException if the result set is read
only.

Original issue reported on code.google.com by paul.m.f...@gmail.com on 2 Jul 2009 at 4:40

GoogleCodeExporter commented 8 years ago
Hi,

You are right, the current violates to the JDBC spec.
I will try to fix it in the next release.

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 6 Jul 2009 at 7:25

GoogleCodeExporter commented 8 years ago
This bug is fixed with the latest release (1.1.116).
If there is still a problem, please open a new issue
or add a comment to this issue.

Original comment by thomas.t...@gmail.com on 18 Jul 2009 at 9:54