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 |
Post date | 2003-10-14T12:19:11Z |
Hello, Roman !
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@...
> + try {Roman, this code seems incorrect to me. Firebird complies with SQL200X
> + mc.executeImmediate(
> + "RELEASE SAVEPOINT " + fbSavepoint.getServerSavepointId());
> + } catch (GDSException ex) {
> + throw new FBSQLException(ex);
> + }
> +
> + fbSavepoint.invalidate();
> }
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@...