Subject Re: [Firebird-checkins] CVS: client-java/src/main/org/firebirdsql/jdbc FBSavepoint.java,NONE,1.1 FBConnection.java,1.27,1.28 FBDatabaseMetaData.java,1.22,1.23
Author Nickolay Samofatov
Hello, Roman !


> + try {
> + mc.executeImmediate(
> + "RELEASE SAVEPOINT " + fbSavepoint.getServerSavepointId());
> + } catch (GDSException ex) {
> + throw new FBSQLException(ex);
> + }
> +
> + fbSavepoint.invalidate();
> }

Roman, this code seems incorrect to me. Firebird complies with SQL200X
standard and "RELEASE SAVEPOINT" statement invalidates mentioned
savepoint and all savepoints set after it (see the docs). This is not
something that JDBC specifies.

So I'd recommend you to use Firebird extension here:
+ mc.executeImmediate(
+ "RELEASE SAVEPOINT " +
+ fbSavepoint.getServerSavepointId()+ " ONLY" );

AFAIU, absence of this extension is the only reason why Oracle 9.2
doesn't implement this JDBC method.

Another issue. I suppose that server exceptions need to be avoided
only for unnamed savepoints (because users are not expected to see
driver-internal savepoint names). To avoid them actually, you need to
invalidate unnamed savepoints at the end of transaction.

--
Nickolay Samofatov mailto:skidder@...