rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
removeFromRequired(CodePoint.PRDID); break; case CodePoint.TYPDEFNAM: setStmtOrDbByteOrder(true, null, parseTYPDEFNAM()); removeFromRequired(CodePoint.TYPDEFNAM); break; case CodePoint.TYPDEFOVR: parseTYPDEFOVR(null); removeFromRequired(CodePoint.TYPDEFOVR); break; case CodePoint.RDBALWUPD: checkLength(CodePoint.RDB... | removeFromRequired(CodePoint.PRDID); break; case CodePoint.TYPDEFNAM: setStmtOrDbByteOrder(true, null, parseTYPDEFNAM()); removeFromRequired(CodePoint.TYPDEFNAM); break; case CodePoint.TYPDEFOVR: parseTYPDEFOVR(null); removeFromRequired(CodePoint.TYPDEFOVR); break; case CodePoint.RDBALWUPD: checkLength(CodePoint.RDB... | 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.RDBACCC... |
codePoint = reader.getCodePoint(); } | 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.RDBACCC... | |
if ( (server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM) && securityMechanism != server.getSecurityMechanism()) | 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 ... |
else { if (securityMechanism != CodePoint.SECMEC_USRIDPWD && securityMechanism != CodePoint.SECMEC_USRIDONL) { if (securityMechanism != CodePoint.SECMEC_EUSRIDPWD) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; else { try { if (decryptionManager == null) decryptionManager = new DecryptionManager(); myPublicKey... | else { try { if (decryptionManager == null) decryptionManager = new DecryptionManager(); myPublicKey = decryptionManager.obtainPublicKey(); } catch (SQLException e) { println2Log(null, session.drdaID, e.getMessage()); securityCheckCode = CodePoint.SECCHKCD_0A; | 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 ... |
break; case CodePoint.RDBNAM: String dbname = parseRDBNAM(); Database d = session.getDatabase(dbname); if (d == null) addDatabase(dbname); else { | } } } break; case CodePoint.RDBNAM: String dbname = parseRDBNAM(); Database d = session.getDatabase(dbname); if (d == null) addDatabase(dbname); else { | 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 ... |
d.reset(); database = d; } break; case CodePoint.SECTKN: publicKeyIn = reader.readBytes(); break; default: invalidCodePoint(codePoint); } codePoint = reader.getCodePoint(); | d.reset(); database = d; } break; case CodePoint.SECTKN: publicKeyIn = reader.readBytes(); break; default: invalidCodePoint(codePoint); | 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 ... |
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 ... | |
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.MONITOR: parseMONITOR(); break; default: i... | 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.MONITOR: parseMONITOR(); break; default: i... | 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.R... |
while (codePoint != -1) { switch(codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.CNTQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYBLKSZ: blksize = parseQRYBLKSZ(); gotQryblksz = true; break; case CodePoint.QRYRELSCR: qryrelscr = readBoolean(CodePoint.QRYRELS... | while (codePoint != -1) { switch(codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.CNTQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYBLKSZ: blksize = parseQRYBLKSZ(); gotQryblksz = true; break; case CodePoint.QRYRELSCR: qryrelscr = readBoolean(CodePoint.QRYRELS... | 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 = fa... |
if (ccsidMBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidMBCEncoding); } catch (UnsupportedEncodingException e) { agentError("Unsupported encoding " + ccsidMBCEncoding + "in parseCcsidMBC"); } | if (ccsidMBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidMBCEncoding); } catch (UnsupportedEncodingException e) { agentError("Unsupported encoding " + ccsidMBCEncoding + "in parseCcsidMBC"); | private String parseCcsidMBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String cc... |
} | private String parseCcsidMBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String cc... | |
if (ccsidSBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidSBCEncoding); } catch (UnsupportedEncodingException e) { agentError("Unsupported encoding " + ccsidSBCEncoding + "in parseCcsidSBC"); } | if (ccsidSBCEncoding != null) { try { strVal = new String(byteStr, 0, length, ccsidSBCEncoding); } catch (UnsupportedEncodingException e) { agentError("Unsupported encoding " + ccsidSBCEncoding + "in parseCcsidSBC"); | private String parseCcsidSBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ... |
} | private String parseCcsidSBC(int length) throws DRDAProtocolException { String strVal = null; DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ... | |
int failureType = getRdbAccessErrorCodePoint(); if (failureType == CodePoint.RDBNFNRM || failureType == CodePoint.RDBATHRM) { writeRDBfailure(failureType); } else { writeRDBfailure(CodePoint.RDBAFLRM); } return false; | int failureType = getRdbAccessErrorCodePoint(); if (failureType == CodePoint.RDBNFNRM || failureType == CodePoint.RDBATHRM) { writeRDBfailure(failureType); } else { writeRDBfailure(CodePoint.RDBAFLRM); | 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... |
else if (database.accessCount > 1 ) { writeRDBfailure(CodePoint.RDBACCRM); return false; } | return false; } else if (database.accessCount > 1 ) { writeRDBfailure(CodePoint.RDBACCRM); return false; } | 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... |
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(pkgnamcsn); if (stmt == null) { invalidVal... | 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(pkgnamcsn); if (stmt == null) { invalidVal... | 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.TYPSQ... |
codePoint = reader.getCodePoint(); } | 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.TYPSQ... | |
while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: appRequester.extnam = reader.readString(); if (SanityManager.DEBUG) trace("extName = " + appRequester.extnam); if (appRequester.extnam.length() > CodePoint.MAX_NAME) tooBig(CodePoint.EXTNAM); break; case CodePoint.MGRLVLLS: parseMGRLVLLS(1); break;... | while (codePoint != -1) { switch (codePoint) { case CodePoint.EXTNAM: appRequester.extnam = reader.readString(); if (SanityManager.DEBUG) trace("extName = " + appRequester.extnam); if (appRequester.extnam.length() > CodePoint.MAX_NAME) tooBig(CodePoint.EXTNAM); break; case CodePoint.MGRLVLLS: parseMGRLVLLS(1); break;... | 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 ACCS... |
codePoint = reader.getCodePoint(); } | 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 ACCS... | |
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.SR... |
codePoint = reader.getCodePoint(); } | 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.SR... | |
} codePoint = reader.getCodePoint(); | 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); ... | |
} codePoint = reader.getCodePoint(); | 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 ... | |
codePoint = reader.getCodePoint(); } | 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 ... | |
if (sqlStmt.startsWith(TIMEOUT_STATEMENT)) { String timeoutString = sqlStmt.substring(TIMEOUT_STATEMENT.length()); pendingStatementTimeout = Integer.valueOf(timeoutString).intValue(); break; } if (canIgnoreStmt(sqlStmt)) { break; } if (SanityManager.DEBUG) trace("sqlStmt = " + sqlStmt); drdaStmt.initial... | if (sqlStmt.startsWith(TIMEOUT_STATEMENT)) { String timeoutString = sqlStmt.substring(TIMEOUT_STATEMENT.length()); pendingStatementTimeout = Integer.valueOf(timeoutString).intValue(); break; | private void parseEXCSQLSETobjects() throws DRDAProtocolException, SQLException { boolean gotSqlStt = false; boolean hadUnrecognizedStmt = false; String sqlStmt = null; int codePoint; DRDAStatement drdaStmt = database.getDefaultStatement(); drdaStmt.initialize(); do { correlationID = reader.readDssHeader();... |
} while (reader.isChainedWithSameID()); | if (canIgnoreStmt(sqlStmt)) { break; } if (SanityManager.DEBUG) trace("sqlStmt = " + sqlStmt); drdaStmt.initialize(); drdaStmt.getStatement().clearWarnings(); try { drdaStmt.getStatement().executeUpdate(sqlStmt); } catch (SQLException e) { if (e.getSQLState().equals(SYNTAX_ERR)) hadUnrecognizedStmt ... | private void parseEXCSQLSETobjects() throws DRDAProtocolException, SQLException { boolean gotSqlStt = false; boolean hadUnrecognizedStmt = false; String sqlStmt = null; int codePoint; DRDAStatement drdaStmt = database.getDefaultStatement(); drdaStmt.initialize(); do { correlationID = reader.readDssHeader();... |
if (hasResultSet) { stmt.setCurrentDrdaResultSet(rsNum); stmt.setQryrtndta(true); if (! isProcedure) checkWarning(null, ps, null, -1, true, true); if (rsNum == 0) writeSQLRSLRD(stmt); writeOPNQRYRM(true, stmt); writeSQLCINRD(stmt); writeQRYDSC(stmt, false); stmt.rsSuspend(); if (stmt.getQryprctyp() == CodePoint.LMTB... | if (hasResultSet) { stmt.setCurrentDrdaResultSet(rsNum); stmt.setQryrtndta(true); if (! isProcedure) checkWarning(null, ps, null, -1, true, true); if (rsNum == 0) writeSQLRSLRD(stmt); writeOPNQRYRM(true, stmt); writeSQLCINRD(stmt); writeQRYDSC(stmt, false); stmt.rsSuspend(); if (stmt.getQryprctyp() == CodePoint.LMTB... | 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 ... |
else if (! sendSQLDTARD) { int updateCount = ps.getUpdateCount(); if (false && (database.RDBUPDRM_sent == false) && ! isProcedure) { writeRDBUPDRM(); } checkWarning(database.getConnection(), stmt.ps, null, updateCount, true, true); } | checkWarning(database.getConnection(), stmt.ps, null, updateCount, true, true); } | 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 ... |
} else unknownManagers.addElement(new Integer(manager)); if (SanityManager.DEBUG) trace("Manager = " + java.lang.Integer.toHexString(manager) + " ManagerLevel " + managerLevel); | 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.... | |
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(DRDAProtocolException.DRDA_Proto_MGRLVLRM, this, 0, 0, oa); | 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); | 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.... |
throw new DRDAProtocolException(DRDAProtocolException.DRDA_Proto_MGRLVLRM, this, 0, 0, oa); } | 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.... | |
while (codePoint != -1) { switch(codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.OPNQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYBLKSZ: blksize = parseQRYBLKSZ(); gotQryblksz = true; break; case CodePoint.QRYBLKCTL: qryblkctl = reader.readNetworkShort(); ... | while (codePoint != -1) { switch(codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.OPNQRY); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.QRYBLKSZ: blksize = parseQRYBLKSZ(); gotQryblksz = true; break; case CodePoint.QRYBLKCTL: qryblkctl = reader.readNetworkShort(); ... | 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 = DRDAResultS... |
while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.readUnsignedByte(); if (tripType == FdocaConstants.RLO_TRIPLET_TYPE) { reader.skipBytes(); break; } numVars = (dtaGrpLen - 3) / 3; | while (true) { dtaGrpLen = reader.readUnsignedByte(); tripType = reader.readUnsignedByte(); tripId = reader.readUnsignedByte(); if (tripType == FdocaConstants.RLO_TRIPLET_TYPE) { reader.skipBytes(); break; } numVars = (dtaGrpLen - 3) / 3; if (SanityManager.DEBUG) trace("num of vars is: "+numVars); int[] outovr_drdaTy... | 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.re... |
trace("num of vars is: "+numVars); int[] outovr_drdaType = null; if (first) { outovr_drdaType = new int[numVars]; first = false; } else { int[] oldoutovr_drdaType = stmt.getOutovr_drdaType(); int oldlen = oldoutovr_drdaType.length; outovr_drdaType = new int[oldlen + numVars]; System.arraycopy(oldoutovr_drdaType, 0, ou... | trace("drdaType is: "+ outovr_drdaType[i]); precision = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("drdaLength is: "+precision); outovr_drdaType[i] |= (precision << 8); | 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.re... |
stmt.setOutovr_drdaType(outovr_drdaType); } | 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.re... | |
} codePoint = reader.getCodePoint(); | 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(); codePoi... | |
codePoint = reader.getCodePoint(); } | 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(); codePoi... | |
} codePoint = reader.getCodePoint(); | 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 CodePoin... | |
database.securityMechanism == CodePoint.SECMEC_USRIDONL )) { if (database.userId == null) securityCheckCode = CodePoint.SECCHKCD_USERIDMISSING; else if ( database.securityMechanism == CodePoint.SECMEC_USRIDPWD) { if (database.password == null) securityCheckCode = CodePoint.SECCHKCD_PASSWORDMISSING; } | database.securityMechanism == CodePoint.SECMEC_USRIDONL )) { if (database.userId == null) securityCheckCode = CodePoint.SECCHKCD_USERIDMISSING; else if ( database.securityMechanism == CodePoint.SECMEC_USRIDPWD) { if (database.password == 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 CodePoin... |
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 = ... | 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 paramExtPosition... |
trace("numVars = " + numVars); if (ps == null) { String marks = "(?"; for (int i = 1; i < numVars; i++) marks += ", ?"; String prepareString = "call " + stmt.procName + marks + ")"; if (SanityManager.DEBUG) trace ("$$ prepareCall is: "+prepareString); CallableStatement cs = null; try { cs = (CallableStatement) stmt.pre... | trace ("$$ prepareCall is: "+prepareString); try { cs = (CallableStatement) stmt.prepare(prepareString); } catch (SQLException se2) { throw se; } rtnParam = true; } ps = cs; stmt.ps = ps; } | 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 paramExtPosition... |
} 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 paramExtPosition... | |
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 paramExtPosition... | |
} 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 leas... | |
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; } | codePoint = reader.getCodePoint(); } if (st == null) { if (ccsidSBC != 0) { database.ccsidSBC = ccsidSBC; database.ccsidSBCEncoding = ccsidSBCEncoding; | 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 leas... |
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; } | if (ccsidDBC != 0){ database.ccsidDBC = ccsidDBC; database.ccsidDBCEncoding = ccsidDBCEncoding; | 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 leas... |
if (ccsidMBC != 0){ database.ccsidMBC = ccsidMBC; database.ccsidMBCEncoding = ccsidMBCEncoding; } } else { if (ccsidSBC != 0) { st.ccsidSBC = ccsidSBC; st.ccsidSBCEncoding = ccsidSBCEncoding; } if (ccsidDBC != 0) { st.ccsidDBC = ccsidDBC; st.ccsidDBCEncoding = ccsidDBCEncoding; } if (ccsidMBC != 0) { st.ccsidMBC = ccsi... | 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 leas... | |
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.QRYSCRABS: if (stmt.getQryrownbr() == 0) { rs.beforeFirst(); retval = fal... | switch (stmt.getQryscrorn()) { case CodePoint.QRYSCRREL: int rows = (int)stmt.getQryrownbr(); if ((rs.isAfterLast() && rows > 0) || (rs.isBeforeFirst() && rows < 0)) { | 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)) { ... |
break; case CodePoint.QRYSCRBEF: | } else { retval = rs.relative(rows); } break; case CodePoint.QRYSCRABS: if (stmt.getQryrownbr() == 0) { | 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)) { ... |
break; default: agentError("Invalid value for cursor orientation "+ stmt.getQryscrorn()); | } else { retval = rs.absolute((int)stmt.getQryrownbr()); | 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)) { ... |
break; case CodePoint.QRYSCRAFT: rs.afterLast(); retval = false; break; case CodePoint.QRYSCRBEF: rs.beforeFirst(); retval = false; break; default: agentError("Invalid value for cursor orientation "+ stmt.getQryscrorn()); } | 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)) { ... | |
if (checkSecurityCodepoint) verifyInOrderACCSEC_SECCHK(codePoint,session.getRequiredSecurityCodepoint()); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = parseCNTQRY(); if (stmt != null) { | 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(); ... |
if (stmt.rsIsClosed()) { writeENDQRYRM(CodePoint.SVRCOD_WARNING); writeNullSQLCARDobject(); } checkWarning(null, null, stmt.getResultSet(), 0, false, sendWarningsOnCNTQRY); | 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); } break; case CodePoint.EXCSQLIMM: try { updateCount = parseEXCSQLIMM(); if (database.RDBUPDRM_sent == false) { writeRDBUPDRM(); } checkWarning(null, database.getDefaultStatement().getStatement(), null, updateCount, true, true); } catc... | } } 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); checkWa... | 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) { writer.clearDSSesBackToMark(writerMark); server.consoleExceptionPrint(e); try { writeSQLDARD(database.getCurrentStatement(), true, e); } catch (SQLException e2) { agentError("Why am I getting another SQLException?"); } errorInChain(e); } break; case CodePoint.EXCSQLSTT: if (PRPSQLSTTfailed) {... | } catch (SQLException e) { writer.clearDSSesBackToMark(writerMark); server.consoleExceptionPrint(e); try { writeSQLDARD(database.getCurrentStatement(), true, e); } catch (SQLException e2) { agentError("Why am I getting another SQLException?"); } errorInChain(e); } break; case CodePoint.EXCSQLSTT: if (PRPSQLSTTfailed) {... | 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(); ... |
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(); ... | |
for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(paramPos, stmt, ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue()); if (i < numExt -1) { co... | for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(paramPos, stmt, ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue()); if (i < numExt -1) { co... | private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(para... |
} | private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(para... | |
if (stmt.isOutputParam(i+1)) { CallableStatement cs = (CallableStatement) ps; cs.registerOutParameter(i+1, stmt.getOutputParamType(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; | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
switch (drdaType) | case DRDAConstants.DRDA_TYPE_NINTEGER: | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
case DRDAConstants.DRDA_TYPE_NSMALL: { short paramVal = (short) reader.readShort(getByteOrder()); | int paramVal = reader.readInt(getByteOrder()); if (SanityManager.DEBUG) trace("integer parameter value is: "+paramVal); ps.setInt(i+1, paramVal); break; } case DRDAConstants.DRDA_TYPE_NINTEGER8: { long paramVal = reader.readLong(getByteOrder()); if (SanityManager.DEBUG) trace("parameter value is: "+paramVal); ps.setLon... | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
trace("short parameter value is: "+paramVal); if (pmeta.getParameterType(i+1) == JDBC30Translation.BOOLEAN) ps.setBoolean(i+1, (paramVal == 1)); | trace("tsString is: "+tsString); ps.setTimestamp(i+1, java.sql.Timestamp.valueOf(tsString)); } catch (java.lang.IllegalArgumentException e1) { throw new SQLException(SQLState.LANG_DATE_SYNTAX_EXCEPTION, SQLState.LANG_DATE_SYNTAX_EXCEPTION.substring(0,5)); } catch (java.lang.StringIndexOutOfBoundsException e2) { throw... | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
ps.setShort(i+1, paramVal); break; | ps.setString(i+1, ""); | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
case DRDAConstants.DRDA_TYPE_NINTEGER: { int paramVal = reader.readInt(getByteOrder()); if (SanityManager.DEBUG) trace("integer parameter value is: "+paramVal); ps.setInt(i+1, paramVal); break; } case DRDAConstants.DRDA_TYPE_NINTEGER8: { long paramVal = reader.readLong(getByteOrder()); if (SanityManager.DEBUG) trace("... | break; | private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator... |
default: { 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 indicator... | |
if (closed()) | if (closed()) break; if (session != prevSession) { initializeForSession(); } try { long timeStart = System.currentTimeMillis(); switch (session.state) { case Session.INIT: sessionInitialState(); if (session == null) break; case Session.ATTEXC: long currentTimeSlice; do { processCommands(); currentTimeSlice = getTimeS... | 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) { initializeForSession(); } 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 ((cur... | default: agentError("Session in invalid state:" + session.state); } } catch (Exception e) { if (e instanceof DRDAProtocolException && ((DRDAProtocolException)e).isDisconnectException()) { closeSession(); } else { handleException(e); | public void run() { if (SanityManager.DEBUG) trace("Starting new connection thread"); Session prevSession; while(!closed()) { // get a new session prevSession = session; session = server.getNextSession(session); if (session == null) close(); if (closed()) break; if (session != prevSession) ... |
} | 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) ... | |
catch (DRDAProtocolException nde) { } | private void sendUnexpectedException(Exception e) { DRDAProtocolException unExpDe; String dbname = null; try { if (database != null) dbname = database.dbName; println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(e); unExpDe = DRDAProtocolException.newAgentError(t... | |
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); } | 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.initial... |
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.SECMEC_EU... | 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.SECMEC_EU... | 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 rec... |
if (securityCheckCode != 0) { writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); } else { if (database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD) writer.writeScalarBytes(CodePoint.SECTKN, myPublicKey); } | } if (securityCheckCode != 0) { writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); } else { if (database.securityMechanism == CodePoint.SECMEC_EUSRIDPWD) writer.writeScalarBytes(CodePoint.SECTKN, myPublicKey); } | 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 rec... |
for (int i = 1; i <= numCols; i++) { if (noRetrieveRS) break; int drdaType; int ndrdaType; int precision; int scale; Object val = null; boolean valNull; if (rs != null) { drdaType = stmt.getRsDRDAType(i) & 0xff; precision = stmt.getRsPrecision(i); scale = stmt.getRsScale(i); ndrdaType = drdaType | 1; if (SanityMan... | for (int i = 1; i <= numCols; i++) { if (noRetrieveRS) break; int drdaType; int ndrdaType; int precision; int scale; Object val = null; boolean valNull; if (rs != null) { drdaType = stmt.getRsDRDAType(i) & 0xff; precision = stmt.getRsPrecision(i); scale = stmt.getRsScale(i); ndrdaType = drdaType | 1; if (SanityMan... | 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); i... |
{ 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... | writeFdocaVal(i,null,drdaType,precision,scale,true,stmt); | 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); i... |
case DRDAConstants.DRDA_TYPE_NFIXBYTE: writer.writeBytes((byte[]) val); break; case DRDAConstants.DRDA_TYPE_NVARBYTE: case DRDAConstants.DRDA_TYPE_NLONGVARBYTE: writer.writeLDBytes((byte[]) val, index); break; default: if (SanityManager.DEBUG) trace("ndrdaType is: "+ndrdaType); writer.writeLDString(val.toString(), ind... | case DRDAConstants.DRDA_TYPE_NFIXBYTE: writer.writeBytes((byte[]) val); break; case DRDAConstants.DRDA_TYPE_NVARBYTE: case DRDAConstants.DRDA_TYPE_NLONGVARBYTE: writer.writeLDBytes((byte[]) val, index); break; default: if (SanityManager.DEBUG) trace("ndrdaType is: "+ndrdaType); writer.writeLDString(val.toString(), ind... | protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (ndrd... |
} | protected void writeFdocaVal(int index, Object val, int drdaType, int precision, int scale, boolean valNull, DRDAStatement stmt) throws DRDAProtocolException, SQLException { writeNullability(drdaType,valNull); if (! valNull) { int ndrdaType = drdaType | 1; long valLength = 0; switch (ndrd... | |
for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); serverLevel = server.getManagerLevel(manager); if (serverLevel >= appLevel) { writer.writeCodePoint4Bytes(manager, appLevel); } else { writer.writeCodePoint4By... | for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); serverLevel = server.getManagerLevel(manager); if (serverLevel >= appLevel) { writer.writeCodePoint4Bytes(manager, appLevel); } else { writer.writeCodePoint4By... | private void writeMGRLEVELS() throws DRDAProtocolException { int manager; int appLevel; int serverLevel; writer.startDdm(CodePoint.MGRLVLLS); for (int i = 0; i < knownManagers.size(); i++) { manager = ((Integer)knownManagers.elementAt(i)).intValue(); appLevel = appRequester.getManagerLevel(manager); serve... |
private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } | private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); | private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } } } |
} | private void writeNullability(int drdaType, boolean valNull) { if(FdocaConstants.isNullable(drdaType)) { if (valNull) writer.writeByte(FdocaConstants.NULL_DATA); else { writer.writeByte(FdocaConstants.INDICATOR_NULLABLE); } } } | |
if (sqlamLevel >= MGRLVL_7) { writer.writeScalarHeader(CodePoint.QRYINSID, 8); writer.writeInt(0); writer.writeInt(session.qryinsid++); if (stmt.isScrollable()) { writer.writeScalar1Byte(CodePoint.QRYATTSCR, CodePoint.TRUE); if ((stmt.getConcurType() == ResultSet.CONCUR_UPDATABLE) && (stmt.getResultSet().getType(... | if (sqlamLevel >= MGRLVL_7) { writer.writeScalarHeader(CodePoint.QRYINSID, 8); writer.writeInt(0); writer.writeInt(session.qryinsid++); if (stmt.isScrollable()) { writer.writeScalar1Byte(CodePoint.QRYATTSCR, CodePoint.TRUE); if ((stmt.getConcurType() == ResultSet.CONCUR_UPDATABLE) && (stmt.getResultSet().getType(... | 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(Cod... |
CodePoint.QRYUPD); | CodePoint.QRYRDO); | 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(Cod... |
writer.writeScalar1Byte(CodePoint.QRYATTUPD, CodePoint.QRYRDO); | 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(Cod... |
} | 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(Cod... | |
if (firstcols < numCols || numCols > FdocaConstants.MAX_VARS_IN_NGDA) { if (firstcols > FdocaConstants.MAX_VARS_IN_NGDA) { if (SanityManager.DEBUG) SanityManager.ASSERT(numCols > FdocaConstants.MAX_VARS_IN_NGDA, "Number of columns " + numCols + " is less than MAX_VARS_IN_NGDA"); numGroups = numCols/FdocaConstants.MAX_... | if (firstcols < numCols || numCols > FdocaConstants.MAX_VARS_IN_NGDA) { if (firstcols > FdocaConstants.MAX_VARS_IN_NGDA) { if (SanityManager.DEBUG) SanityManager.ASSERT(numCols > FdocaConstants.MAX_VARS_IN_NGDA, "Number of columns " + numCols + " is less than MAX_VARS_IN_NGDA"); numGroups = numCols/FdocaConstants.MAX_... | private void writeQRYDSC(DRDAStatement stmt, boolean FDODSConly) throws DRDAProtocolException, SQLException { ResultSet rs = null; ResultSetMetaData rsmeta = null; EmbedParameterSetMetaData pmeta = null; if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); if (rs == null) // this is a CallableStatement... |
if (processLeftoverQRYDTA(stmt)) { if (stmt.getSplitQRYDTA() == null) { stmt.rowCount += 1; if (stmt.getExtDtaObjects() != null) writeEXTDTA(stmt); } return; | if (processLeftoverQRYDTA(stmt)) { if (stmt.getSplitQRYDTA() == null) { stmt.rowCount += 1; if (stmt.getExtDtaObjects() != null) writeEXTDTA(stmt); | 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 ... |
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.... | |
if (sqlamLevel >= MGRLVL_7) { for (int i = 0; i < ncols; i++) writeSQLDAGRP (rsmeta, null, i, true); | if (sqlamLevel >= MGRLVL_7) { for (int i = 0; i < ncols; i++) writeSQLDAGRP (rsmeta, null, i, true); } else { for (int i = 0; i < ncols; i++) { writeVCMorVCS(rsmeta.getColumnName(i+1)); writeVCMorVCS(rsmeta.getColumnLabel(i+1)); writeVCMorVCS(null); | private void writeSQLCINRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException { ResultSet rs = null; // todo ps is never used or closed - could this be a memory leak? PreparedStatement ps = stmt.getPreparedStatement(); if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); write... |
else { for (int i = 0; i < ncols; i++) { writeVCMorVCS(rsmeta.getColumnName(i+1)); writeVCMorVCS(rsmeta.getColumnLabel(i+1)); writeVCMorVCS(null); } } | } | private void writeSQLCINRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException { ResultSet rs = null; // todo ps is never used or closed - could this be a memory leak? PreparedStatement ps = stmt.getPreparedStatement(); if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); write... |
if (outlen[0] == -1) { switch (elemType) { case Types.DECIMAL: case Types.NUMERIC: scale = rtnOutput ? rsmeta.getScale(jdbcElemNum) : pmeta.getScale(jdbcElemNum); outlen[0] = ((precision <<8) | (scale <<0)); if (SanityManager.DEBUG) trace("\n\nprecision =" +precision + " scale =" + scale); break; default: outlen[0] = M... | if (outlen[0] == -1) { switch (elemType) { case Types.DECIMAL: case Types.NUMERIC: scale = rtnOutput ? rsmeta.getScale(jdbcElemNum) : pmeta.getScale(jdbcElemNum); outlen[0] = ((precision <<8) | (scale <<0)); if (SanityManager.DEBUG) trace("\n\nprecision =" +precision + " scale =" + scale); break; default: outlen[0] = M... | private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput) throws DRDAProtocolException, SQLException { //jdbc uses offset of 1 int jdbcElemNum = elemNum +1; // length to be retreived as output parameter int[] outlen = {-1}; int elemType = rtnOutput ?... |
boolean isDecimal = ((drdaType | 1) == DRDAConstants.DRDA_TYPE_NDECIMAL); int precision = 0, scale = 0; if (hasRs) { precision = rsmeta.getPrecision(i); scale = rsmeta.getScale(i); stmt.setRsDRDAType(i,drdaType); stmt.setRsPrecision(i, precision); stmt.setRsScale(i,scale); } | boolean isDecimal = ((drdaType | 1) == DRDAConstants.DRDA_TYPE_NDECIMAL); int precision = 0, scale = 0; if (hasRs) { precision = rsmeta.getPrecision(i); scale = rsmeta.getScale(i); stmt.setRsDRDAType(i,drdaType); stmt.setRsPrecision(i, precision); stmt.setRsScale(i,scale); } else if (isDecimal) { if (stmt.isOutputParam... | private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(le... |
else if (isDecimal) { if (stmt.isOutputParam(i)) ((CallableStatement) stmt.ps).registerOutParameter(i,Types.DECIMAL); precision = pmeta.getPrecision(i); scale = pmeta.getScale(i); | } | private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(le... |
} | if (SanityManager.DEBUG) trace("jdbcType=" + colType + " \tdrdaType=" + Integer.toHexString(drdaType)); | private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(le... |
if (SanityManager.DEBUG) trace("jdbcType=" + colType + " \tdrdaType=" + Integer.toHexString(drdaType)); writer.writeByte(drdaType); if (isDecimal) { writer.writeByte(precision); writer.writeByte(scale); } else if (outlen[0] != -1) writer.writeShort(outlen[0]); else if (hasRs) writer.writeShort(rsmeta.getColumnDispla... | writer.writeByte(drdaType); if (isDecimal) { writer.writeByte(precision); writer.writeByte(scale); } else if (outlen[0] != -1) writer.writeShort(outlen[0]); else if (hasRs) writer.writeShort(rsmeta.getColumnDisplaySize(i)); else writer.writeShort(stmt.getParamLen(i)); } | private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int colStart, int colEnd, boolean first) throws DRDAProtocolException, SQLException { int length = (FdocaConstants.SQLDTAGRP_COL_DSC_SIZE * ((colEnd+1) - colStart)) + 3; writer.writeByte(le... |
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... | 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... | 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 ... |
else { writer.writeShort(0); } | writer.writeShort(mode); } else { 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 ... |
long lobLength = stream.length(); | try{ | void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd... |
(int) Math.min(lobLength, Integer.MAX_VALUE), | void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd... | |
try { | }finally{ | void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd... |
if (stream != null) stream.close(); } catch (IOException e) { Util.javaException(e); } | closeStream(stream); | void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd... |
else if (o instanceof byte[]) { byte[] b = (byte []) o; writer.writeScalarStream (chainedWithSameCorrelator, CodePoint.EXTDTA, (int) b.length, new ByteArrayInputStream(b), writeNullByte); | void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.