rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
protected void close() { synchronized (closeSync) { close = true; | protected void close() { synchronized (closeSync) { close = true; } | protected void close() { synchronized (closeSync) { close = true; } } |
} | protected void close() { synchronized (closeSync) { close = true; } } | |
private void closeSession() { if (session == null) return; server.removeFromSessionTable(session.connNum); try { session.close(); } catch (SQLException se) { sendUnexpectedException(se); close(); | private void closeSession() { if (session == null) return; server.removeFromSessionTable(session.connNum); try { session.close(); } catch (SQLException se) { sendUnexpectedException(se); close(); } finally { session = null; database = null; appRequester=null; sockis = null; sockos=null; databaseAccessException=null;... | private void closeSession() { if (session == null) return; server.removeFromSessionTable(session.connNum); try { session.close(); } catch (SQLException se) { // If something went wrong closing down the session. // Print an error to the console and close this //thread. (6013) sendUnexpectedE... |
finally { session = null; database = null; appRequester=null; sockis = null; sockos=null; databaseAccessException=null; } } | private void closeSession() { if (session == null) return; server.removeFromSessionTable(session.connNum); try { session.close(); } catch (SQLException se) { // If something went wrong closing down the session. // Print an error to the console and close this //thread. (6013) sendUnexpectedE... | |
private boolean closed() { synchronized (closeSync) { return close; | private boolean closed() { synchronized (closeSync) { return close; } | private boolean closed() { synchronized (closeSync) { return close; } } |
} | private boolean closed() { synchronized (closeSync) { return close; } } | |
private String convertToHexString(byte [] buf) { StringBuffer str = new StringBuffer(); str.append("0x"); String val; int byteVal; for (int i = 0; i < buf.length; i++) { byteVal = buf[i] & 0xff; val = Integer.toHexString(byteVal); if (val.length() < 2) str.append("0"); str.append(val); | private String convertToHexString(byte [] buf) { StringBuffer str = new StringBuffer(); str.append("0x"); String val; int byteVal; for (int i = 0; i < buf.length; i++) { byteVal = buf[i] & 0xff; val = Integer.toHexString(byteVal); if (val.length() < 2) str.append("0"); str.append(val); } return str.toString(); | private String convertToHexString(byte [] buf) { StringBuffer str = new StringBuffer(); str.append("0x"); String val; int byteVal; for (int i = 0; i < buf.length; i++) { byteVal = buf[i] & 0xff; val = Integer.toHexString(byteVal); if (val.length() < 2) str.append("0"); str.append(val); } return str... |
return str.toString(); } | private String convertToHexString(byte [] buf) { StringBuffer str = new StringBuffer(); str.append("0x"); String val; int byteVal; for (int i = 0; i < buf.length; i++) { byteVal = buf[i] & 0xff; val = Integer.toHexString(byteVal); if (val.length() < 2) str.append("0"); str.append(val); } return str... | |
if (isAfterLast) { rs.afterLast(); | if (isAfterLast) { rs.afterLast(); } if (isBeforeFirst) { rs.beforeFirst(); } } else { final boolean qryclsOnLmtblkprc = appRequester.supportsQryclsimpForLmtblkprc(); if (stmt.isRSCloseImplicit(qryclsOnLmtblkprc)) { stmt.rsClose(); stmt.rsSuspend(); } } | private void doneData(DRDAStatement stmt, ResultSet rs) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("*****NO MORE DATA!!"); int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; if (rs != null) { if (stmt.isScrollable()) { //keep isAfterLast and... |
if (isBeforeFirst) { rs.beforeFirst(); } } else { final boolean qryclsOnLmtblkprc = appRequester.supportsQryclsimpForLmtblkprc(); if (stmt.isRSCloseImplicit(qryclsOnLmtblkprc)) { stmt.rsClose(); stmt.rsSuspend(); | boolean isQRYSCRAFT = (stmt.getQryscrorn() == CodePoint.QRYSCRAFT); writeSQLCAGRP((isQRYSCRAFT ? eod00000 : eod02000), (isQRYSCRAFT ? 0 : 100), 0, stmt.rowCount); writer.writeByte(CodePoint.NULLDATA); if (writer.getDSSLength() >= blksize) { splitQRYDTA(stmt, blksize); | private void doneData(DRDAStatement stmt, ResultSet rs) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("*****NO MORE DATA!!"); int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; if (rs != null) { if (stmt.isScrollable()) { //keep isAfterLast and... |
} | private void doneData(DRDAStatement stmt, ResultSet rs) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("*****NO MORE DATA!!"); int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; if (rs != null) { if (stmt.isScrollable()) { //keep isAfterLast and... | |
boolean isQRYSCRAFT = (stmt.getQryscrorn() == CodePoint.QRYSCRAFT); writeSQLCAGRP((isQRYSCRAFT ? eod00000 : eod02000), (isQRYSCRAFT ? 0 : 100), 0, stmt.rowCount); writer.writeByte(CodePoint.NULLDATA); if (writer.getDSSLength() >= blksize) { splitQRYDTA(stmt, blksize); } } | private void doneData(DRDAStatement stmt, ResultSet rs) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("*****NO MORE DATA!!"); int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; if (rs != null) { if (stmt.isScrollable()) { //keep isAfterLast and... | |
private void errorInChain(SQLException e) throws DRDAProtocolException { if (reader.terminateChainOnErr() && (getExceptionSeverity(e) > CodePoint.SVRCOD_ERROR)) { if (SanityManager.DEBUG) trace("terminating the chain on error..."); skipRemainder(false); | private void errorInChain(SQLException e) throws DRDAProtocolException { if (reader.terminateChainOnErr() && (getExceptionSeverity(e) > CodePoint.SVRCOD_ERROR)) { if (SanityManager.DEBUG) trace("terminating the chain on error..."); skipRemainder(false); } | private void errorInChain(SQLException e) throws DRDAProtocolException { if (reader.terminateChainOnErr() && (getExceptionSeverity(e) > CodePoint.SVRCOD_ERROR)) { if (SanityManager.DEBUG) trace("terminating the chain on error..."); skipRemainder(false); } } |
} | private void errorInChain(SQLException e) throws DRDAProtocolException { if (reader.terminateChainOnErr() && (getExceptionSeverity(e) > CodePoint.SVRCOD_ERROR)) { if (SanityManager.DEBUG) trace("terminating the chain on error..."); skipRemainder(false); } } | |
throws DRDAProtocolException { int codePoint; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + correlationID); } | throws DRDAProtocolException { int codePoint; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + correlationID); } } codePoint = reader.readLengthAndCodePoint(); if (codePoint != CodePoint.EXCSAT) { throw... | private void exchangeServerAttributes() throws DRDAProtocolException { int codePoint; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + correlationID); } } codePoint = reader.readLengthAnd... |
codePoint = reader.readLengthAndCodePoint(); if (codePoint != CodePoint.EXCSAT) { throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_PRCCNVRM, this, codePoint, CodePoint.PRCCNVCD_EXCSAT_FIRST_AFTER_CONN); } parseEXCSAT(); writeEXCSATRD(); finalizeChain(); session.setState(session.ATTEXC); } | private void exchangeServerAttributes() throws DRDAProtocolException { int codePoint; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + correlationID); } } codePoint = reader.readLengthAnd... | |
} catch (Exception e) { println2Log(database.dbName, session.drdaID, "Driver not loaded" + e.getMessage()); try { agentError("Driver not loaded"); } catch (DRDAProtocolException dpe) { try { server.startNetworkServer(); } catch (Exception re) { println2Log(database.dbName, session.drdaID, "Failed attempt to rel... | private int getConnFromDatabaseName() throws DRDAProtocolException { Properties p = new Properties(); databaseAccessException = null; //if we haven't got the correlation token yet, use session number for drdaID if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(Attribut... | |
throw dpe; } } | catch (Exception e) { println2Log(database.dbName, session.drdaID, "Driver not loaded" + e.getMessage()); try { agentError("Driver not loaded"); } catch (DRDAProtocolException dpe) { try { server.startNetworkServer(); } catch (Exception re) { println2Log(database.dbName, session.drdaID, "Failed attempt to reloa... | private int getConnFromDatabaseName() throws DRDAProtocolException { Properties p = new Properties(); databaseAccessException = null; //if we haven't got the correlation token yet, use session number for drdaID if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(Attribut... |
int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; case ExceptionSeverity.WARNING_SEVERITY: severity = CodePoint.SVRCOD_WARNING; break; case ExceptionSeverity.SESSION_SEVERITY: case ExceptionSeverity.... | int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; case ExceptionSeverity.WARNING_SEVERITY: severity = CodePoint.SVRCOD_WARNING; break; case ExceptionSeverity.SESSION_SEVERITY: case ExceptionSeverity.... | private int getExceptionSeverity (SQLException e) { int severity= CodePoint.SVRCOD_INFO; if (e == null) return severity; int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; case Excepti... |
return severity; } | private int getExceptionSeverity (SQLException e) { int severity= CodePoint.SVRCOD_INFO; if (e == null) return severity; int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; case Excepti... | |
private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; | private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; } | private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; } } |
} | private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; } } | |
private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; | private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; } | private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; } } |
} | private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; } } | |
server.consoleExceptionPrintTrace(e); closeSession(); close(); | server.consoleExceptionPrintTrace(e); closeSession(); close(); } | private void handleException(Exception e) { String dbname = null; if (database != null) dbname = database.dbName; // protocol error - write error message and close session if (e instanceof DRDAProtocolException) { try { DRDAProtocolException de = (DRDAProtocolException) e; println2Log(dbname,session.drd... |
} | private void handleException(Exception e) { String dbname = null; if (database != null) dbname = database.dbName; // protocol error - write error message and close session if (e instanceof DRDAProtocolException) { try { DRDAProtocolException de = (DRDAProtocolException) e; println2Log(dbname,session.drd... | |
break; case CodePoint.RDBNAM: String dbname = parseRDBNAM(); if (database != null) { if (!database.dbName.equals(dbname)) rdbnamMismatch(CodePoint.ACCRDB); } else { Database d = session.getDatabase(dbname); if (d == null) addDatabase(dbname); else { database = d; database.accessCount++; } | break; case CodePoint.RDBNAM: String dbname = parseRDBNAM(); if (database != null) { if (!database.dbName.equals(dbname)) rdbnamMismatch(CodePoint.ACCRDB); } else { Database d = session.getDatabase(dbname); if (d == null) addDatabase(dbname); else { database = d; database.accessCount++; } } removeFromRequired(CodePoi... | private int parseACCRDB() throws DRDAProtocolException { int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //required case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2); int ... |
removeFromRequired(CodePoint.RDBNAM); break; case CodePoint.PRDID: appRequester.setClientVersion(reader.readString()); if (SanityManager.DEBUG) trace("prdId " + appRequester.prdid); if (appRequester.prdid.length() > CodePoint.PRDID_MAX) tooBig(CodePoint.PRDID); if (((appRequester.getClientType() == appRequester.JCC_... | checkRequired(CodePoint.ACCRDB); if ((database.ccsidDBC != 0 && !server.supportsCCSID(database.ccsidDBC)) || (database.ccsidMBC != 0 && !server.supportsCCSID(database.ccsidMBC))) svrcod = CodePoint.SVRCOD_WARNING; return svrcod; | private int parseACCRDB() throws DRDAProtocolException { int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //required case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2); int ... |
checkRequired(CodePoint.ACCRDB); if ((database.ccsidDBC != 0 && !server.supportsCCSID(database.ccsidDBC)) || (database.ccsidMBC != 0 && !server.supportsCCSID(database.ccsidMBC))) svrcod = CodePoint.SVRCOD_WARNING; return svrcod; } | private int parseACCRDB() throws DRDAProtocolException { int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //required case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2); int ... | |
if ( (server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM) && securityMechanism != server.getSecurityMechanism()) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; else { if (securityMechanism != CodePoint.SECMEC_USRIDPWD && securityMechanism != CodePoint.SECMEC_USRIDONL) ... | if ( (server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM) && securityMechanism != server.getSecurityMechanism()) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; else { if (securityMechanism != CodePoint.SECMEC_USRIDPWD && securityMechanism != CodePoint.SECMEC_USRIDONL) ... | private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is defined t... |
} | codePoint = reader.getCodePoint(); | private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is defined t... |
break; case CodePoint.RDBNAM: String dbname = parseRDBNAM(); Database d = session.getDatabase(dbname); if (d == null) addDatabase(dbname); else { d.reset(); database = d; } break; case CodePoint.SECTKN: publicKeyIn = reader.readBytes(); break; default: invalidCodePoint(codePoint); } codePoint = reader.getCodePoint(... | if (securityMechanism == 0) missingCodePoint(CodePoint.SECMEC); | private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is defined t... |
int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.CLSQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYINSID: qryinsid = reader.readNetworkLong(); gotQryinsid = true; break; case CodePoint.MON... | int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.CLSQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYINSID: qryinsid = reader.readNetworkLong(); gotQryinsid = true; break; case CodePoint.MON... | private DRDAStatement parseCLSQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; reader.markCollection(); long qryinsid = 0; boolean gotQryinsid = false; int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: set... |
if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); if (sqlamLevel >= MGRLVL_7 && !gotQryinsid) missingCodePoint(CodePoint.QRYINSID); DRDAStatement stmt = database.getDRDAStatement(pkgnamcsn); if (stmt == null) { invalidValue(CodePoint.PKGNAMCSN); } if (stmt.wasExplicitlyClosed()) { pkgnamcsn = nul... | private DRDAStatement parseCLSQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; reader.markCollection(); long qryinsid = 0; boolean gotQryinsid = false; int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: set... | |
private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = false; in... | private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = false; in... | private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = false... |
break; case CodePoint.QRYROWNBR: checkLength(CodePoint.QRYROWNBR, 8); qryrownbr = reader.readNetworkLong(); if (SanityManager.DEBUG) trace("qryrownbr = "+qryrownbr); break; case CodePoint.QRYROWSNS: checkLength(CodePoint.QRYROWSNS, 1); qryrowsns = readBoolean(CodePoint.QRYROWSNS); if (SanityManager.DEBUG) trace("qryr... | if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); if (!gotQryblksz) missingCodePoint(CodePoint.QRYBLKSZ); if (sqlamLevel >= MGRLVL_7 && !gotQryinsid) missingCodePoint(CodePoint.QRYINSID); DRDAStatement stmt = database.getDRDAStatement(pkgnamcsn); if (stmt == null) { invalidValue(CodePoint.CNTQRY); } if ... | private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = false... |
if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); if (!gotQryblksz) missingCodePoint(CodePoint.QRYBLKSZ); if (sqlamLevel >= MGRLVL_7 && !gotQryinsid) missingCodePoint(CodePoint.QRYINSID); DRDAStatement stmt = database.getDRDAStatement(pkgnamcsn); if (stmt == null) { invalidValue(CodePoint.CNTQRY); } if ... | private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = false... | |
currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); | currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsidMBCEncoding = currentStatement.ccsidMBCEncoding; if (length == 0) return null; byte [] byteStr = reader.readBytes(length); if (ccsidMBCEncod... | private String parseCcsidMBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsidMB... |
String ccsidMBCEncoding = currentStatement.ccsidMBCEncoding; if (length == 0) return null; byte [] byteStr = reader.readBytes(length); if (ccsidMBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidMBCEncoding); } catch (UnsupportedEncodingException e) { agentError("Unsupported encoding " + ccsidMB... | private String parseCcsidMBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsidMB... | |
currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); | currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsidSBCEncoding = currentStatement.ccsidSBCEncoding; System.out.println("ccsidSBCEncoding - " + ccsidSBCEncoding); if (length == 0) return null;... | private String parseCcsidSBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsid... |
String ccsidSBCEncoding = currentStatement.ccsidSBCEncoding; System.out.println("ccsidSBCEncoding - " + ccsidSBCEncoding); if (length == 0) return null; byte [] byteStr = reader.readBytes(length); if (ccsidSBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidSBCEncoding); } catch (UnsupportedEncod... | private String parseCcsidSBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsid... | |
int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); if (securityCheckCode != 0) { return false; | int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); if (securityCheckCode != 0) { return false; } correlationID = reader.readDssHeader(); codePoint = reader.readLengthAndCodePoint(); verifyRequiredObject(code... | private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check fa... |
correlationID = reader.readDssHeader(); codePoint = reader.readLengthAndCodePoint(); verifyRequiredObject(codePoint,CodePoint.ACCRDB); int svrcod = parseACCRDB(); if(database.getConnection() == null && databaseAccessException == null){ writeRDBfailure(CodePoint.RDBAFLRM); return false; } if (databaseAccessExceptio... | private boolean parseDRDAConnection() throws DRDAProtocolException { int codePoint; boolean sessionOK = true; int securityCheckCode = parseSECCHK(); if (SanityManager.DEBUG) trace("*** SECCHKRM securityCheckCode is: "+securityCheckCode); writeSECCHKRM(securityCheckCode); //at this point if the security check fa... | |
codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.TYPSQLDA: rtnOutput = parseTYPSQLDA(); break; case CodePoint.RDBNAM: setDatabase(CodePoint.DSCSQLSTT); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); DRDAStatement stmt = database.getDRDAStatement(pkgnamc... | codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.TYPSQLDA: rtnOutput = parseTYPSQLDA(); break; case CodePoint.RDBNAM: setDatabase(CodePoint.DSCSQLSTT); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); DRDAStatement stmt = database.getDRDAStatement(pkgnamc... | private boolean parseDSCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; boolean rtnOutput = true; // default Pkgnamcsn pkgnamcsn = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.TYPSQLDA: rtnOu... |
break; case CodePoint.MONITOR: parseMONITOR(); break; default: invalidCodePoint(codePoint); } codePoint = reader.getCodePoint(); | if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); return rtnOutput; | private boolean parseDSCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; boolean rtnOutput = true; // default Pkgnamcsn pkgnamcsn = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.TYPSQLDA: rtnOu... |
if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); return rtnOutput; } | private boolean parseDSCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; boolean rtnOutput = true; // default Pkgnamcsn pkgnamcsn = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.TYPSQLDA: rtnOu... | |
if (appRequester != null) { parseEXCSAT2(); return; | if (appRequester != null) { parseEXCSAT2(); return; } appRequester = new AppRequester(); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: appRequester.extnam = reader.readString(); if (SanityManager.DEBUG) trace("extName = " + appRe... | private void parseEXCSAT() throws DRDAProtocolException { int codePoint; String strVal; // There are three kinds of EXCSAT's we might get. // 1) Initial Exchange attributes. // For this we need to initialize the apprequester. // Session state is set to ATTEXC and then the AR must // follow up with ACCSEC ... |
appRequester = new AppRequester(); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: appRequester.extnam = reader.readString(); if (SanityManager.DEBUG) trace("extName = " + appRequester.extnam); if (appRequester.extnam.length() > CodePo... | private void parseEXCSAT() throws DRDAProtocolException { int codePoint; String strVal; // There are three kinds of EXCSAT's we might get. // 1) Initial Exchange attributes. // For this we need to initialize the apprequester. // Session state is set to ATTEXC and then the AR must // follow up with ACCSEC ... | |
codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: case CodePoint.SRVNAM: case CodePoint.SRVRLSLV: case CodePoint.SRVCLSNM: case CodePoint.SPVNAM: reader.skipBytes(); break; case CodePoint.MGRLVLLS: parseMGRLVLLS(2); break; default: invalidCodePoint(codePoint); } ... | codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: case CodePoint.SRVNAM: case CodePoint.SRVRLSLV: case CodePoint.SRVCLSNM: case CodePoint.SPVNAM: reader.skipBytes(); break; case CodePoint.MGRLVLLS: parseMGRLVLLS(2); break; default: invalidCodePoint(codePoint); } ... | private void parseEXCSAT2() throws DRDAProtocolException { int codePoint; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.EXTNAM: case CodePoint.SRVNAM: case CodePoint.SRVRLSLV: case CodePoint.SRVCLSNM: ca... |
} | private void parseEXCSAT2() throws DRDAProtocolException { int codePoint; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.EXTNAM: case CodePoint.SRVNAM: case CodePoint.SRVRLSLV: case CodePoint.SRVCLSNM: ca... | |
} codePoint = reader.getCodePoint(); | } codePoint = reader.getCodePoint(); } DRDAStatement drdaStmt = database.getDefaultStatement(pkgnamcsn); drdaStmt.initialize(); String sqlStmt = parseEXECSQLIMMobjects(); Statement statement = drdaStmt.getStatement(); statement.clearWarnings(); if (pendingStatementTimeout >= 0) { statement.setQueryTimeout(pendingStat... | private int parseEXCSQLIMM() throws DRDAProtocolException,SQLException { int codePoint; reader.markCollection(); Pkgnamcsn pkgnamcsn = null; codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLIMM); break; // re... |
DRDAStatement drdaStmt = database.getDefaultStatement(pkgnamcsn); drdaStmt.initialize(); String sqlStmt = parseEXECSQLIMMobjects(); Statement statement = drdaStmt.getStatement(); statement.clearWarnings(); if (pendingStatementTimeout >= 0) { statement.setQueryTimeout(pendingStatementTimeout); pendingStatementTimeout ... | private int parseEXCSQLIMM() throws DRDAProtocolException,SQLException { int codePoint; reader.markCollection(); Pkgnamcsn pkgnamcsn = null; codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLIMM); break; // re... | |
} codePoint = reader.getCodePoint(); | } codePoint = reader.getCodePoint(); } parseEXCSQLSETobjects(); return true; | private boolean parseEXCSQLSET() throws DRDAProtocolException,SQLException { int codePoint; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLSET); break; // optional case CodePoin... |
parseEXCSQLSETobjects(); return true; } | private boolean parseEXCSQLSET() throws DRDAProtocolException,SQLException { int codePoint; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { // optional case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLSET); break; // optional case CodePoin... | |
database.setCurrentStatement(stmt); if (reader.isChainedWithSameID()) parseEXCSQLSTTobjects(stmt); else if (isProcedure && (needPrepareCall)) { String prepareString = "call " + stmt.procName +"()"; if (SanityManager.DEBUG) trace ("$$$prepareCall is: "+prepareString); database.getConnection().clearWarnings(); Call... | database.setCurrentStatement(stmt); if (reader.isChainedWithSameID()) parseEXCSQLSTTobjects(stmt); else if (isProcedure && (needPrepareCall)) { String prepareString = "call " + stmt.procName +"()"; if (SanityManager.DEBUG) trace ("$$$prepareCall is: "+prepareString); database.getConnection().clearWarnings(); Call... | private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; Pkgnamcsn pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default value int... |
stmt.ps.clearWarnings(); boolean hasResultSet = stmt.execute(); ResultSet rs = null; if (hasResultSet) { rs = stmt.getResultSet(); } hasResultSet = (rs != null); int numResults = 0; if (hasResultSet) { numResults = stmt.getNumResultSets(); writeRSLSETRM(stmt); } boolean sendSQLDTARD = stmt.hasOutputParams() && ou... | private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; Pkgnamcsn pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default value int... | |
while (reader.moreDdmData()) { manager = reader.readNetworkShort(); managerLevel = reader.readNetworkShort(); if (CodePoint.isKnownManager(manager)) { knownManagers.addElement(new Integer(manager)); currentLevel = appRequester.getManagerLevel(manager); if (currentLevel == appRequester.MGR_LEVEL_UNKNOWN) appRequester.s... | while (reader.moreDdmData()) { manager = reader.readNetworkShort(); managerLevel = reader.readNetworkShort(); if (CodePoint.isKnownManager(manager)) { knownManagers.addElement(new Integer(manager)); currentLevel = appRequester.getManagerLevel(manager); if (currentLevel == appRequester.MGR_LEVEL_UNKNOWN) appRequester.s... | private void parseMGRLVLLS(int time) throws DRDAProtocolException { int manager, managerLevel; int currentLevel; // set up vectors to keep track of manager information unknownManagers = new Vector(); knownManagers = new Vector(); errorManagers = new Vector(); errorManagersLevel = new Vector(); if (SanityManager.DEB... |
} else unknownManagers.addElement(new Integer(manager)); if (SanityManager.DEBUG) trace("Manager = " + java.lang.Integer.toHexString(manager) + " ManagerLevel " + managerLevel); | sqlamLevel = appRequester.getManagerLevel(CodePoint.SQLAM); if (errorManagers.size() > 0) { Object [] oa = new Object[errorManagers.size()*2]; int j = 0; for (int i = 0; i < errorManagers.size(); i++) { oa[j++] = errorManagers.elementAt(i); oa[j++] = errorManagersLevel.elementAt(i); } throw new DRDAProtocolException(D... | private void parseMGRLVLLS(int time) throws DRDAProtocolException { int manager, managerLevel; int currentLevel; // set up vectors to keep track of manager information unknownManagers = new Vector(); knownManagers = new Vector(); errorManagers = new Vector(); errorManagersLevel = new Vector(); if (SanityManager.DEB... |
sqlamLevel = appRequester.getManagerLevel(CodePoint.SQLAM); if (errorManagers.size() > 0) { Object [] oa = new Object[errorManagers.size()*2]; int j = 0; for (int i = 0; i < errorManagers.size(); i++) { oa[j++] = errorManagers.elementAt(i); oa[j++] = errorManagersLevel.elementAt(i); } throw new DRDAProtocolException(D... | private void parseMGRLVLLS(int time) throws DRDAProtocolException { int manager, managerLevel; int currentLevel; // set up vectors to keep track of manager information unknownManagers = new Vector(); knownManagers = new Vector(); errorManagers = new Vector(); errorManagersLevel = new Vector(); if (SanityManager.DEB... | |
private String parseNOCMorNOCS() throws DRDAProtocolException { byte nocm_nullByte = reader.readByte(); String strVal = null; int length; if (nocm_nullByte != NULL_VALUE) { length = reader.readNetworkInt(); strVal = parseCcsidMBC(length); | private String parseNOCMorNOCS() throws DRDAProtocolException { byte nocm_nullByte = reader.readByte(); String strVal = null; int length; if (nocm_nullByte != NULL_VALUE) { length = reader.readNetworkInt(); strVal = parseCcsidMBC(length); } byte nocs_nullByte = reader.readByte(); if (nocs_nullByte != NULL_VALUE) { if (... | private String parseNOCMorNOCS() throws DRDAProtocolException { byte nocm_nullByte = reader.readByte(); String strVal = null; int length; if (nocm_nullByte != NULL_VALUE) { length = reader.readNetworkInt(); strVal = parseCcsidMBC(length); } byte nocs_nullByte = reader.readByte(); if (nocs_nullByte != NULL_V... |
byte nocs_nullByte = reader.readByte(); if (nocs_nullByte != NULL_VALUE) { if (strVal != null) agentError("Both CM and CS are non null"); length = reader.readNetworkInt(); strVal = parseCcsidSBC(length); } return strVal; } | private String parseNOCMorNOCS() throws DRDAProtocolException { byte nocm_nullByte = reader.readByte(); String strVal = null; int length; if (nocm_nullByte != NULL_VALUE) { length = reader.readNetworkInt(); strVal = parseCcsidMBC(length); } byte nocs_nullByte = reader.readByte(); if (nocs_nullByte != NULL_V... | |
private Pkgnamcsn parseOPNQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; int blksize = 0; int qryblkctl = CodePoint.QRYBLKCTL_DEFAULT; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int qryclsimp = DRDAResultSet.QRYC... | private Pkgnamcsn parseOPNQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; int blksize = 0; int qryblkctl = CodePoint.QRYBLKCTL_DEFAULT; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int qryclsimp = DRDAResultSet.QRYC... | private Pkgnamcsn parseOPNQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; int blksize = 0; int qryblkctl = CodePoint.QRYBLKCTL_DEFAULT; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int qryclsimp = DRDAResultSet.... |
if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); if (!gotQryblksz) missingCodePoint(CodePoint.QRYBLKSZ); DRDAStatement stmt = database.getDRDAStatement(pkgnamcsn); if (stmt == null) { invalidValue(CodePoint.PKGNAMCSN); } stmt.setOPNQRYOptions(blksize,qryblkctl,maxblkext,outovropt, qryrowset, q... | private Pkgnamcsn parseOPNQRY() throws DRDAProtocolException, SQLException { Pkgnamcsn pkgnamcsn = null; boolean gotQryblksz = false; int blksize = 0; int qryblkctl = CodePoint.QRYBLKCTL_DEFAULT; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int qryclsimp = DRDAResultSet.... | |
private void parseOUTOVR(DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean first = true; int numVars; int dtaGrpLen; int tripType; int tripId; int precision; int start = 0; while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.readUnsignedByte... | private void parseOUTOVR(DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean first = true; int numVars; int dtaGrpLen; int tripType; int tripId; int precision; int start = 0; while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.readUnsignedByte... | private void parseOUTOVR(DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean first = true; int numVars; int dtaGrpLen; int tripType; int tripId; int precision; int start = 0; while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.... |
} | private void parseOUTOVR(DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean first = true; int numVars; int dtaGrpLen; int tripType; int tripId; int precision; int start = 0; while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.... | |
pkgsn = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("pkgsn = " + pkgsn); | pkgsn = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("pkgsn = " + pkgsn); } if ((prevPkgnamcsn == null) || rdbnam.wasModified() || rdbcolid.wasModified() || pkgid.wasModified() || pkgcnstkn.wasModified() || (prevPkgnamcsn.getPkgsn() != pkgsn)) { byte[] token = new byte[pkgcnstkn.length()]; System.a... | private Pkgnamcsn parsePKGNAMCSN() throws DRDAProtocolException { if (reader.getDdmLength() == CodePoint.PKGNAMCSN_LEN) { // This is a scalar object with the following fields reader.readString(rdbnam, CodePoint.RDBNAM_LEN, true); if (SanityManager.DEBUG) trace("rdbnam = " + rdbnam); reader.readStr... |
if ((prevPkgnamcsn == null) || rdbnam.wasModified() || rdbcolid.wasModified() || pkgid.wasModified() || pkgcnstkn.wasModified() || (prevPkgnamcsn.getPkgsn() != pkgsn)) { byte[] token = new byte[pkgcnstkn.length()]; System.arraycopy(pkgcnstkn.getBytes(), 0, token, 0, token.length); prevPkgnamcsn = new Pkgnamcsn(rdbn... | private Pkgnamcsn parsePKGNAMCSN() throws DRDAProtocolException { if (reader.getDdmLength() == CodePoint.PKGNAMCSN_LEN) { // This is a scalar object with the following fields reader.readString(rdbnam, CodePoint.RDBNAM_LEN, true); if (SanityManager.DEBUG) trace("rdbnam = " + rdbnam); reader.readStr... | |
} codePoint = reader.getCodePoint(); | } codePoint = reader.getCodePoint(); } stmt = database.newDRDAStatement(pkgnamcsn); String sqlStmt = parsePRPSQLSTTobjects(stmt); if (databaseToSet != null) stmt.setDatabase(database); stmt.explicitPrepare(sqlStmt); database.setCurrentStatement(stmt); if (!rtnsqlda) return 0; else if (rtnOutput) return 2; else retur... | private int parsePRPSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; boolean rtnsqlda = false; boolean rtnOutput = true; // Return output SQLDA is default String typdefnam; Pkgnamcsn pkgnamcsn = null; DRDAStatement stmt = null; Database databaseToSet = null; reader.markCollection(); codePoint ... |
stmt = database.newDRDAStatement(pkgnamcsn); String sqlStmt = parsePRPSQLSTTobjects(stmt); if (databaseToSet != null) stmt.setDatabase(database); stmt.explicitPrepare(sqlStmt); database.setCurrentStatement(stmt); if (!rtnsqlda) return 0; else if (rtnOutput) return 2; else return 1; } | private int parsePRPSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; boolean rtnsqlda = false; boolean rtnOutput = true; // Return output SQLDA is default String typdefnam; Pkgnamcsn pkgnamcsn = null; DRDAStatement stmt = null; Database databaseToSet = null; reader.markCollection(); codePoint ... | |
private String parseRDBNAM() throws DRDAProtocolException { String name; byte [] rdbName = reader.readBytes(); if (rdbName.length == 0) { rdbNotFound(null); | private String parseRDBNAM() throws DRDAProtocolException { String name; byte [] rdbName = reader.readBytes(); if (rdbName.length == 0) { rdbNotFound(null); } if (rdbName.length < CodePoint.RDBNAM_LEN || rdbName.length > CodePoint.MAX_NAME) badObjectLength(CodePoint.RDBNAM); name = reader.convertBytes(rdbName); name... | private String parseRDBNAM() throws DRDAProtocolException { String name; byte [] rdbName = reader.readBytes(); if (rdbName.length == 0) { // throw RDBNFNRM rdbNotFound(null); } //SQLAM level 7 allows db name up to 255, level 6 fixed len 18 if (rdbName.length < CodePoint.RDBNAM_LEN || rdbName.length > CodePo... |
if (rdbName.length < CodePoint.RDBNAM_LEN || rdbName.length > CodePoint.MAX_NAME) badObjectLength(CodePoint.RDBNAM); name = reader.convertBytes(rdbName); name = name.trim(); if (SanityManager.DEBUG) trace("RdbName " + name); return name; } | private String parseRDBNAM() throws DRDAProtocolException { String name; byte [] rdbName = reader.readBytes(); if (rdbName.length == 0) { // throw RDBNFNRM rdbNotFound(null); } //SQLAM level 7 allows db name up to 255, level 6 fixed len 18 if (rdbName.length < CodePoint.RDBNAM_LEN || rdbName.length > CodePo... | |
private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.SECMGRNM: reader.skipBytes(); break; case ... | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.SECMGRNM: reader.skipBytes(); break; case ... | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... |
else if (database.decryptedUserId == null) { try { database.decryptedUserId = reader.readEncryptedString(decryptionManager, database.securityMechanism, myPublicKey, database.publicKeyIn); } catch (SQLException se) { println2Log(database.dbName, session.drdaID, se.getMessage()); if (securityCheckCode == 0) securityCheck... | if (securityMechanism == 0) missingCodePoint(CodePoint.SECMEC); if (securityCheckCode == 0 && (database.securityMechanism == CodePoint.SECMEC_USRIDPWD|| database.securityMechanism == CodePoint.SECMEC_USRIDONL )) { if (database.userId == null) securityCheckCode = CodePoint.SECCHKCD_USERIDMISSING; else if ( database.se... | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... |
else if (database.decryptedPassword == null) { try { database.decryptedPassword = reader.readEncryptedString(decryptionManager, database.securityMechanism, myPublicKey, database.publicKeyIn); } catch (SQLException se) { println2Log(database.dbName, session.drdaID, se.getMessage()); if (securityCheckCode == 0) securityC... | if (securityCheckCode == 0 && database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD) { if (database.decryptedUserId == null) securityCheckCode = CodePoint.SECCHKCD_USERIDMISSING; else if (database.decryptedPassword == null) securityCheckCode = CodePoint.SECCHKCD_PASSWORDMISSING; | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... |
break; case CodePoint.PASSWORD: database.password = reader.readString(); if (SanityManager.DEBUG) trace("PASSWORD " + database.password); break; case CodePoint.NEWPASSWORD: reader.skipBytes(); break; case CodePoint.USRID: database.userId = reader.readString(); if (SanityManager.DEBUG) trace("USERID " + database.use... | if ((securityCheckCode == 0) && (databaseAccessException == null)) { securityCheckCode = verifyUserIdPassword(); | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... |
break; default: invalidCodePoint(codePoint); | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... | |
} codePoint = reader.getCodePoint(); } if (securityMechanism == 0) missingCodePoint(CodePoint.SECMEC); if (securityCheckCode == 0 && (database.securityMechanism == CodePoint.SECMEC_USRIDPWD|| database.securityMechanism == CodePoint.SECMEC_USRIDONL )) { if (database.userId == null) securityCheckCode = CodePoint.SECCH... | if (securityCheckCode == 0) session.setState(session.CHKSEC); return securityCheckCode; | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... |
if ((securityCheckCode == 0) && (databaseAccessException == null)) { securityCheckCode = verifyUserIdPassword(); } if (securityCheckCode == 0) session.setState(session.CHKSEC); return securityCheckCode; } | private int parseSECCHK() throws DRDAProtocolException { int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //optional, ignorable case CodePoint.SECMGRNM:... | |
boolean validAttribute = false; if (attrs.indexOf("INSENSITIVE SCROLL") != -1 || attrs.indexOf("SCROLL INSENSITIVE") != -1) { stmt.scrollType = ResultSet.TYPE_SCROLL_INSENSITIVE; stmt.concurType = ResultSet.CONCUR_READ_ONLY; validAttribute = true; | boolean validAttribute = false; if (attrs.indexOf("INSENSITIVE SCROLL") != -1 || attrs.indexOf("SCROLL INSENSITIVE") != -1) { stmt.scrollType = ResultSet.TYPE_SCROLL_INSENSITIVE; stmt.concurType = ResultSet.CONCUR_READ_ONLY; validAttribute = true; } if ((attrs.indexOf("SENSITIVE DYNAMIC SCROLL") != -1) || (attrs.indexO... | protected void parseSQLATTR(DRDAStatement stmt) throws DRDAProtocolException { String attrs = parseEncodedString(); if (SanityManager.DEBUG) trace("sqlattr = '" + attrs+"'"); //let Cloudscape handle any errors in the types it doesn't support //just set the attributes boolean validAttribute = false; if (attrs.in... |
if ((attrs.indexOf("SENSITIVE DYNAMIC SCROLL") != -1) || (attrs.indexOf("SENSITIVE STATIC SCROLL") != -1)) { stmt.scrollType = ResultSet.TYPE_SCROLL_SENSITIVE; validAttribute = true; } if ((attrs.indexOf("FOR UPDATE") != -1)) { validAttribute = true; stmt.concurType = ResultSet.CONCUR_UPDATABLE; } if (attrs.indexOf("... | protected void parseSQLATTR(DRDAStatement stmt) throws DRDAProtocolException { String attrs = parseEncodedString(); if (SanityManager.DEBUG) trace("sqlattr = '" + attrs+"'"); //let Cloudscape handle any errors in the types it doesn't support //just set the attributes boolean validAttribute = false; if (attrs.in... | |
private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { skipRemainder(true); throw se; | private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { skipRemainder(true); throw se; } | private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { skipRemainder(true); throw se; } } |
} | private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { skipRemainder(true); throw se; } } | |
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... | 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 paramExtPositions =... |
rtnParam = true; } ps = cs; stmt.ps = ps; | codePoint = reader.getCodePoint(); | 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 paramExtPositions =... |
pmeta = stmt.getParameterMetaData(); | 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 paramExtPositions =... | |
reader.readBytes(6); break; case CodePoint.FDODTA: reader.readByte(); for (int i = 0; i < numVars; i++) { if ((((Byte)paramDrdaTypes.elementAt(i)).byteValue() & 0x1) == 0x1){ int nullData = reader.readUnsignedByte(); if ((nullData & 0xFF) == FdocaConstants.NULL_DATA) { if (SanityManager.DEBUG) trace("******param null... | 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 paramExtPositions =... | |
} | 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 paramExtPositions =... | |
while (codePoint != -1) { switch (codePoint) { case CodePoint.CCSIDSBC: checkLength(CodePoint.CCSIDSBC, 2); ccsidSBC = reader.readNetworkShort(); try { ccsidSBCEncoding = CharacterEncodings.getJavaEncoding(ccsidSBC); } catch (Exception e) { valueNotSupported(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) { valueNotSupported(CodePoint.CCSIDSBC); } if (SanityManager.DEBUG) trace("ccsids... | 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 least o... |
if (SanityManager.DEBUG) trace("ccsidsbc = " + ccsidSBC + " encoding = " + ccsidSBCEncoding); break; case CodePoint.CCSIDDBC: checkLength(CodePoint.CCSIDDBC, 2); ccsidDBC = reader.readNetworkShort(); try { ccsidDBCEncoding = CharacterEncodings.getJavaEncoding(ccsidDBC); } catch (Exception e) { ccsidDBCEncoding = null... | 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; } | 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 least o... |
if (SanityManager.DEBUG) trace("ccsiddbc = " + ccsidDBC + " encoding = " + ccsidDBCEncoding); break; case CodePoint.CCSIDMBC: checkLength(CodePoint.CCSIDMBC, 2); ccsidMBC = reader.readNetworkShort(); try { ccsidMBCEncoding = CharacterEncodings.getJavaEncoding(ccsidMBC); } catch (Exception e) { ccsidMBCEncoding = null;... | else { if (ccsidSBC != 0) { st.ccsidSBC = ccsidSBC; st.ccsidSBCEncoding = ccsidSBCEncoding; } if (ccsidDBC != 0) { st.ccsidDBC = ccsidDBC; st.ccsidDBCEncoding = ccsidDBCEncoding; } if (ccsidMBC != 0) { st.ccsidMBC = ccsidMBC; st.ccsidMBCEncoding = ccsidMBCEncoding; } | 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 least o... |
if (SanityManager.DEBUG) trace("ccsidmbc = " + ccsidMBC + " encoding = " + ccsidMBCEncoding); break; default: invalidCodePoint(codePoint); } codePoint = reader.getCodePoint(); | 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 least o... | |
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; } } else ... | 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 least o... | |
private String parseVCMorVCS() throws DRDAProtocolException { String strVal = null; int vcm_length = reader.readNetworkShort(); if (vcm_length > 0) strVal = parseCcsidMBC(vcm_length); int vcs_length = reader.readNetworkShort(); if (vcs_length > 0) { if (strVal != null) agentError ("Both VCM and VCS have lengths > 0"); ... | private String parseVCMorVCS() throws DRDAProtocolException { String strVal = null; int vcm_length = reader.readNetworkShort(); if (vcm_length > 0) strVal = parseCcsidMBC(vcm_length); int vcs_length = reader.readNetworkShort(); if (vcs_length > 0) { if (strVal != null) agentError ("Both VCM and VCS have lengths > 0"); ... | private String parseVCMorVCS() throws DRDAProtocolException { String strVal = null; int vcm_length = reader.readNetworkShort(); if (vcm_length > 0) strVal = parseCcsidMBC(vcm_length); int vcs_length = reader.readNetworkShort(); if (vcs_length > 0) { if (strVal != null) agentError ("Both VCM and VCS have le... |
return strVal; } | private String parseVCMorVCS() throws DRDAProtocolException { String strVal = null; int vcm_length = reader.readNetworkShort(); if (vcm_length > 0) strVal = parseCcsidMBC(vcm_length); int vcs_length = reader.readNetworkShort(); if (vcs_length > 0) { if (strVal != null) agentError ("Both VCM and VCS have le... | |
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); } break; case CodePoint.QRYSCR... | 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() && rows > 0) || (rs.isBeforeFirst() && rows < 0)) { retv... |
return retval; } | 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() && rows > 0) || (rs.isBeforeFirst() && rows < 0)) { retv... | |
if (dbname != null) { int endOfName = dbname.indexOf(';'); if (endOfName != -1) dbname = dbname.substring(0, endOfName); | if (dbname != null) { int endOfName = dbname.indexOf(';'); if (endOfName != -1) dbname = dbname.substring(0, endOfName); } logStream.printlnWithHeader("(DATABASE = " + dbname + "), (DRDAID = " + drdaID + "), " + msg); | protected static void println2Log(String dbname, String drdaID, String msg) { if (logStream == null) logStream = Monitor.getStream(); if (dbname != null) { int endOfName = dbname.indexOf(';'); if (endOfName != -1) dbname = dbname.substring(0, endOfName); } logStream.printlnWithHeader("(DATABASE = " + d... |
logStream.printlnWithHeader("(DATABASE = " + dbname + "), (DRDAID = " + drdaID + "), " + msg); } | protected static void println2Log(String dbname, String drdaID, String msg) { if (logStream == null) logStream = Monitor.getStream(); if (dbname != null) { int endOfName = dbname.indexOf(';'); if (endOfName != -1) dbname = dbname.substring(0, endOfName); } logStream.printlnWithHeader("(DATABASE = " + d... | |
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(); | 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... | 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(); ... |
checkWarning(null, null, stmt.getResultSet(), 0, false, sendWarningsOnCNTQRY); } | finalizeChain(); | 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(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.