rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
reader.markCollection();
reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.FDODSC: while (reader.getDdmLength() > 6) { int dtaGrpLen = reader.readUnsignedByte(); int numVarsInGrp = (dtaGrpLen - 3) / 3; if (SanityManager.DEBUG) trace("num of vars in this group is: "+numVar...
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { String strVal; PreparedStatement ps = stmt.getPreparedStatement(); int codePoint; EmbedParameterSetMetaData pmeta = null; Vector paramDrdaTypes = new Vector(); Vector paramLens = new Vector(); ArrayList paramExtPositio...
while (codePoint != -1) { switch (codePoint) { case CodePoint.FDODSC: while (reader.getDdmLength() > 6) { int dtaGrpLen = reader.readUnsignedByte(); int numVarsInGrp = (dtaGrpLen - 3) / 3; if (SanityManager.DEBUG) trace("num of vars in this group is: "+numVarsInGrp); reader.readByte(); reader.readByte(); for (int j = ...
}
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { String strVal; PreparedStatement ps = stmt.getPreparedStatement(); int codePoint; EmbedParameterSetMetaData pmeta = null; Vector paramDrdaTypes = new Vector(); Vector paramLens = new Vector(); ArrayList paramExtPositio...
if (codePoint == -1 && st != null) missingCodePoint(CodePoint.CCSIDSBC); while (codePoint != -1) { switch (codePoint) { case CodePoint.CCSIDSBC: checkLength(CodePoint.CCSIDSBC, 2); ccsidSBC = reader.readNetworkShort(); try { ccsidSBCEncoding = CharacterEncodings.getJavaEncoding(ccsidSBC); } catch (Exception e) { value...
} if (st == null) { if (ccsidSBC != 0) { database.ccsidSBC = ccsidSBC; database.ccsidSBCEncoding = ccsidSBCEncoding; } if (ccsidDBC != 0) { database.ccsidDBC = ccsidDBC; database.ccsidDBCEncoding = ccsidDBCEncoding; } if (ccsidMBC != 0) { database.ccsidMBC = ccsidMBC; database.ccsidMBCEncoding = ccsidMBCEncoding; } } e...
private void parseTYPDEFOVR(DRDAStatement st) throws DRDAProtocolException { int codePoint; int ccsidSBC = 0; int ccsidDBC = 0; int ccsidMBC = 0; String ccsidSBCEncoding = null; String ccsidDBCEncoding = null; String ccsidMBCEncoding = null; reader.markCollection(); codePoint = reader.getCodePoint(); // at ...
throws SQLException, DRDAProtocolException { boolean retval = false; switch (stmt.getQryscrorn()) { case CodePoint.QRYSCRREL: int rows = (int)stmt.getQryrownbr(); if ((rs.isAfterLast() && rows > 0) || (rs.isBeforeFirst() && rows < 0)) { retval = false; } else { retval = rs.relative(rows); } break; case CodePoint.QRYSCR...
throws SQLException, DRDAProtocolException { boolean retval = false; switch (stmt.getQryscrorn()) { case CodePoint.QRYSCRREL: int rows = (int)stmt.getQryrownbr(); if ((rs.isAfterLast() && rows > 0) || (rs.isBeforeFirst() && rows < 0)) { retval = false; } else { retval = rs.relative(rows);
private boolean positionCursor(DRDAStatement stmt, ResultSet rs) throws SQLException, DRDAProtocolException { boolean retval = false; switch (stmt.getQryscrorn()) { case CodePoint.QRYSCRREL: int rows = (int)stmt.getQryrownbr(); if ((rs.isAfterLast() ...
return retval; }
break; case CodePoint.QRYSCRABS: if (stmt.getQryrownbr() == 0) { rs.beforeFirst(); retval = false; } else { retval = rs.absolute((int)stmt.getQryrownbr()); } break; case CodePoint.QRYSCRAFT: rs.afterLast(); retval = false; break; case CodePoint.QRYSCRBEF: rs.beforeFirst(); retval = false; break; default: agentError("...
private boolean positionCursor(DRDAStatement stmt, ResultSet rs) throws SQLException, DRDAProtocolException { boolean retval = false; switch (stmt.getQryscrorn()) { case CodePoint.QRYSCRREL: int rows = (int)stmt.getQryrownbr(); if ((rs.isAfterLast() ...
if (checkSecurityCodepoint) verifyInOrderACCSEC_SECCHK(codePoint,session.getRequiredSecurityCodepoint()); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = parseCNTQRY(); if (stmt != null) { writeQRYDTA(stmt); if (stmt.rsIsClosed()) { writeENDQRYRM(CodePoint.SVRCOD_WARNING); writeNullSQLCARDobject(); } checkWarn...
if (checkSecurityCodepoint) verifyInOrderACCSEC_SECCHK(codePoint,session.getRequiredSecurityCodepoint()); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = parseCNTQRY(); if (stmt != null) { writeQRYDTA(stmt); if (stmt.rsIsClosed()) { writeENDQRYRM(CodePoint.SVRCOD_WARNING); writeNullSQLCARDobject();
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(); ...
catch(SQLException e) { cleanUpAndCloseResultSet(stmt, e, writerMark);
checkWarning(null, null, stmt.getResultSet(), 0, false, sendWarningsOnCNTQRY); } } catch(SQLException e) { cleanUpAndCloseResultSet(stmt, e, writerMark); } break; case CodePoint.EXCSQLIMM: try { updateCount = parseEXCSQLIMM(); if (database.RDBUPDRM_sent == false) { writeRDBUPDRM(); } checkWarning(null, da...
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(); ...
break; case CodePoint.EXCSQLIMM: try { updateCount = parseEXCSQLIMM(); if (database.RDBUPDRM_sent == false) { writeRDBUPDRM(); } checkWarning(null, database.getDefaultStatement().getStatement(), null, updateCount, true, true); } catch (SQLException e) { writer.clearDSSesBackToMark(writerMark); writeSQLCARDs...
} } } catch (SQLException e) { writer.clearDSSesBackToMark(writerMark); writeOPNQFLRM(e); } break; case CodePoint.RDBCMM: try { if (SanityManager.DEBUG) trace("Received commit"); if (!database.getConnection().getAutoCommit()) { database.getConnection().clearWarnings(); database.commit(); writeENDUOWRM(COMMIT); check...
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(); ...
int drdaType, int extLen) throws DRDAProtocolException, SQLException
int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); boolean checkNullability = false; if (sqlamLevel >= MGRLVL_7 && FdocaConstants.isNullable(drdaType)) checkNullability = true; try { byte[] paramBytes = reader.g...
private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR...
PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); boolean checkNullability = false; if (sqlamLevel >= MGRLVL_7 && FdocaConstants.isNullable(drdaType)) checkNullability = true; try { byte[] paramBytes = reader.getExtData(checkNullability); String paramString = null; switch (drdaTyp...
case DRDAConstants.DRDA_TYPE_LOBBYTES: case DRDAConstants.DRDA_TYPE_NLOBBYTES: if (SanityManager.DEBUG) trace("parameter value is: "+paramBytes); ps.setBytes(i+1, paramBytes); break; case DRDAConstants.DRDA_TYPE_LOBCSBCS: case DRDAConstants.DRDA_TYPE_NLOBCSBCS: paramString = new String(paramBytes, stmt.ccsidSBCEncodi...
private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR...
if (ps instanceof CallableStatement)
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:
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 indicat...
if (stmt.isOutputParam(i+1))
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); break; } case DRDAConstants.DRDA_TYPE_NINTEGER: { int pa...
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 indicat...
CallableStatement cs = (CallableStatement) ps; cs.registerOutParameter(i+1, stmt.getOutputParamType(i+1));
if (paramExtPositions == null) paramExtPositions = new ArrayList(); paramExtPositions.add(new Integer(i));
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 indicat...
switch (drdaType)
default:
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 indicat...
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); break; } case DRD...
String paramVal = reader.readLDStringData(stmt.ccsidMBCEncoding); if (SanityManager.DEBUG) trace("default type parameter value is: "+paramVal); ps.setObject(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 indicat...
return paramExtPositions; }
} return paramExtPositions; }
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 indicat...
if (closed())
if (closed()) break; if (session != prevSession) { initializeForSession(); } try { long timeStart = System.currentTimeMillis(); switch (session.state) { case Session.INIT: sessionInitialState(); if (session == null)
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 != prevSession) ...
if (session != prevSession)
case Session.ATTEXC: long currentTimeSlice; do { processCommands(); currentTimeSlice = getTimeSlice(); } while ((currentTimeSlice == 0) || (System.currentTimeMillis() - timeStart < currentTimeSlice)); break; default: agentError("Session in invalid state:" + session.state); } } catch (Exception e) { if (e instanceof...
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 != prevSession) ...
initializeForSession();
closeSession();
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 != prevSession) ...
try { long timeStart = System.currentTimeMillis(); switch (session.state) { case Session.INIT: sessionInitialState(); if (session == null) break; case Session.ATTEXC: long currentTimeSlice; do { processCommands(); currentTimeSlice = getTimeSlice(); } while ((currentTimeSlice == 0) || (System.currentTimeMillis() - ti...
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 != prevSession) ...
if (SanityManager.DEBUG) trace("Ending connection thread"); server.getThreadList().removeElement(this);
} 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 != prevSession) ...
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, ...
{ synchronized(logConnectionsSync) { logConnections = value; }
{ synchronized(logConnectionsSync) { logConnections = value;
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value; } }
}
protected void setLogConnections(boolean value) { synchronized(logConnectionsSync) { logConnections = value; } }
{ synchronized(timeSliceSync) { timeSlice = value; }
{ synchronized(timeSliceSync) { timeSlice = value;
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value; } }
}
protected void setTimeSlice(long value) { synchronized(timeSliceSync) { timeSlice = value; } }
{
{ reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader();
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID())) { reader.readDssHeader(); 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 { writer.createDssReply(); writer.startDdm(CodePoint.ACCSECRD); if (securityCheckCode != CodePoint.SECCHKCD_NOTSUPPORTED) writer.writeScalar2Bytes(CodePoint.SECMEC, database.securityMechanism);
throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.ACCSECRD); if (securityCheckCode != CodePoint.SECCHKCD_NOTSUPPORTED) writer.writeScalar2Bytes(CodePoint.SECMEC, database.securityMechanism); else { if ( server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SEC...
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...
{ if ( server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM ) writer.writeScalar2Bytes(CodePoint.SECMEC,server.getSecurityMechanism()); else { writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.S...
{ writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_EUSRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDONL); } } if (securityCheckCode != 0) { writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); }...
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...
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); ...
doneData(stmt, rs); moreData = false; return moreData; } SQLWarning sqlw = (rs != null)? rs.getWarnings(): null; if (rs != null && rs.rowUpdated()) { SQLWarning w = new SQLWarning(null, SQLState.ROW_UPDATED); if (sqlw != null) { w.setNextWarning(sqlw); } sqlw = w; } if (rs != null && rs.rowDeleted()) { SQLWa...
drdaType = stmt.getRsDRDAType(i) & 0xff; precision = stmt.getRsPrecision(i); scale = stmt.getRsScale(i); ndrdaType = drdaType | 1; if (SanityManager.DEBUG) trace("!!drdaType = " + java.lang.Integer.toHexString(drdaType) + "precision = " + precision +" scale = " + scale); switch (ndrdaType)
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); ...
drdaType = stmt.getRsDRDAType(i) & 0xff; precision = stmt.getRsPrecision(i); scale = stmt.getRsScale(i); ndrdaType = drdaType | 1; if (SanityManager.DEBUG) trace("!!drdaType = " + java.lang.Integer.toHexString(drdaType) + "precision = " + precision +" scale = " + scale); switch (ndrdaType) { case DRDAConstants.DRDA_...
case DRDAConstants.DRDA_TYPE_NLOBBYTES: case DRDAConstants.DRDA_TYPE_NLOBCMIXED: EXTDTAInputStream extdtaStream= EXTDTAInputStream.getEXTDTAStream(rs, i, drdaType); writeFdocaVal(i,extdtaStream, drdaType, precision,scale,rs.wasNull(),stmt); break; case DRDAConstants.DRDA_TYPE_NINTEGER: int ival = rs.getInt(i); valNull...
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); ...
if (writer.getDSSLength() >= blksize)
else
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); ...
splitQRYDTA(stmt, blksize); return false;
drdaType = stmt.getParamDRDAType(i) & 0xff; precision = stmt.getParamPrecision(i); scale = stmt.getParamScale(i); ndrdaType = drdaType | 1; if (stmt.isOutputParam(i)) { if (SanityManager.DEBUG) trace("***getting Object "+i); val = ((CallableStatement) stmt.ps).getObject(i); valNull = (val == null); writeFdocaVal(i,v...
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); ...
if (rs == null) return moreData; rowCount++; if (rowCount < stmt.getQryrowset()) { hasdata = rs.next(); } else if (stmt.isScrollable() || noRetrieveRS) moreData=false; } while (hasdata && rowCount < stmt.getQryrowset()); if (!stmt.isScrollable()) stmt.rowCount += rowCount; if (!hasdata) { doneData(stmt, rs); mo...
} if (writer.getDSSLength() >= blksize) { splitQRYDTA(stmt, blksize); return false; } if (rs == null)
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); ...
}
rowCount++; if (rowCount < stmt.getQryrowset()) { hasdata = rs.next(); } else if (stmt.isScrollable() || noRetrieveRS) moreData=false; } while (hasdata && rowCount < stmt.getQryrowset()); if (!stmt.isScrollable()) stmt.rowCount += rowCount; if (!hasdata) { doneData(stmt, rs); moreData=false; } if (!stmt.isScroll...
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); ...
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(CodePoint...
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 { wr...
} if (stmt.getConcurType() == ResultSet.CONCUR_UPDATABLE) { if (stmt.getResultSet() != null) { if (stmt.getResultSet().getConcurrency() == ResultSet.CONCUR_UPDATABLE) { writer.writeScalar1Byte(CodePoint.QRYATTUPD, CodePoint.QRYUPD);
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(CodePoint...
writer.endDdmAndDss (); }
} 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(CodePoint...
if (!stmt.hasdata()) { final boolean qryclsOnLmtblkprc = appRequester.supportsQryclsimpForLmtblkprc(); if (stmt.isRSCloseImplicit(qryclsOnLmtblkprc)) { stmt.rsClose(); } }
if (!stmt.hasdata()) { final boolean qryclsOnLmtblkprc = appRequester.supportsQryclsimpForLmtblkprc(); if (stmt.isRSCloseImplicit(qryclsOnLmtblkprc)) { stmt.rsClose(); }
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 ...
}
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 ...
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);
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.SPACE_CH...
catch (UnsupportedEncodingException e) { agentError("Unsupported coding exception for server encoding " + server.DEFAULT_ENCODING); } }
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.SPACE_CH...
throws DRDAProtocolException,SQLException { writer.writeByte(0);
throws DRDAProtocolException,SQLException { writer.writeByte(0); writer.writeShort(0); writer.writeShort(rtnOutput ? rsmeta.isWritable(jdbcElemNum) : false); if (rtnOutput && rsmeta.isAutoIncrement(jdbcElemNum)) writer.writeShort(2); else writer.writeShort(0); if (pmeta != null && !rtnOutput) { int mode = pmeta...
private void writeSQLDXGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int jdbcElemNum, boolean rtnOutput) throws DRDAProtocolException,SQLException { // Null indicator indicates we have data writer.writeByte(0); // SQLXKEYMEM; DRDA TYPE I2; ENVLID 0x04; Length Override 2 // Hard to get primary k...
writer.writeShort(rtnOutput ? rsmeta.isWritable(jdbcElemNum) : false);
} writer.writeShort(0);
private void writeSQLDXGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int jdbcElemNum, boolean rtnOutput) throws DRDAProtocolException,SQLException { // Null indicator indicates we have data writer.writeByte(0); // SQLXKEYMEM; DRDA TYPE I2; ENVLID 0x04; Length Override 2 // Hard to get primary k...
if (rtnOutput && rsmeta.isAutoIncrement(jdbcElemNum)) writer.writeShort(2); else writer.writeShort(0);
writeVCMorVCS(null);
private void writeSQLDXGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int jdbcElemNum, boolean rtnOutput) throws DRDAProtocolException,SQLException { // Null indicator indicates we have data writer.writeByte(0); // SQLXKEYMEM; DRDA TYPE I2; ENVLID 0x04; Length Override 2 // Hard to get primary k...
if (pmeta != null && !rtnOutput) { int mode = pmeta.getParameterMode(jdbcElemNum); if (mode == JDBC30Translation.PARAMETER_MODE_UNKNOWN) { int type = DRDAStatement.getOutputParameterTypeFromClassName( pmeta.getParameterClassName(jdbcElemNum)); if (type != DRDAStatement.NOT_OUTPUT_PARAM) mode = JDBC30Translation.PAR...
writeVCMorVCS(rtnOutput ? rsmeta.getTableName(jdbcElemNum) : null);
private void writeSQLDXGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int jdbcElemNum, boolean rtnOutput) throws DRDAProtocolException,SQLException { // Null indicator indicates we have data writer.writeByte(0); // SQLXKEYMEM; DRDA TYPE I2; ENVLID 0x04; Length Override 2 // Hard to get primary k...
writeVCMorVCS(null); writeVCMorVCS(rtnOutput ? rsmeta.getTableName(jdbcElemNum) : null); writeVCMorVCS(rtnOutput ? rsmeta.getSchemaName(jdbcElemNum): null);
writeVCMorVCS(rtnOutput ? rsmeta.getSchemaName(jdbcElemNum): null);
private void writeSQLDXGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int jdbcElemNum, boolean rtnOutput) throws DRDAProtocolException,SQLException { // Null indicator indicates we have data writer.writeByte(0); // SQLXKEYMEM; DRDA TYPE I2; ENVLID 0x04; Length Override 2 // Hard to get primary k...
{ 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(CodePoint.CSTMBCS); writer.endDdm(); writer.startDdm(CodePoint.US...
{ 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(CodePoint.CSTMBCS);
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 - Sen...
else
else if (JVMInfo.JDK_ID < 6)
public String getString() { BigDecimal localValue = getBigDecimal(); if (localValue == null) return null; else return localValue.toString(); }
else { try { return (String) toPlainString.invoke(localValue, null); } catch (IllegalAccessException e) { throw new IllegalAccessError("toPlainString"); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof RuntimeException) { throw (RuntimeException) t; } else if (t instance...
public String getString() { BigDecimal localValue = getBigDecimal(); if (localValue == null) return null; else return localValue.toString(); }
vetObject( dbmd, unsupportedList, notUnderstoodList ); vetObject( ps, unsupportedList, notUnderstoodList ); vetObject( parameterMetaData, unsupportedList, notUnderstoodList ); vetObject( rs, unsupportedList, notUnderstoodList ); vetObject( rsmd, unsupportedList, notUnderstoodList ); vetObject( stmt, unsupportedList, no...
private void connectionWorkhorse ( Connection conn, HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { vetSavepoint( conn, unsupportedList, notUnderstoodList ); vetLargeObjects( conn, unsupportedList, notUnderstoodList ); DatabaseMetaData dbmd = conn.getMetaData(); Prepare...
cs.close(); stmt.close(); rs.close(); ps.close();
private void connectionWorkhorse ( Connection conn, HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { vetSavepoint( conn, unsupportedList, notUnderstoodList ); vetLargeObjects( conn, unsupportedList, notUnderstoodList ); DatabaseMetaData dbmd = conn.getMetaData(); Prepare...
int count = notUnderstoodList.size();
private void printNotUnderstoodList( HashSet<String> notUnderstoodList ) { println( "\n\n" ); println( "--------------- NOT UNDERSTOOD METHODS ------------------" ); println( "--" ); int count = notUnderstoodList.size(); String[] result = new String[ count ]; notUnderstoodList.toArray( result ); Arrays.sort( ...
int count = unsupportedList.size();
private void printUnsupportedList( HashSet<String> unsupportedList ) { println( "--------------- UNSUPPORTED METHODS ------------------" ); println( "--" ); int count = unsupportedList.size(); String[] result = new String[ count ]; unsupportedList.toArray( result ); Arrays.sort( result ); for ( int i = 0; i <...
Method[] methods = iface.getMethods();
Method[] methods = sortMethods( iface );
private void vetInterfaceMethods ( Object candidate, Class iface, HashSet<String> unsupportedList, HashSet<String> notUnderstoodList ) throws Exception { Method[] methods = iface.getMethods(); int methodCount = methods.length; for ( int i = 0; i < methodCount; i++ ) { Method method = methods[ i ]; vetMe...
rowHolder = new TemporaryRowHolderImpl(tc, properties, resultDescription);
rowHolder = new TemporaryRowHolderImpl(activation, properties, resultDescription);
private long bulkInsertCore(LanguageConnectionContext lcc, long oldHeapConglom) throws StandardException { fullTemplate = constants.getEmptyHeapRow(lcc); bulkHeapCC = tc.openCompiledConglomerate( false, TransactionController.OPENMODE_FORUPDATE, ...
rowHolder = new TemporaryRowHolderImpl(tc, properties, resultDescription);
rowHolder = new TemporaryRowHolderImpl(activation, properties, resultDescription);
private void normalInsertCore(LanguageConnectionContext lcc, boolean firstExecute) throws StandardException { boolean firstDeferredRow = true; ExecRow deferredRowBuffer = null; long user_autoinc=0; /* Get or re-use the row changer. * NOTE: We need to set ourself as the top result set * if this i...
autoGeneratedKeysRowsHolder = new TemporaryRowHolderImpl(tc, properties, rd);
autoGeneratedKeysRowsHolder = new TemporaryRowHolderImpl(activation, properties, rd);
private void normalInsertCore(LanguageConnectionContext lcc, boolean firstExecute) throws StandardException { boolean firstDeferredRow = true; ExecRow deferredRowBuffer = null; long user_autoinc=0; /* Get or re-use the row changer. * NOTE: We need to set ourself as the top result set * if this i...
for (int i = 0; i < dataToShift; i++) { bytes_[dataByte + shiftOffset] = bytes_[dataByte]; dataByte--; }
dataByte -= dataToShift; System.arraycopy(bytes_, dataByte + 1,bytes_, dataByte + shiftOffset + 1, dataToShift);
protected final void finalizeDssLength() { // calculate the total size of the dss and the number of bytes which would // require continuation dss headers. The total length already includes the // the 6 byte dss header located at the beginning of the dss. It does not // include the leng...
throw Util.notImplemented();
if (timeout < 0) { throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER, new Integer(timeout), "timeout", "java.sql.Connection.isValid"); } return !isClosed();
public boolean isValid(int timeout) throws SQLException { throw Util.notImplemented(); }
if (fileToGo.exists()) { if (!fileToGo.delete()) { throw StandardException.newException( SQLState.FILE_CANNOT_REMOVE_FILE, fileToGo); } }
try { AccessController.doPrivileged(this); } catch (PrivilegedActionException e) { throw (StandardException) (e.getException()); }
public int performWork(ContextManager context) throws StandardException { // SECURITY PERMISSION - MP1, OP5 if (fileToGo.exists()) { if (!fileToGo.delete()) { throw StandardException.newException( SQLState.FILE_CANNOT_REMOVE_FILE, f...
getCompilerContext().createDependency(td);
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException { super.bind(ddlNode, dd); refTableSd = getSchemaDescriptor(refTableName.getSchemaName()); if (refTableSd.isSystemSchema()) { throw StandardException.newException(SQLState.LANG_NO_FK_ON_SYSTEM_SCHEMA); } // check the refe...
closeMethodArgument(acb, mb); mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getRowResultSet", ClassName.NoPutResultSet, 7);
mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getRowResultSet", ClassName.NoPutResultSet, 6);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); // Get our final cost estimate. costEstimate = getFinalCostEstimate(); /* ** Check and see if everything bel...
{ String[] arg_names = { "CATALOGNAME", "SCHEMANAME", "FUNCNAME", "PARAMNAME", "OPTIONS"}; TypeDescriptor[] arg_types = { DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128), DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128), DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VA...
void create_10_2_system_procedures( TransactionController tc, UUID sysUtilUUID) throws StandardException { // void SYSCS_UTIL.SYSCS_BACKUP_DATABASE_NOWAIT( // IN BACKUPDIR VARCHAR(Limits.DB2_VARCHAR_MAXWIDTH) // ) { // proc...
passed = caseGrantRevoke(conn, phase, oldMajorVersion, oldMinorVersion) && passed;
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ...
networkServerController.start(new PrintWriter(System.out));
networkServerController.start(null);
protected void setUp() throws Exception { if (!config.getJDBCClient().isEmbedded()) { BaseTestCase.println("Starting network server:"); networkServerController = new NetworkServerControl (InetAddress.getByName(config.getHostName()), config.getPort()); ...
goAway = false;
public void run() { goAway = false; while (true) { synchronized (this) { if (goAway) return; try { wait(); } catch (InterruptedException ie) { } } } }
t_updateNString1(); t_updateNString2(); t_updateNClob1(); t_updateNClob2(); t_getNClob1(); t_getNClob2(); t_getSQLXML1(); t_getSQLXML2(); t_updateSQLXML1(); t_updateSQLXML2();
void startTestResultSetMethods(Connection conn_in,PreparedStatement ps_in,ResultSet rs_in) { conn = conn_in; ps = ps_in; rs = rs_in; t_getHoldability(); t_isClosed(); t_updateNString1(); t_updateNString2(); t_updateNClob1(); t_up...
case REVOKE_PRIVILEGE: return "REVOKE PRIVILEGE";
public String getActionString(int action) { switch (action) { case ALTER_TABLE: return "ALTER TABLE"; case RENAME: //for rename table and column return "RENAME"; case RENAME_INDEX: return "RENAME INDEX"; case COMPILE_FAILED: return "COMPILE FAILED"; case DROP_TABLE: return "DROP TABLE"; ca...
SanityManager.DEBUG_PRINT("moveRecordForCompressAtSlot", "last = " + dest_page.getPageNumber());
public int moveRecordForCompressAtSlot( int slot, Object[] row, RecordHandle[] old_handle, RecordHandle[] new_handle) throws StandardException { long src_pageno = getPageNumber(); try { fetchFromSlot( null, slot, ...
SanityManager.DEBUG_PRINT("moveRecordForCompressAtSlot", "unfill = " + dest_page.getPageNumber());
public int moveRecordForCompressAtSlot( int slot, Object[] row, RecordHandle[] old_handle, RecordHandle[] new_handle) throws StandardException { long src_pageno = getPageNumber(); try { fetchFromSlot( null, slot, ...
SanityManager.DEBUG_PRINT("moveRecordForCompressAtSlot", "addPage = " + dest_page.getPageNumber());
public int moveRecordForCompressAtSlot( int slot, Object[] row, RecordHandle[] old_handle, RecordHandle[] new_handle) throws StandardException { long src_pageno = getPageNumber(); try { fetchFromSlot( null, slot, ...
closeMethodArgument(acb, mb);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. ...
ClassName.NoPutResultSet, 8);
ClassName.NoPutResultSet, 7);
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. ...
sqlw.initCause(getCause());
sqlw.initCause(this);
public SQLWarning getSQLWarning() { SQLWarning sqlw = new SQLWarning(getMessage(), getSQLState(), getErrorCode()); // If we're in a runtime that supports chained exceptions, set the cause // of the SQLException. if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 ) { ...
backup(new File(backupDir));
Transaction t = findUserTransaction(ContextService.getFactory().getCurrentContextManager(), AccessFactoryGlobals.USER_TRANS_NAME); backup(t, new File(backupDir));
public void backup(String backupDir) throws StandardException { if (backupDir == null || backupDir.equals("")) { throw StandardException.newException( SQLState.RAWSTORE_CANNOT_CREATE_BACKUP_DIRECTORY, (File)null); } // in case this is an URL form String backupDirURL = null; try { U...
enableLogArchiveMode();
logFactory.enableLogArchiveMode();
public void backupAndEnableLogArchiveMode(String backupDir,boolean deleteOnlineArchivedLogFiles) throws StandardException { enableLogArchiveMode(); backup(backupDir); //After successful backup delete the archived log files //that are not necessary to do a roll-forward recovery //from this backup if ...
public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
public synchronized void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws StandardException { logFactory.disableLogArchiveMode(); if(deleteOnlineArchivedLogFiles) { logFactory.deleteOnlineArchivedLogFiles(); } }
closeMethodArgument(acb, mb);
private void generateMinion(ExpressionClassBuilder acb, MethodBuilder mb, boolean genChildResultSet) throws StandardException { MethodBuilder userExprFun; ValueNode searchClause = null; ValueNode equijoinClause = null; /* The tableProperties, if non-null, must be correct to get this far. * We si...
mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getHashTableResultSet", ClassName.NoPutResultSet, 15);
mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getHashTableResultSet", ClassName.NoPutResultSet, 14);
private void generateMinion(ExpressionClassBuilder acb, MethodBuilder mb, boolean genChildResultSet) throws StandardException { MethodBuilder userExprFun; ValueNode searchClause = null; ValueNode equijoinClause = null; /* The tableProperties, if non-null, must be correct to get this far. * We si...
testEncoding = parentProps.getProperty("derbyTesting.encoding");
public static Properties locateSuiteProperties(String suiteName, Properties parentProps, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException, Exception { // Check for suite properties //System.out.println("Checking for suite properties"); String suitePr...
stdout.getData(), stderr.getData(), pwOut);
stdout.getData(), stderr.getData(), pwOut, testEncoding);
private static void runTests(Properties suiteProps, String suite) throws IOException, Exception { // save a copy of the system properties at this point; when runing with // java threads we need to reset the system properties to this list; // otherwise we start to accumulate extraneous properti...
if(parentProperties.getProperty("derbyTesting.encoding") != null) p.put("derbyTesting.encoding", testEncoding); else testEncoding = p.getProperty("derbyTesting.encoding");
private static void setSuiteProperties(Properties p, String suiteName, Properties parentProperties, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException { // Some properties may have been set by the top suite // jvm, jvmflags, classpath, systemdiff, verbose, etc...
testEncoding = suiteProperties.getProperty("derbyTesting.encoding");
private static void setTopSuiteProperties() throws ClassNotFoundException, IOException { framework = suiteProperties.getProperty("framework"); jversion = suiteProperties.getProperty("jversion"); //System.out.println("RunList top jversion= " + jversion); jvmName = suiteProperties.getProperty("jvm")...
Logs.reportMessage("CSLOOK_ForeignHeader");
Logs.reportMessage("DBLOOK_ForeignHeader");
private static void createKeysFrom (ResultSet rs) throws SQLException { boolean firstTime = true; while (rs.next()) { if (!rs.getBoolean(7)) // this row is NOT for a constraint, so skip it. continue; String tableId = rs.getString(3); String tableName = dblook.lookupTableId(tableId); if (dblook.isExclud...
Logs.reportMessage("CSLOOK_PrimUniqueHeader");
Logs.reportMessage("DBLOOK_PrimUniqueHeader");
private static void createKeysFrom (ResultSet rs) throws SQLException { boolean firstTime = true; while (rs.next()) { if (!rs.getBoolean(7)) // this row is NOT for a constraint, so skip it. continue; String tableId = rs.getString(3); String tableName = dblook.lookupTableId(tableId); if (dblook.isExclud...
Logs.reportMessage("CSLOOK_KeysHeader");
Logs.reportMessage("DBLOOK_KeysHeader");
private static void printHeader() { if (printedHeader) return; Logs.reportString("----------------------------------------------"); Logs.reportMessage("CSLOOK_KeysHeader"); Logs.reportString("----------------------------------------------\n"); printedHeader = true; }
else if(needJdk14) pwOut.println("Cannot run the suite, requires jdk14 or higher, have jdk" + javaVersion);
private static void runSuites(Vector suitesToRun) throws ClassNotFoundException, FileNotFoundException, IOException, Exception { // For each suite, locate its properties and runall files // which should be in the "suites" dir or user.dir String suiteName = ""; userdir = ...
if (!isJdk14 && isJdk14Test)
if ((!isJdk14 && !isJdk15) && isJdk14Test)
private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isRmiJdbc = false; boolean isIBridge = false; boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk118 = false; boolean isJdk117 = false; bo...
con = DriverManager.getConnection("jdbc:derby:wombat;shutdown=true");
TestUtil.shutdownUsingDataSource("wombat");
public static void main(String[] args) { Connection con; Statement stmt; try { System.out.println("Test BootLock Starting"); // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); String derbyHome = System.getProperty("derby.system.home"); con = ij....
con = DriverManager.getConnection("jdbc:derby:wombat");
Properties prop = new Properties(); prop.setProperty("databaseName", "wombat"); TestUtil.getDataSourceConnection(prop);
public static void main(String[] args) { Connection con; Statement stmt; try { System.out.println("Test BootLock Starting"); // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); String derbyHome = System.getProperty("derby.system.home"); con = ij....
isServerRunning = checkServer(); if (isServerRunning) { portText.setEditable(false); hostText.setEditable(false); systemHomeText.setEditable(false); }
protected void fillControls() { portText.setText(Integer.toString(dsProps.getPort())); hostText.setText(dsProps.getHost()); systemHomeText.setText(dsProps.getSystemHome()); }
if (isServerRunning) { Shell shell = new Shell(); MessageDialog.openInformation( shell, CommonNames.PLUGIN_NAME, Messages.SERVER_RUNNING ); }
protected void getParams() { dsProps = new DerbyProperties(); try { dsProps.setPort(Integer.parseInt(portText.getText())); } catch (NumberFormatException ne) { // do nothing; use the default port number } dsProps.setHost(hostText.getText()); dsProps.setSystemHome(systemHomeText.getText()); }
if (change = !old.equals(value))
change = !old.equals(value); if (change && (values != oldValues))
private void setProperties(Properties values) throws PrivilegedActionException { for (Enumeration e = values.propertyNames(); e.hasMoreElements();) { String key = (String) e.nextElement(); String value = values.getProperty(key); String old = BaseTestCase.getSystemProperty(key); ...
newValues = null; oldValues = null;
protected void tearDown() throws java.lang.Exception { // Clear all the system properties set by the new set // that will not be reset by the old set. for (Enumeration e = newValues.propertyNames(); e.hasMoreElements();) { String key = (String) e.nextElement(); if (oldVal...
if (!TestUtil.isJCCFramework()) { testVaryingClientParameterTypeBatch(conn); }
public static void main (String args[]) { try { System.out.println("prepStmt Test Starts"); ij.getPropertyArg(args); conn = ij.startJBMS(); if (conn == null) { System.out.println("conn didn't work"); return; } Statement cleanstmt = conn.createStatement(); TestUtil.cleanUpTest(cleanstmt, testO...
execCmdDumpResults(maxthreadsCmd1);
ExecProcUtil.execCmdDumpResults(maxthreadsCmd1,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vC...
execCmdDumpResults(maxthreadsCmd2);
ExecProcUtil.execCmdDumpResults(maxthreadsCmd2,vCmd,bos);
public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vC...