[ http://issues.apache.org/jira/browse/DERBY-821?page=comments#action_12363714 ]
Knut Anders Hatlen commented on DERBY-821: ------------------------------------------ I have a partly working implementation which sends qryclsimp to the server and implicitly closes exhausted forward-only result sets on the server. However, some tests in derbynetclientmats fail because of the changes in behaviour. Most of the test failures are caused by tests similar to this ij script: connect 'jdbc:derby://localhost/mydb;create=true'; autocommit off; create table t (id int); insert into t values (1), (2), (3); commit; get cursor c as 'select * from t'; next c; drop table t; In the current Derby code, the DROP TABLE statement will fail with an error message saying: ERROR X0X95: Operation 'DROP TABLE' cannot be performed on object 'T' because there is an open ResultSet dependent on that object. When implicit closing is enabled, DROP TABLE will succeed since the result set is closed on the server. I think this change in behaviour is OK. As far as I can tell, it doesn't violate the SQL spec, but it increases the concurrency because resources are released earlier. Does anybody have other opinions on this behavioural change? > Client driver: Implicitly close exhausted result sets on the server > --------------------------------------------------------------------- > > Key: DERBY-821 > URL: http://issues.apache.org/jira/browse/DERBY-821 > Project: Derby > Type: Improvement > Components: Network Client, Network Server, Performance > Versions: 10.2.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Fix For: 10.2.0.0 > > Forward-only result sets that are exhausted should be implicitly > closed on the server. This way, ResultSet.close() does not have to > send an explicit close message generating unnecessary network traffic. > The DRDA protocol supports this. From the description of OPNQRY (open > query): > The qryclsimp parameter controls whether the target server > implicitly closes a non-scrollable query upon end of data (SQLSTATE > 02000) in association with the cursor type. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
