Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.1.1.0
-
None
-
Normal
-
Deviation from standard
Description
Derby supports positioned updates via direct SQL and via updatable resultset JDBC apis.
Derby's implementation of updatable resultset JDBC api does not allow use of correlation names for updatable columns. For eg, on a FORWARD_ONLY, CONCUR_UPDATABLE Statement object, you can't issue statement.executeQuery("select c11 as col1, c12, c13 from t1 for update of c11, c12"). The use of correlation name col1 for updatable column c11 will result in an exception.
The check for this correlation name for updatable resultset jdbc api was earlier in the run time code (ResultSet.updateXXX methods) but that check had performance implications. To address that, the check has been moved to compile time in the CursorNode.java (this went in as revision 159758). But CursorNode.java handles postioned updates coming though both SQL and through updatable resultset jdbc apis and hence as a side effect of moving the check to compile time, the positioned update through direct SQL can also NOT use correlation name for updatable columns. This might impact existing applications.