rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
catch(SQLException e) { cleanUpAndCloseResultSet(stmt, e, writerMark); } break; case CodePoint.EXCSQLIMM: try { updateCount = parseEXCSQLIMM(); if (database.RDBUPDRM_sent == false) { writeRDBUPDRM(); } checkWarning(null, database.getDefaultStatement().getStatement(), null, updateCount, true, true); } catc...
while (reader.isChainedWithSameID() || reader.isChainedWithDiffID());
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
while (reader.isChainedWithSameID() || reader.isChainedWithDiffID()); }
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; boolean checkSecurityCodepoint = session.requiresSecurityCodepoint(); do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); ...
throws SQLException,DRDAProtocolException { byte []leftovers = stmt.getSplitQRYDTA(); if (leftovers == null) return false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; blksize = blksize - 10; if (leftovers.length < blksize) { writer.writeBytes(leftovers, 0, leftovers.length); stmt.s...
throws SQLException,DRDAProtocolException { byte []leftovers = stmt.getSplitQRYDTA(); if (leftovers == null) return false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; blksize = blksize - 10; if (leftovers.length < blksize) { writer.writeBytes(leftovers, 0, leftovers.length); stmt.s...
private boolean processLeftoverQRYDTA(DRDAStatement stmt) throws SQLException,DRDAProtocolException { byte []leftovers = stmt.getSplitQRYDTA(); if (leftovers == null) return false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; blksize = blksize - 10; //DSS header + QRYDTA and...
writer.endDdmAndDss(); return true; }
private boolean processLeftoverQRYDTA(DRDAStatement stmt) throws SQLException,DRDAProtocolException { byte []leftovers = stmt.getSplitQRYDTA(); if (leftovers == null) return false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; blksize = blksize - 10; //DSS header + QRYDTA and...
throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(paramPos, stmt, ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValu...
throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(paramPos, stmt, ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValu...
private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(param...
}
private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(param...
if (ps instanceof CallableStatement) { if (stmt.isOutputParam(i+1)) { CallableStatement cs = (CallableStatement) ps; cs.registerOutParameter(i+1, stmt.getOutputParamType(i+1)); }
if (ps instanceof CallableStatement) { if (stmt.isOutputParam(i+1)) { CallableStatement cs = (CallableStatement) ps; cs.registerOutParameter(i+1, stmt.getOutputParamType(i+1)); } } switch (drdaType) { case DRDAConstants.DRDA_TYPE_NSMALL: { short paramVal = (short) reader.readShort(getByteOrder()); if (SanityManager.DE...
private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator dr...
switch (drdaType){ case DRDAConstants.DRDA_TYPE_NSMALL: { short paramVal = (short) reader.readShort(getByteOrder()); if (SanityManager.DEBUG) trace("short parameter value is: "+paramVal); if (pmeta.getParameterType(i+1) == JDBC30Translation.BOOLEAN) ps.setBoolean(i+1, (paramVal == 1)); else ps.setShort(i+1, paramVal);...
private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator dr...
break; default: agentError("Session in invalid state:" + session.state);
break; default: agentError("Session in invalid state:" + session.state); } } catch (Exception e) { if (e instanceof DRDAProtocolException && ((DRDAProtocolException)e).isDisconnectException()) { closeSession(); } else { handleException(e); } }
public void run() { if (SanityManager.DEBUG) trace("Starting new connection thread"); Session prevSession; while(!closed()) { // get a new session prevSession = session; session = server.getNextSession(session); if (session == null) close(); if (closed()) break; if (session != prevSess...
} catch (Exception e) { if (e instanceof DRDAProtocolException && ((DRDAProtocolException)e).isDisconnectException()) { closeSession(); } else { handleException(e); } }
if (SanityManager.DEBUG) trace("Ending connection thread"); server.getThreadList().removeElement(this);
public void run() { if (SanityManager.DEBUG) trace("Starting new connection thread"); Session prevSession; while(!closed()) { // get a new session prevSession = session; session = server.getNextSession(session); if (session == null) close(); if (closed()) break; if (session != prevSess...
if (SanityManager.DEBUG) trace("Ending connection thread"); server.getThreadList().removeElement(this); }
public void run() { if (SanityManager.DEBUG) trace("Starting new connection thread"); Session prevSession; while(!closed()) { // get a new session prevSession = session; session = server.getNextSession(session); if (session == null) close(); if (closed()) break; if (session != prevSess...
reader.clearBuffer(); unExpDe.write(writer); finalizeChain(); } catch (DRDAProtocolException nde) {
reader.clearBuffer(); unExpDe.write(writer); finalizeChain(); } catch (DRDAProtocolException nde) { }
private void sendUnexpectedException(Exception e) { DRDAProtocolException unExpDe; String dbname = null; try { if (database != null) dbname = database.dbName; println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(e); unExpDe = DRDAProtocolException.newAgentError(this...
}
private void sendUnexpectedException(Exception e) { DRDAProtocolException unExpDe; String dbname = null; try { if (database != null) dbname = database.dbName; println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(e); unExpDe = DRDAProtocolException.newAgentError(this...
throws Exception { if (reader.isCmd()) { try { server.processCommands(reader, writer, session); reader.initialize(this, null); writer.reset(null); closeSession(); } catch (Throwable t) { if (t instanceof InterruptedException) throw (InterruptedException)t; else { server.consoleExceptionPrintTrace(t);
throws Exception { if (reader.isCmd()) { try { server.processCommands(reader, writer, session); reader.initialize(this, null); writer.reset(null); closeSession(); } catch (Throwable t) { if (t instanceof InterruptedException) throw (InterruptedException)t; else { server.consoleExceptionPrintTrace(t); } }
private void sessionInitialState() throws Exception { // process NetworkServerControl commands - if it is not either valid protocol let the // DRDA error handling handle it if (reader.isCmd()) { try { server.processCommands(reader, writer, session); // reset reader and writer reader.initialize(this, null);...
} } else { exchangeServerAttributes();
else { exchangeServerAttributes(); }
private void sessionInitialState() throws Exception { // process NetworkServerControl commands - if it is not either valid protocol let the // DRDA error handling handle it if (reader.isCmd()) { try { server.processCommands(reader, writer, session); // reset reader and writer reader.initialize(this, null);...
}
private void sessionInitialState() throws Exception { // process NetworkServerControl commands - if it is not either valid protocol let the // DRDA error handling handle it if (reader.isCmd()) { try { server.processCommands(reader, writer, session); // reset reader and writer reader.initialize(this, null);...
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value;
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value; }
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value; } }
}
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value; } }
private void setStmtOrDbByteOrder(boolean setDatabase, DRDAStatement stmt, String typDefNam) { int byteOrder = (typDefNam.equals(CodePoint.TYPDEFNAM_QTDSQLX86) ? SignedBinary.LITTLE_ENDIAN : SignedBinary.BIG_ENDIAN); if (setDatabase) { database.typDefNam = typDefNam; database.byteOrder = byteOrder; } else { stmt.typDef...
private void setStmtOrDbByteOrder(boolean setDatabase, DRDAStatement stmt, String typDefNam) { int byteOrder = (typDefNam.equals(CodePoint.TYPDEFNAM_QTDSQLX86) ? SignedBinary.LITTLE_ENDIAN : SignedBinary.BIG_ENDIAN); if (setDatabase) { database.typDefNam = typDefNam; database.byteOrder = byteOrder; } else { stmt.typDef...
private void setStmtOrDbByteOrder(boolean setDatabase, DRDAStatement stmt, String typDefNam) { int byteOrder = (typDefNam.equals(CodePoint.TYPDEFNAM_QTDSQLX86) ? SignedBinary.LITTLE_ENDIAN : SignedBinary.BIG_ENDIAN); if (setDatabase) { database.typDefNam = typDefNam; database.byteOrder = byteOrder; } els...
}
private void setStmtOrDbByteOrder(boolean setDatabase, DRDAStatement stmt, String typDefNam) { int byteOrder = (typDefNam.equals(CodePoint.TYPDEFNAM_QTDSQLX86) ? SignedBinary.LITTLE_ENDIAN : SignedBinary.BIG_ENDIAN); if (setDatabase) { database.typDefNam = typDefNam; database.byteOrder = byteOrder; } els...
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value;
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value; }
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value; } }
}
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value; } }
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader(); reader.skipDss();
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader(); reader.skipDss(); }
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader(); reader.skipDss(); } }
}
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader(); reader.skipDss(); } }
throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_PRCCNVRM, this, codePoint, CodePoint.PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE);
throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_PRCCNVRM, this, codePoint, CodePoint.PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE); }
private void verifyInOrderACCSEC_SECCHK(int codePoint, int reqCodePoint) throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_PRCCNVRM, this, codePoint, CodePoint.PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE); } }
}
private void verifyInOrderACCSEC_SECCHK(int codePoint, int reqCodePoint) throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_PRCCNVRM, this, codePoint, CodePoint.PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE); } }
throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throwSyntaxrm(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND,codePoint);
throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throwSyntaxrm(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND,codePoint); }
private void verifyRequiredObject(int codePoint, int reqCodePoint) throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throwSyntaxrm(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND,codePoint); } }
}
private void verifyRequiredObject(int codePoint, int reqCodePoint) throws DRDAProtocolException { if (codePoint != reqCodePoint ) { throwSyntaxrm(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND,codePoint); } }
if (securityCheckCode != 0) { skipRemainder(false);
if (securityCheckCode != 0) { skipRemainder(false); } finalizeChain();
private void writeACCSECRD(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.ACCSECRD); if (securityCheckCode != CodePoint.SECCHKCD_NOTSUPPORTED) writer.writeScalar2Bytes(CodePoint.SECMEC, database.securityMechanism); else { // if server doesnt recogni...
finalizeChain(); }
private void writeACCSECRD(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.ACCSECRD); if (securityCheckCode != CodePoint.SECCHKCD_NOTSUPPORTED) writer.writeScalar2Bytes(CodePoint.SECMEC, database.securityMechanism); else { // if server doesnt recogni...
}finally{ closeStream(stream);
}finally{ closeStream(stream); }
void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extdtaVa...
}
void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extdtaVa...
throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); int numCols; if (!stmt.needsToSendParamData) { rs = stmt.getRe...
throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); int numCols; if (!stmt.needsToSendParamData) { rs = stmt.getRe...
private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); int ...
if (rs != null) { numCols = stmt.getNumRsCols(); if (stmt.isScrollable()) hasdata = positionCursor(stmt, rs); else hasdata = rs.next(); } else{ hasdata = stmt.hasOutputParams(); numCols = stmt.getNumParams(); } do { if (!hasdata) { doneData(stmt, rs); moreData = false; return moreData; } SQLWarning sqlw = (rs != n...
private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); int ...
if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (ndrdaType) { case DRDAConstants.DRDA_TYPE_NBOOLEAN: writer.writeByte( makeInt( (Boolean) val ) ); break; case DRDAConstants.DRDA_TYPE_NSMALL: if (val instanceof Boolean) { writer.writeShort(((Boolean) val).booleanValue());
if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (ndrdaType) { case DRDAConstants.DRDA_TYPE_NBOOLEAN: writer.writeByte( makeInt( (Boolean) val ) ); break; case DRDAConstants.DRDA_TYPE_NSMALL: if (val instanceof Boolean) { writer.writeShort(((Boolean) val).booleanValue()); } else if (val insta...
protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (nd...
else if (val instanceof Short) writer.writeShort(((Short) val).shortValue()); else if (val instanceof Byte) writer.writeShort(((Byte) val).byteValue()); else writer.writeShort(((Integer) val).shortValue()); break; case DRDAConstants.DRDA_TYPE_NINTEGER: writer.writeInt(((Integer) val).intValue()); break; case DRDAConst...
protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (nd...
}
protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (nd...
private void writeMGRLEVELS() throws DRDAProtocolException { int manager; int appLevel; int serverLevel; writer.startDdm(CodePoint.MGRLVLLS); for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); serverLevel = serve...
private void writeMGRLEVELS() throws DRDAProtocolException { int manager; int appLevel; int serverLevel; writer.startDdm(CodePoint.MGRLVLLS); for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); serverLevel = serve...
private void writeMGRLEVELS() throws DRDAProtocolException { int manager; int appLevel; int serverLevel; writer.startDdm(CodePoint.MGRLVLLS); for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); ser...
for (int i = 0; i < unknownManagers.size(); i++) { manager = ((Integer)unknownManagers.elementAt(i)).intValue(); writer.writeCodePoint4Bytes(manager, 0); } writer.endDdm(); }
private void writeMGRLEVELS() throws DRDAProtocolException { int manager; int appLevel; int serverLevel; writer.startDdm(CodePoint.MGRLVLLS); for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); ser...
private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); }
private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } }
private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } } }
}
private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } } }
if (stmt.getCurrentDrdaResultSet().withHoldCursor == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) writer.writeScalar1Byte(CodePoint.SQLCSRHLD, CodePoint.TRUE); if (sqlamLevel >= MGRLVL_7) { writer.writeScalarHeader(CodePoint.QRYINSID, 8); writer.writeInt(0); writer.writeInt(session.qryinsid++); if (stmt.isScrollab...
if (stmt.getCurrentDrdaResultSet().withHoldCursor == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) writer.writeScalar1Byte(CodePoint.SQLCSRHLD, CodePoint.TRUE); if (sqlamLevel >= MGRLVL_7) { writer.writeScalarHeader(CodePoint.QRYINSID, 8); writer.writeInt(0); writer.writeInt(session.qryinsid++); if (stmt.isScrollab...
private void writeOPNQRYRM(boolean isDssObject, DRDAStatement stmt) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("WriteOPNQRYRM"); if (isDssObject) writer.createDssObject(); else writer.createDssReply(); writer.startDdm(CodePoint.OPNQRYRM); writer.writeScalar2Bytes(CodePo...
} if (stmt.getConcurType() == ResultSet.CONCUR_UPDATABLE) { if (stmt.getResultSet() != null) { if (stmt.getResultSet().getConcurrency() == ResultSet.CONCUR_UPDATABLE) { writer.writeScalar1Byte(CodePoint.QRYATTUPD, CodePoint.QRYUPD); } else { writer.writeScalar1Byte(CodePoint.QRYATTUPD, CodePoint.QRYRDO); } } else { ...
writer.endDdmAndDss ();
private void writeOPNQRYRM(boolean isDssObject, DRDAStatement stmt) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("WriteOPNQRYRM"); if (isDssObject) writer.createDssObject(); else writer.createDssReply(); writer.startDdm(CodePoint.OPNQRYRM); writer.writeScalar2Bytes(CodePo...
writer.endDdmAndDss (); }
private void writeOPNQRYRM(boolean isDssObject, DRDAStatement stmt) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("WriteOPNQRYRM"); if (isDssObject) writer.createDssObject(); else writer.createDssReply(); writer.startDdm(CodePoint.OPNQRYRM); writer.writeScalar2Bytes(CodePo...
private void writePKGNAMCSN(byte[] pkgcnstkn) throws DRDAProtocolException { writer.startDdm(CodePoint.PKGNAMCSN); if (rdbnam.length() <= CodePoint.RDBNAM_LEN && rdbcolid.length() <= CodePoint.RDBCOLID_LEN && pkgid.length() <= CodePoint.PKGID_LEN) { writer.writeScalarPaddedString(rdbnam, CodePoint.RDBNAM_LEN); writer...
private void writePKGNAMCSN(byte[] pkgcnstkn) throws DRDAProtocolException { writer.startDdm(CodePoint.PKGNAMCSN); if (rdbnam.length() <= CodePoint.RDBNAM_LEN && rdbcolid.length() <= CodePoint.RDBCOLID_LEN && pkgid.length() <= CodePoint.PKGID_LEN) { writer.writeScalarPaddedString(rdbnam, CodePoint.RDBNAM_LEN); writer....
private void writePKGNAMCSN(byte[] pkgcnstkn) throws DRDAProtocolException { writer.startDdm(CodePoint.PKGNAMCSN); if (rdbnam.length() <= CodePoint.RDBNAM_LEN && rdbcolid.length() <= CodePoint.RDBCOLID_LEN && pkgid.length() <= CodePoint.PKGID_LEN) { // if none of RDBNAM, RDBCOLID and PKGID have a lengt...
writer.endDdm(); }
private void writePKGNAMCSN(byte[] pkgcnstkn) throws DRDAProtocolException { writer.startDdm(CodePoint.PKGNAMCSN); if (rdbnam.length() <= CodePoint.RDBNAM_LEN && rdbcolid.length() <= CodePoint.RDBCOLID_LEN && pkgid.length() <= CodePoint.PKGID_LEN) { // if none of RDBNAM, RDBCOLID and PKGID have a lengt...
if (firstcols < numCols || numCols > FdocaConstants.MAX_VARS_IN_NGDA) { if (firstcols > FdocaConstants.MAX_VARS_IN_NGDA) { if (SanityManager.DEBUG) SanityManager.ASSERT(numCols > FdocaConstants.MAX_VARS_IN_NGDA, "Number of columns " + numCols + " is less than MAX_VARS_IN_NGDA"); numGroups = numCols/FdocaConstants.MAX_...
if (firstcols < numCols || numCols > FdocaConstants.MAX_VARS_IN_NGDA) { if (firstcols > FdocaConstants.MAX_VARS_IN_NGDA) { if (SanityManager.DEBUG) SanityManager.ASSERT(numCols > FdocaConstants.MAX_VARS_IN_NGDA, "Number of columns " + numCols + " is less than MAX_VARS_IN_NGDA"); numGroups = numCols/FdocaConstants.MAX_...
private void writeQRYDSC(DRDAStatement stmt, boolean FDODSConly) throws DRDAProtocolException, SQLException { ResultSet rs = null; ResultSetMetaData rsmeta = null; EmbedParameterSetMetaData pmeta = null; if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); if (rs == null) // this is a CallableStatement, u...
if (! FDODSConly) { writer.createDssObject(); writer.startDdm(CodePoint.QRYDSC); } for (int i = 0; i < numGroups; i++) { writeSQLDTAGRP(stmt, rsmeta, pmeta, colStart, colEnd, (i == 0 ? true : false)); colStart = colEnd + 1; colEnd = colEnd + FdocaConstants.MAX_VARS_IN_NGDA; if (colEnd > numCols) colEnd = numCols; } w...
private void writeQRYDSC(DRDAStatement stmt, boolean FDODSConly) throws DRDAProtocolException, SQLException { ResultSet rs = null; ResultSetMetaData rsmeta = null; EmbedParameterSetMetaData pmeta = null; if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); if (rs == null) // this is a CallableStatement, u...
if (SanityManager.DEBUG) trace("Write QRYDTA"); writer.startDdm(CodePoint.QRYDTA); if (processLeftoverQRYDTA(stmt)) { if (stmt.getSplitQRYDTA() == null) { stmt.rowCount += 1; if (stmt.getExtDtaObjects() != null) writeEXTDTA(stmt); } return;
if (SanityManager.DEBUG) trace("Write QRYDTA"); writer.startDdm(CodePoint.QRYDTA); if (processLeftoverQRYDTA(stmt)) { if (stmt.getSplitQRYDTA() == null) { stmt.rowCount += 1; if (stmt.getExtDtaObjects() != null) writeEXTDTA(stmt); } return; } while(getMoreData) { sentExtData = false; getMoreData = writeFDODTA(stm...
private void writeQRYDTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean getMoreData = true; boolean sentExtData = false; int startLength = 0; writer.createDssObject(); if (SanityManager.DEBUG) trace("Write QRYDTA"); writer.startDdm(CodePoint.QRYDTA); // Check to see if there was lef...
while(getMoreData) { sentExtData = false; getMoreData = writeFDODTA(stmt); if (stmt.getExtDtaObjects() != null && stmt.getSplitQRYDTA() == null) { writer.endDdmAndDss(); writeEXTDTA(stmt); getMoreData=false; sentExtData = true; } if (getMoreData == true) { int endLength = writer.getDSSLength(); int rowsize = endLe...
private void writeQRYDTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean getMoreData = true; boolean sentExtData = false; int startLength = 0; writer.createDssObject(); if (SanityManager.DEBUG) trace("Write QRYDTA"); writer.startDdm(CodePoint.QRYDTA); // Check to see if there was lef...
throws DRDAProtocolException { int len = rdbnam.length(); if (len < CodePoint.RDBNAM_LEN) len = CodePoint.RDBNAM_LEN; writer.writeScalarHeader(CodePoint.RDBNAM, len); try { writer.writeScalarPaddedBytes(rdbnam.getBytes(server.DEFAULT_ENCODING), len, server.SPACE_CHAR); } catch (UnsupportedEncodingException e) { agentEr...
throws DRDAProtocolException { int len = rdbnam.length(); if (len < CodePoint.RDBNAM_LEN) len = CodePoint.RDBNAM_LEN; writer.writeScalarHeader(CodePoint.RDBNAM, len); try { writer.writeScalarPaddedBytes(rdbnam.getBytes(server.DEFAULT_ENCODING), len, server.SPACE_CHAR); } catch (UnsupportedEncodingException e) { agentEr...
protected void writeRDBNAM(String rdbnam) throws DRDAProtocolException { int len = rdbnam.length(); if (len < CodePoint.RDBNAM_LEN) len = CodePoint.RDBNAM_LEN; writer.writeScalarHeader(CodePoint.RDBNAM, len); try { writer.writeScalarPaddedBytes(rdbnam.getBytes(server.DEFAULT_ENCODING), len, server.SPA...
}
protected void writeRDBNAM(String rdbnam) throws DRDAProtocolException { int len = rdbnam.length(); if (len < CodePoint.RDBNAM_LEN) len = CodePoint.RDBNAM_LEN; writer.writeScalarHeader(CodePoint.RDBNAM, len); try { writer.writeScalarPaddedBytes(rdbnam.getBytes(server.DEFAULT_ENCODING), len, server.SPA...
if (securityCheckCode != 0) { skipRemainder(false);
if (securityCheckCode != 0) { skipRemainder(false); } finalizeChain();
private void writeSECCHKRM(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.SECCHKRM); writer.writeScalar2Bytes(CodePoint.SVRCOD, svrcodFromSecchkcd(securityCheckCode)); writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); writer.endDdmAndDss ()...
finalizeChain(); }
private void writeSECCHKRM(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.SECCHKRM); writer.writeScalar2Bytes(CodePoint.SVRCOD, svrcodFromSecchkcd(securityCheckCode)); writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); writer.endDdmAndDss ()...
long rowCount) throws DRDAProtocolException { if (e == null) { writeSQLCAGRP(nullSQLState, sqlcode, updateCount, rowCount); return;
long rowCount) throws DRDAProtocolException { if (e == null) { writeSQLCAGRP(nullSQLState, sqlcode, updateCount, rowCount); return; } if (rowCount < 0 && updateCount < 0) { writer.writeByte(CodePoint.NULLDATA); return; } if (SanityManager.DEBUG && server.debugOutput && sqlcode < 0) { trace("handle SQLException here...
private void writeSQLCAGRP(SQLException e, int sqlcode, int updateCount, long rowCount) throws DRDAProtocolException { if (e == null) { // Forwarding to the optimized version when there is no // exception object writeSQLCAGRP(nullSQLState, sqlcode, updateCount, rowCount); return; } if (rowC...
if (rowCount < 0 && updateCount < 0) { writer.writeByte(CodePoint.NULLDATA); return; } if (SanityManager.DEBUG && server.debugOutput && sqlcode < 0) { trace("handle SQLException here"); trace("reason is: "+e.getMessage()); trace("SQLState is: "+e.getSQLState()); trace("vendorCode is: "+e.getErrorCode()); trace("nextEx...
private void writeSQLCAGRP(SQLException e, int sqlcode, int updateCount, long rowCount) throws DRDAProtocolException { if (e == null) { // Forwarding to the optimized version when there is no // exception object writeSQLCAGRP(nullSQLState, sqlcode, updateCount, rowCount); return; } if (rowC...
if (e != null) { String sqlState = e.getSQLState(); if (sqlState.regionMatches(0, SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN, 0, 5)) { try { server.startNetworkServer(); } catch (Exception restart) {} }
if (e != null) { String sqlState = e.getSQLState(); if (sqlState.regionMatches(0, SQLState.CLOUDSCAPE_SYSTEM_SHUTDOWN, 0, 5)) { try { server.startNetworkServer(); } catch (Exception restart) {} } }
private void writeSQLCARD(SQLException e,int severity, int updateCount, long rowCount ) throws DRDAProtocolException { writer.createDssObject(); writer.startDdm(CodePoint.SQLCARD); writeSQLCAGRP(e, getSqlCode(severity), updateCount, rowCount); writer.endDdmAndDss(); // If we have a shutdown exception, rest...
}
private void writeSQLCARD(SQLException e,int severity, int updateCount, long rowCount ) throws DRDAProtocolException { writer.createDssObject(); writer.startDdm(CodePoint.SQLCARD); writeSQLCAGRP(e, getSqlCode(severity), updateCount, rowCount); writer.endDdmAndDss(); // If we have a shutdown exception, rest...
SQLException nextException) throws DRDAProtocolException { writer.writeByte(0); if (sqlamLevel < 7) { writeRDBNAM(database.dbName); writeSQLCAERRWARN(updateCount, rowCount); } else { writeSQLCAERRWARN(updateCount, rowCount); writer.writeShort(0);
SQLException nextException) throws DRDAProtocolException { writer.writeByte(0); if (sqlamLevel < 7) { writeRDBNAM(database.dbName); writeSQLCAERRWARN(updateCount, rowCount); } else { writeSQLCAERRWARN(updateCount, rowCount); writer.writeShort(0); } writeVCMorVCS(sqlerrmc); if (sqlamLevel >=7) writeSQLDIAGGRP(nextExcep...
private void writeSQLCAXGRP(int updateCount, long rowCount, String sqlerrmc, SQLException nextException) throws DRDAProtocolException { writer.writeByte(0); // SQLCAXGRP INDICATOR if (sqlamLevel < 7) { writeRDBNAM(database.dbName); writeSQLCAERRWARN(updateCount, rowCount); } else { // SQL ERRD1 - D...
writeVCMorVCS(sqlerrmc); if (sqlamLevel >=7) writeSQLDIAGGRP(nextException); }
private void writeSQLCAXGRP(int updateCount, long rowCount, String sqlerrmc, SQLException nextException) throws DRDAProtocolException { writer.writeByte(0); // SQLCAXGRP INDICATOR if (sqlamLevel < 7) { writeRDBNAM(database.dbName); writeSQLCAERRWARN(updateCount, rowCount); } else { // SQL ERRD1 - D...
ResultSetMetaData rsmeta = rs.getMetaData(); int ncols = rsmeta.getColumnCount(); writer.writeShort(ncols); if (sqlamLevel >= MGRLVL_7) { for (int i = 0; i < ncols; i++) writeSQLDAGRP (rsmeta, null, i, true); } else { for (int i = 0; i < ncols; i++) { writeVCMorVCS(rsmeta.getColumnName(i+1)); writeVCMorVCS(rsmeta.getCo...
ResultSetMetaData rsmeta = rs.getMetaData(); int ncols = rsmeta.getColumnCount(); writer.writeShort(ncols); if (sqlamLevel >= MGRLVL_7) { for (int i = 0; i < ncols; i++) writeSQLDAGRP (rsmeta, null, i, true); } else { for (int i = 0; i < ncols; i++) { writeVCMorVCS(rsmeta.getColumnName(i+1)); writeVCMorVCS(rsmeta.getCo...
private void writeSQLCINRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException { ResultSet rs = null; // todo ps is never used or closed - could this be a memory leak? PreparedStatement ps = stmt.getPreparedStatement(); if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); writer.c...
writer.endDdmAndDss(); }
private void writeSQLCINRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException { ResultSet rs = null; // todo ps is never used or closed - could this be a memory leak? PreparedStatement ps = stmt.getPreparedStatement(); if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); writer.c...
if (outlen[0] == -1) { switch (elemType) { case Types.DECIMAL: case Types.NUMERIC: scale = rtnOutput ? rsmeta.getScale(jdbcElemNum) : pmeta.getScale(jdbcElemNum); outlen[0] = ((precision <<8) | (scale <<0));
if (outlen[0] == -1) { switch (elemType) { case Types.DECIMAL: case Types.NUMERIC: scale = rtnOutput ? rsmeta.getScale(jdbcElemNum) : pmeta.getScale(jdbcElemNum); outlen[0] = ((precision <<8) | (scale <<0)); if (SanityManager.DEBUG) trace("\n\nprecision =" +precision + " scale =" + scale); break; default: outlen[0] = M...
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ? rs...
trace("\n\nprecision =" +precision + " scale =" + scale); break; default: outlen[0] = Math.min(FdocaConstants.LONGVARCHAR_MAX_LEN, (rtnOutput ? rsmeta.getColumnDisplaySize(jdbcElemNum) : pmeta.getPrecision(jdbcElemNum))); } }
trace("SQLDAGRP len =" + java.lang.Integer.toHexString(outlen[0]) + "for type:" + elemType);
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ? rs...
switch (elemType) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: case Types.CLOB: outlen[0] = (rtnOutput ? rsmeta.getPrecision(jdbcElemNum) : pmeta.getPrecision(jdbcElemNum)); } if (SanityManager.DEBUG) trace("SQLDAGRP len =" + java.lang.Integer.toHexString(outlen[0]) + "for type...
if (sqlamLevel >= MGRLVL_6) writer.writeLong(outlen[0]); else writer.writeInt(outlen[0]);
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ? rs...
if (sqlamLevel == MGRLVL_6) writeSQLUDTGRP(rsmeta, pmeta, jdbcElemNum, rtnOutput); } else { writeSQLDOPTGRP(rsmeta, pmeta, jdbcElemNum, rtnOutput);
if (sqlamLevel == MGRLVL_6) writeSQLUDTGRP(rsmeta, pmeta, jdbcElemNum, rtnOutput); } else { writeSQLDOPTGRP(rsmeta, pmeta, jdbcElemNum, rtnOutput); }
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ? rs...
}
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ? rs...
private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); ResultSetMetaData rsmeta = ps.getMetaData(); EmbedParameterSetMetaData pmeta = stmt.getParameterMetaData(); int numElems = 0; if (e == null ||...
private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); ResultSetMetaData rsmeta = ps.getMetaData(); EmbedParameterSetMetaData pmeta = stmt.getParameterMetaData(); int numElems = 0; if (e == null ||...
private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); ResultSetMetaData rsmeta = ps.getMetaData(); EmbedParameterSetMetaData pmeta = stmt.getParameterMetaData(); int numElems = 0; if (e == nul...
writer.createDssObject(); writer.startDdm(CodePoint.SQLDARD); writeSQLCAGRP(e, getSqlCode(getExceptionSeverity(e)), 0, 0); if (sqlamLevel >= MGRLVL_7) writeSQLDHROW (stmt); if (SanityManager.DEBUG) trace("num Elements = " + numElems); writer.writeShort(numElems); for (int i=0; i < numElems; i++) writeSQLDAGRP (rs...
private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); ResultSetMetaData rsmeta = ps.getMetaData(); EmbedParameterSetMetaData pmeta = stmt.getParameterMetaData(); int numElems = 0; if (e == nul...
private void writeSQLDHROW (DRDAStatement stmt) throws DRDAProtocolException,SQLException { if (JVMInfo.JDK_ID < 2) { writer.writeByte(CodePoint.NULLDATA); return;
private void writeSQLDHROW (DRDAStatement stmt) throws DRDAProtocolException,SQLException { if (JVMInfo.JDK_ID < 2) { writer.writeByte(CodePoint.NULLDATA); return; } writer.writeByte(0); writer.writeShort(stmt.getResultSetHoldability()); writer.writeShort(0); writer.writeShort(0); writer.writeShort(0); writer.w...
private void writeSQLDHROW (DRDAStatement stmt) throws DRDAProtocolException,SQLException { if (JVMInfo.JDK_ID < 2) { //write null indicator for SQLDHROW because there is no holdability support prior to jdk1.3 writer.writeByte(CodePoint.NULLDATA); return; } writer.writeByte(0); // SQLDHROW INDICATOR //S...
writer.writeByte(0); writer.writeShort(stmt.getResultSetHoldability()); writer.writeShort(0); writer.writeShort(0); writer.writeShort(0); writer.writeShort(0); writer.writeShort(0); writer.writeShort(0); writeVCMorVCS(null); }
private void writeSQLDHROW (DRDAStatement stmt) throws DRDAProtocolException,SQLException { if (JVMInfo.JDK_ID < 2) { //write null indicator for SQLDHROW because there is no holdability support prior to jdk1.3 writer.writeByte(CodePoint.NULLDATA); return; } writer.writeByte(0); // SQLDHROW INDICATOR //S...
se = se.getNextException();
se = se.getNextException(); } writer.writeByte(CodePoint.NULLDATA); return;
private void writeSQLDIAGCI(SQLException nextException) throws DRDAProtocolException { SQLException se = nextException; long rowNum = 1; /* Write the number of next exceptions to expect */ writeSQLNUMROW(se); while (se != null) { String sqlState = se.getSQLState(); int sqlCode = getSqlCode(getExceptionSever...
writer.writeByte(CodePoint.NULLDATA); return; }
private void writeSQLDIAGCI(SQLException nextException) throws DRDAProtocolException { SQLException se = nextException; long rowNum = 1; /* Write the number of next exceptions to expect */ writeSQLNUMROW(se); while (se != null) { String sqlState = se.getSQLState(); int sqlCode = getSqlCode(getExceptionSever...
boolean isDecimal = ((drdaType | 1) == DRDAConstants.DRDA_TYPE_NDECIMAL); int precision = 0, scale = 0; if (hasRs) { precision = rsmeta.getPrecision(i); scale = rsmeta.getScale(i); stmt.setRsDRDAType(i,drdaType); stmt.setRsPrecision(i, precision); stmt.setRsScale(i,scale); } else if (isDecimal) { if (stmt.isOutputParam...
boolean isDecimal = ((drdaType | 1) == DRDAConstants.DRDA_TYPE_NDECIMAL); int precision = 0, scale = 0; if (hasRs) { precision = rsmeta.getPrecision(i); scale = rsmeta.getScale(i); stmt.setRsDRDAType(i,drdaType); stmt.setRsPrecision(i, precision); stmt.setRsScale(i,scale); }
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(lengt...
}
else if (isDecimal) { if (stmt.isOutputParam(i)) ((CallableStatement) stmt.ps).registerOutParameter(i,Types.DECIMAL); precision = pmeta.getPrecision(i); scale = pmeta.getScale(i);
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(lengt...
if (SanityManager.DEBUG) trace("jdbcType=" + colType + " \tdrdaType=" + Integer.toHexString(drdaType));
}
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(lengt...
writer.writeByte(drdaType); if (isDecimal) { writer.writeByte(precision); writer.writeByte(scale); } else if (outlen[0] != -1) writer.writeShort(outlen[0]); else if (hasRs) writer.writeShort(rsmeta.getColumnDisplaySize(i)); else writer.writeShort(stmt.getParamLen(i));
if (SanityManager.DEBUG) trace("jdbcType=" + colType + " \tdrdaType=" + Integer.toHexString(drdaType)); writer.writeByte(drdaType); if (isDecimal) { writer.writeByte(precision); writer.writeByte(scale); } else if (outlen[0] != -1) writer.writeShort(outlen[0]); else if (hasRs) writer.writeShort(rsmeta.getColumnDispla...
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(lengt...
}
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(lengt...
writer.endDdmAndDss(); }
private void writeSQLRSLRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException { int numResults = stmt.getNumResultSets(); writer.createDssObject(); writer.startDdm(CodePoint.SQLRSLRD); writer.writeShort(numResults); // num of result sets for (int i = 0; i < numResults; i ++) { writer.writeInt(i); // ...
private void writeTYPDEFOVR() throws DRDAProtocolException { writer.startDdm(CodePoint.TYPDEFOVR); writer.writeScalar2Bytes(CodePoint.CCSIDSBC, server.CCSIDSBC); writer.writeScalar2Bytes(CodePoint.CCSIDMBC, server.CCSIDMBC); if (database.sendTRGDFTRT) { writer.startDdm(CodePoint.PKGDFTCST); writer.writeShort(CodePoi...
private void writeTYPDEFOVR() throws DRDAProtocolException { writer.startDdm(CodePoint.TYPDEFOVR); writer.writeScalar2Bytes(CodePoint.CCSIDSBC, server.CCSIDSBC); writer.writeScalar2Bytes(CodePoint.CCSIDMBC, server.CCSIDMBC); if (database.sendTRGDFTRT) { writer.startDdm(CodePoint.PKGDFTCST); writer.writeShort(CodePoi...
private void writeTYPDEFOVR() throws DRDAProtocolException { //TYPDEFOVR - required - only single byte and mixed byte are specified writer.startDdm(CodePoint.TYPDEFOVR); writer.writeScalar2Bytes(CodePoint.CCSIDSBC, server.CCSIDSBC); writer.writeScalar2Bytes(CodePoint.CCSIDMBC, server.CCSIDMBC); // PKGDFTCST - Send ...
writer.endDdm(); }
private void writeTYPDEFOVR() throws DRDAProtocolException { //TYPDEFOVR - required - only single byte and mixed byte are specified writer.startDdm(CodePoint.TYPDEFOVR); writer.writeScalar2Bytes(CodePoint.CCSIDSBC, server.CCSIDSBC); writer.writeScalar2Bytes(CodePoint.CCSIDMBC, server.CCSIDMBC); // PKGDFTCST - Send ...
if (s == null) { writer.writeShort(0); writer.writeShort(0); return;
if (s == null) { writer.writeShort(0); writer.writeShort(0); return; } writer.writeLDString(s); writer.writeShort(0);
private void writeVCMorVCS(String s) throws DRDAProtocolException { //Write only VCM and 0 length for VCS if (s == null) { writer.writeShort(0); writer.writeShort(0); return; } // VCM writer.writeLDString(s); // VCS writer.writeShort(0); }
writer.writeLDString(s); writer.writeShort(0); }
private void writeVCMorVCS(String s) throws DRDAProtocolException { //Write only VCM and 0 length for VCS if (s == null) { writer.writeShort(0); writer.writeShort(0); return; } // VCM writer.writeLDString(s); // VCS writer.writeShort(0); }
throw new UnsupportedOperationException();
if (logWriter_ != null) { logWriter_.traceEntry(this, "addStatementEventListener", listener); } statementEventListeners.addElement(listener);
public void addStatementEventListener(StatementEventListener listener) { throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
if (logWriter_ != null) { logWriter_.traceEntry(this, "removeConnectionEventListener", listener); } statementEventListeners.removeElement(listener);
public void removeStatementEventListener(StatementEventListener listener) { throw new UnsupportedOperationException(); }
private EXTDTAInputStream( int dataLength, InputStream binaryInputStream) {
private EXTDTAInputStream(ResultSet rs, int columnNumber, int ndrdaType) throws SQLException, IOException { this.dataResultSet = rs; this.isEmptyStream = ! initInputStream(rs, columnNumber, ndrdaType);
private EXTDTAInputStream( int dataLength, InputStream binaryInputStream) { this.dataLength = dataLength; this.binaryInputStream = binaryInputStream; }
this.dataLength = dataLength; this.binaryInputStream = binaryInputStream;
private EXTDTAInputStream( int dataLength, InputStream binaryInputStream) { this.dataLength = dataLength; this.binaryInputStream = binaryInputStream; }
binaryInputStream = null; }finally{ blob = null; clob = null; dataResultSet = null; }
public void close() throws IOException { if (binaryInputStream != null) binaryInputStream.close(); }
EXTDTAInputStream extdtaStream = null; int length = 0; byte[] bytes = null; int ndrdaType = drdaType | 1; if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBBYTES) { bytes = rs.getBytes(column); } else if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBCMIXED) { String s = rs.getString(column); try { if (s != null) byte...
}catch(IOException e){ throw new SQLException(e.getMessage());
public static EXTDTAInputStream getEXTDTAStream(ResultSet rs, int column, int drdaType) throws SQLException { EXTDTAInputStream extdtaStream = null; int length = 0; byte[] bytes = null; int ndrdaType = drdaType | 1; //nullable drdaType // BLOBS if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBBYTES) { //T...
if (bytes != null) { length = bytes.length; InputStream is = new ByteArrayInputStream(bytes); extdtaStream = new EXTDTAInputStream(length, is); } return extdtaStream;
public static EXTDTAInputStream getEXTDTAStream(ResultSet rs, int column, int drdaType) throws SQLException { EXTDTAInputStream extdtaStream = null; int length = 0; byte[] bytes = null; int ndrdaType = drdaType | 1; //nullable drdaType // BLOBS if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBBYTES) { //T...
if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH);
public final void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException { int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw...
if (reader == null) { setNull(parameterIndex, jdbcTypeId); return; }
public final void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException { int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw...
if (reader == null) { setNull(parameterIndex, jdbcTypeId); return; }
protected void setCharacterStreamInternal(int parameterIndex, Reader reader, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); try { ParameterValueSet pvs = getParms(); LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn...
LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn.setLimit(length); ReaderToUTF8Stream utfIn = new ReaderToUTF8Stream(limitIn);
if (jdbcTypeId == Types.CLOB) { DataTypeDescriptor dtd[] = preparedStatement .getParameterTypes(); int colWidth = dtd[parameterIndex - 1].getMaximumWidth();
protected void setCharacterStreamInternal(int parameterIndex, Reader reader, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); try { ParameterValueSet pvs = getParms(); LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn...
pvs.getParameterForSet(parameterIndex - 1).setValue(utfIn, length);
if (colWidth < length) usableLength = colWidth; utfIn = new ReaderToUTF8Stream( limitIn, colWidth, length - usableLength); } else { utfIn = new ReaderToUTF8Stream( limitIn,usableLength,length - usableLength); } limitIn.setLimit(usableLength); pvs.getParameterForSet( parameterIndex - 1).setValue(utfIn,usableLengt...
protected void setCharacterStreamInternal(int parameterIndex, Reader reader, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); try { ParameterValueSet pvs = getParms(); LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn...
setCharacterStreamInternal(i, x.getCharacterStream(), -1);
{ int streamLength = (int) x.length(); setCharacterStreamInternal(i, x.getCharacterStream(), streamLength); }
public void setClob (int i, Clob x) throws SQLException { int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2, only allow setClob on a CLOB column. if (colType != Types.CLOB) throw dataTypeConversion(i...
return new FileInputStream(propFile);
InputStream is = new FileInputStream(propFile); try { serviceProperties.load(new BufferedInputStream(is)); } finally { is.close(); }
public Properties getServiceProperties( final String serviceName, Properties defaultProperties) throws StandardException { if (SanityManager.DEBUG) { if (! serviceName.equals(getCanonicalServiceName(serviceName))) { SanityManager.THROWASSERT("serviceName (" + serviceName + ") expected to equal ...
return null;
public Properties getServiceProperties( final String serviceName, Properties defaultProperties) throws StandardException { if (SanityManager.DEBUG) { if (! serviceName.equals(getCanonicalServiceName(serviceName))) { SanityManager.THROWASSERT("serviceName (" + serviceName + ") expected to equal ...
return null;
public Properties getServiceProperties( final String serviceName, Properties defaultProperties) throws StandardException { if (SanityManager.DEBUG) { if (! serviceName.equals(getCanonicalServiceName(serviceName))) { SanityManager.THROWASSERT("serviceName (" + serviceName + ") expected to equal ...
return new FileInputStream(propFile);
InputStream is = new FileInputStream(propFile); try { serviceProperties.load(new BufferedInputStream(is)); } finally { is.close(); }
public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { if( recreateFrom != null) // restore from a file { Fil...