google-code-export / h2database

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

Non-Updatable ResultSets can be returned as CONCUR_UPDATABLE #271

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Non-Updatable ResultSets can be returned as CONCUR_UPDATABLE.

Pseudo Test-case:
stat = createStatement(SCROLL_INSENSITIVE, CONCUR_UPDATABLE)
rs = stat.execute(select name, town, state from some_table where unique_id=100)
isUpdatable = rs.getConcurrency() == CONCUR_UPDATABLE

Expectation:
isUpdatable == false because no primary column/key was included in the query

Finding:
isUpdatable == true because it re-uses the Statement's setting.

Proposal:
I'm not sure what the JDBC spec says concerning this but MySQL (there I go 
again :) )returns CONCUR_READ_ONLY in these situations because It (JDBC 
driver?) checks for an identity column before returning the resultset.

There may also be a similar issue with multi-table select statements.

Original issue reported on code.google.com by James.Mo...@gmail.com on 17 Dec 2010 at 5:39

GoogleCodeExporter commented 9 years ago
This is a bug, I fixed it in the trunk now.
Thanks a lot for your help!

Original comment by thomas.t...@gmail.com on 21 Dec 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Looks good.  Thanks for the quick fix.

Original comment by James.Mo...@gmail.com on 21 Dec 2010 at 10:13

GoogleCodeExporter commented 9 years ago
Fixed in version 1.3.149.

Original comment by thomas.t...@gmail.com on 10 Jan 2011 at 7:22