Subject Re: INSERT...RETURNING error with embedded db
Author pcmilhouse
This is diff output:

Index: BaseGDSImpl.java
===================================================================
RCS file: /cvsroot/firebird/client-java/src/main/org/firebirdsql/gds/impl/jni/BaseGDSImpl.java,v
retrieving revision 1.16
retrieving revision 1.12.2.1
diff -r1.16 -r1.12.2.1
6c6,20
< import org.firebirdsql.gds.*;
---
> import org.firebirdsql.gds.BlobParameterBuffer;
> import org.firebirdsql.gds.DatabaseParameterBuffer;
> import org.firebirdsql.gds.EventHandle;
> import org.firebirdsql.gds.EventHandler;
> import org.firebirdsql.gds.GDSException;
> import org.firebirdsql.gds.ISCConstants;
> import org.firebirdsql.gds.IscBlobHandle;
> import org.firebirdsql.gds.IscDbHandle;
> import org.firebirdsql.gds.IscStmtHandle;
> import org.firebirdsql.gds.IscSvcHandle;
> import org.firebirdsql.gds.IscTrHandle;
> import org.firebirdsql.gds.ServiceParameterBuffer;
> import org.firebirdsql.gds.ServiceRequestBuffer;
> import org.firebirdsql.gds.TransactionParameterBuffer;
> import org.firebirdsql.gds.XSQLDA;
11d24
< import org.firebirdsql.jdbc.FBSQLException;
548,549d560
< getStatementType(stmt);
<
554,594d564
< /**
< * Find out the type of the specified statement.
< *
< * @param stmt instance of {@link isc_stmt_handle_impl}.
< *
< * @throws GDSException if error occured.
< */
< private void getStatementType(isc_stmt_handle_impl stmt) throws GDSException {
< final byte [] REQUEST = new byte [] {
< ISCConstants.isc_info_sql_stmt_type,
< ISCConstants.isc_info_end };
<
< int bufferSize = 1024;
< byte[] buffer;
<
< buffer = iscDsqlSqlInfo(stmt, REQUEST, bufferSize);
<
< /*
< if (buffer[0] == ISCConstants.isc_info_end){
< throw new GDSException("Statement info could not be retrieved");
< }
< */
<
< int dataLength = -1;
< for (int i = 0; i < buffer.length; i++){
< switch(buffer[i]){
< case ISCConstants.isc_info_sql_stmt_type:
< dataLength = iscVaxInteger(buffer, ++i, 2);
< i += 2;
< stmt.setStatementType(iscVaxInteger(buffer, i, dataLength));
< i += dataLength;
< case ISCConstants.isc_info_end:
< case 0:
< break;
< default:
< throw new GDSException("Unknown data block ["
< + buffer[i] + "]");
< }
< }
< }
<
1199,1205c1169,1170
< byte[] buffer = iscDsqlSqlInfo(stmt, /* stmtInfo.length, */stmtInfo, INFO_SIZE);
<
< stmt.setInsertCount(0);
< stmt.setUpdateCount(0);
< stmt.setDeleteCount(0);
< stmt.setSelectCount(0);
<
---
> byte[] buffer = iscDsqlSqlInfo(stmt, /* stmtInfo.length, */stmtInfo,
> INFO_SIZE);