The CVS driver breaks if you set a non-zero fetchsize on a scrollable
resultset (causing a cursor to be used), then try to use anything other than
next() on that resultset. Testcases & patch attached. Barry/Dave: the patch
is the same as the earlier one I sent to you, the testcases are new.
The patch is only a temporary fix: it disables use of cursors entirely if
we're going to be generating a scrollable resultset. There's no reason we
can't use cursors in this case, but supporting that correctly requires more
extensive changes.
The patch also changes the default resultset type for JDBC2/3 Statements to
ResultSet.TYPE_FORWARD_ONLY. This is the implied default for JDBC1 already
(as JDBC1 does not have scrollable resultsets) and is the default required
according to the JDBC3 javadoc; however the existing driver defaults to
ResultSet.TYPE_SCROLL_INSENSITIVE because "everyone is used to using [it]"
(or so says the comment). This change means that code that sets a nonzero
fetchsize but does not explicitly specify a resultset type will continue to
use cursors behind the scenes.
Anyone have a view on which default is desirable?
-O