rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
throw new BatchUpdateException(agent_.logWriter_, "No output parameters are allowed in batch updates", updateCounts); | throw new BatchUpdateException(agent_.logWriter_, new MessageId(SQLState.OUTPUT_PARAMS_NOT_ALLOWED), updateCounts); | private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu... |
"The method java.sql.Statement.executeQuery (String sql) cannot be called on a " + " prepared statement instance." + " Use java.sql.PreparedStatement.executeQuery () with no sql string argument.").getSQLException(); | new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT), "executeQuery(String)").getSQLException(); | public java.sql.ResultSet executeQuery(String sql) throws SQLException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "executeQuery", sql); } throw new SqlException(agent_.logWriter_, "The method java.sql.Statement.executeQuery (String sql) cannot ... |
"The method java.sql.Statement.executeUpdate (String sql) cannot be called on a " + " prepared statement instance." + " Use java.sql.PreparedStatement.executeUpdate () with no sql string argument.").getSQLException(); | new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT), "executeUpdate(String)").getSQLException(); | public int executeUpdate(String sql) throws SQLException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "executeUpdate", sql); } throw new SqlException(agent_.logWriter_, "The method java.sql.Statement.executeUpdate (String sql) cannot be called on... |
throw new SqlException(agent_.logWriter_, se, se.getMessage(), se.getSQLState(), se.getErrorCode()); | throw new SqlException(se); | void flowExecute(int executeType) throws SqlException { super.checkForClosedStatement(); super.clearWarningsX(); super.checkForAppropriateSqlMode(executeType, sqlMode_); checkThatAllParametersAreSet(); if (sqlMode_ == isUpdate__) { updateCount_ = 0; } else { ... |
throw new SqlException(agent_.logWriter_, "Unable to open resultSet with requested " + "holdability " + resultSetHoldability_ + "."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNABLE_TO_OPEN_RESULTSET_WITH_REQUESTED_HOLDABILTY), new Integer(resultSetHoldability_)); | void flowExecute(int executeType) throws SqlException { super.checkForClosedStatement(); super.clearWarningsX(); super.checkForAppropriateSqlMode(executeType, sqlMode_); checkThatAllParametersAreSet(); if (sqlMode_ == isUpdate__) { updateCount_ = 0; } else { ... |
throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED)); | public void setArray(int parameterIndex, java.sql.Array x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setArray", parameterIndex, x); } parameterIn... |
throw new SqlException(agent_.logWriter_, "PreparedStatement: setNull method setting a non-nullable " + "input parameter " + parameterIndex + " to null."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_NULL_INTO_NON_NULL), new Integer(parameterIndex)); | void setNullX(int parameterIndex, int jdbcType) throws SqlException { super.checkForClosedStatement(); // investigate what can be pushed up to setNull parameterIndex = checkSetterPreconditions(parameterIndex); parameterMetaData_.clientParamtertype_[parameterIndex - 1] = jdbcType; if (!p... |
throw new SqlException(agent_.logWriter_, "Invalid data conversion:" + " Parameter object type is invalid for requested conversion."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_TYPE)); | public void setObject(int parameterIndex, Object x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setObject", parameterIndex, x); } super.checkForClo... |
throw new SqlException(agent_.logWriter_, ae.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.JAVA_EXCEPTION), new Object[] {ae.getClass().getName(), ae.getMessage()}, ae); | private void setObjectX(int parameterIndex, Object x, int targetJdbcType, int scale) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); checkForValidScale(scale); if (x == null) { ... |
throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented").getSQLException(); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED)); | public void setRef(int parameterIndex, java.sql.Ref x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setRef", parameterIndex, x); } parameterIndex = ... |
if (writer.getDSSLength() >= blksize) | if (writer.getDSSLength() > 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()) { ... |
if (writer.getDSSLength() >= blksize) | if (writer.getDSSLength() > blksize) | private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); ... |
if (costEstimate == null) { costEstimate = childResult.getFinalCostEstimate(); } | costEstimate = childResult.getFinalCostEstimate(); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { int orderingItem = 0; int aggInfoItem = 0; FormatableArrayHolder orderingHolder; /* Get the next ResultSet#, so we can number this ResultSetNode, its * ResultColumnList and ResultSet. */ assignRe... |
result[0] = (byte)((lsequence & 0xff000000) >>> 24); result[1] = (byte)((lsequence & 0x00ff0000) >>> 16); result[2] = (byte)((lsequence & 0x0000ff00) >>> 8); result[3] = (byte) (lsequence & 0x000000ff); | result[0] = (byte)(lsequence >>> 24); result[1] = (byte)(lsequence >>> 16); result[2] = (byte)(lsequence >>> 8); result[3] = (byte)lsequence; | public byte[] toByteArray() { byte[] result = new byte[16]; int lsequence = sequence; result[0] = (byte)((lsequence & 0xff000000) >>> 24); result[1] = (byte)((lsequence & 0x00ff0000) >>> 16); result[2] = (byte)((lsequence & 0x0000ff00) >>> 8); result[3] = (byte) (lsequence & 0x000000ff); long ltimemillis = tim... |
result[4] = (byte)((ltimemillis & 0x0000ff0000000000L) >>> 40); result[5] = (byte)((ltimemillis & 0x000000ff00000000L) >>> 32); result[6] = (byte)((ltimemillis & 0x00000000ff000000L) >>> 24); result[7] = (byte)((ltimemillis & 0x0000000000ff0000L) >>> 16); result[8] = (byte)((ltimemillis & 0x000000000000ff00L) >>> 8); r... | result[4] = (byte)(ltimemillis >>> 40); result[5] = (byte)(ltimemillis >>> 32); result[6] = (byte)(ltimemillis >>> 24); result[7] = (byte)(ltimemillis >>> 16); result[8] = (byte)(ltimemillis >>> 8); result[9] = (byte)ltimemillis; | public byte[] toByteArray() { byte[] result = new byte[16]; int lsequence = sequence; result[0] = (byte)((lsequence & 0xff000000) >>> 24); result[1] = (byte)((lsequence & 0x00ff0000) >>> 16); result[2] = (byte)((lsequence & 0x0000ff00) >>> 8); result[3] = (byte) (lsequence & 0x000000ff); long ltimemillis = tim... |
result[10] = (byte)((linetaddr & 0x0000ff0000000000L) >>> 40); result[11] = (byte)((linetaddr & 0x000000ff00000000L) >>> 32); result[12] = (byte)((linetaddr & 0x00000000ff000000L) >>> 24); result[13] = (byte)((linetaddr & 0x0000000000ff0000L) >>> 16); result[14] = (byte)((linetaddr & 0x000000000000ff00L) >>> 8); result... | result[10] = (byte)(linetaddr >>> 40); result[11] = (byte)(linetaddr >>> 32); result[12] = (byte)(linetaddr >>> 24); result[13] = (byte)(linetaddr >>> 16); result[14] = (byte)(linetaddr >>> 8); result[15] = (byte)linetaddr; | public byte[] toByteArray() { byte[] result = new byte[16]; int lsequence = sequence; result[0] = (byte)((lsequence & 0xff000000) >>> 24); result[1] = (byte)((lsequence & 0x00ff0000) >>> 16); result[2] = (byte)((lsequence & 0x0000ff00) >>> 8); result[3] = (byte) (lsequence & 0x000000ff); long ltimemillis = tim... |
return getDynamicSection(connection.resultSetHoldability_); | return getDynamicSection(connection.holdability()); | Section getPositionedUpdateSection(Section querySection) throws SqlException { Connection connection = agent_.connection_; return getDynamicSection(connection.resultSetHoldability_); } |
jdk14test = parentProps.getProperty("jdk14test"); runwithj9 = parentProps.getProperty("runwithj9"); | runwithj9 = parentProps.getProperty("runwithj9"); | public static Properties locateSuiteProperties(String suiteName, Properties parentProps, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException, Exception { // Check for suite properties //System.out.println("Checking for suite properties"); String suitePr... |
String testJVM = (jvmName.startsWith("j9") ? "j9" : jvmName); | String testJVM = jvmName; if (jvmName.startsWith("j9")) testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9"); | public static Properties locateSuiteProperties(String suiteName, Properties parentProps, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException, Exception { // Check for suite properties //System.out.println("Checking for suite properties"); String suitePr... |
else if(needJdk14) pwOut.println("Cannot run the suite, requires jdk14 or higher, have jdk" + javaVersion); | private static void runSuites(Vector suitesToRun) throws ClassNotFoundException, FileNotFoundException, IOException, Exception { // For each suite, locate its properties and runall files // which should be in the "suites" dir or user.dir String suiteName = ""; userdir = ... | |
if (jdk14test != null) jvmProps.addElement("jdk14test=" + jdk14test); | private static void runTests(Properties suiteProps, String suite) throws IOException, Exception { // save a copy of the system properties at this point; when runing with // java threads we need to reset the system properties to this list; // otherwise we start to accumulate extraneous properti... | |
if ( parentProperties.getProperty("jdk14test") != null ) p.put("jdk14test", jdk14test); else jdk14test = p.getProperty("jdk14test"); | private static void setSuiteProperties(Properties p, String suiteName, Properties parentProperties, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException { // Some properties may have been set by the top suite // jvm, jvmflags, classpath, systemdiff, verbose, etc... | |
String testJVM = (jvmName.startsWith("j9") ? "j9" : jvmName); | String testJVM = jvmName; if (jvmName.startsWith("j9")) testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9"); | private static void setSuiteProperties(Properties p, String suiteName, Properties parentProperties, boolean isParent, boolean isTop) throws ClassNotFoundException, IOException { // Some properties may have been set by the top suite // jvm, jvmflags, classpath, systemdiff, verbose, etc... |
jdk14test = suiteProperties.getProperty("jdk14test"); | private static void setTopSuiteProperties() throws ClassNotFoundException, IOException { framework = suiteProperties.getProperty("framework"); jversion = suiteProperties.getProperty("jversion"); //System.out.println("RunList top jversion= " + jversion); jvmName = suiteProperties.getProperty("jvm")... | |
String testJVM = (jvmName.startsWith("j9") ? "j9" : jvmName); runwithjvm = suiteProperties.getProperty("runwith" + testJVM); | String testJVM = jvmName; if (jvmName.startsWith("j9")) testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9"); runwithjvm = suiteProperties.getProperty("runwith" + testJVM); | private static void setTopSuiteProperties() throws ClassNotFoundException, IOException { framework = suiteProperties.getProperty("framework"); jversion = suiteProperties.getProperty("jversion"); //System.out.println("RunList top jversion= " + jversion); jvmName = suiteProperties.getProperty("jvm")... |
boolean isJdk14 = false; boolean isJdk15 = false; | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... | |
boolean isJdk14Test = false; | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... | |
needJdk14 = false; | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... | |
if ( System.getProperty("java.version").startsWith("1.1.7") ) isJdk117 = true; if ( System.getProperty("java.version").startsWith("1.4.") ) isJdk14 = true; if ( System.getProperty("java.version").startsWith("1.5.") ) isJdk15 = true; | if ( System.getProperty("java.version").startsWith("1.1.7") ) isJdk117 = true; | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... |
if ( (jdk14test != null) && (jdk14test.length()>0) ) if ("true".equalsIgnoreCase(jdk14test)) isJdk14Test = true; | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... | |
if ((!isJdk14 && !isJdk15) && isJdk14Test) { needJdk14 = true; return true; } | private static boolean shouldSkipTest() { boolean result = false; // figure out if suite should be skipped ... adhoc rules boolean isJdk12 = false; // really now 'isJdk12orHigher' boolean isJdk14 = false; boolean isJdk15 = false; boolean isJdk118 = false; boolean isJdk117 = false; boolean isEncryption = false; b... | |
public static String lessThanString(String pattern, int maxWidth) | public static String lessThanString(String pattern, String escape, int maxWidth) | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
int patternLen; | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... | |
char[] charArray; | final int escChar; | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
if ((patternLen = pattern.length()) == 0) | if (pattern.length() == 0) | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
lastUsableChar = patternLen -1; oldLastChar = pattern.charAt(lastUsableChar); | if ((escape != null) && (escape.length() !=0)) { escChar = escape.charAt(0); } else { escChar = -1; } StringBuffer upperLimit = new StringBuffer(maxWidth); for (int i = 0; i < pattern.length(); i++) { char c = pattern.charAt(i); if (c == escChar) { if (++i >= pattern.length()) { throw StandardException.newExcept... | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
return null; | return SUPER_STRING; | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
charArray = pattern.substring(0, lastUsableChar + 1).toCharArray(); charArray[lastUsableChar] = newLastChar; | upperLimit.setCharAt(lastUsableChar, newLastChar); | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
return padWithNulls(new String(charArray), maxWidth); | if (upperLimit.length() < maxWidth) { upperLimit.setLength(maxWidth); } return upperLimit.toString(); | public static String lessThanString(String pattern, int maxWidth) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern... |
ps.setQueryTimeout(0L); ResultSet rs = ps.execute(lcc, true); | ResultSet rs = ps.execute(lcc, true, 0L); | private static void executeUpdate(LanguageConnectionContext lcc, String updateStmt) throws StandardException { PreparedStatement ps = lcc.prepareInternalStatement(updateStmt); // This is a substatement; for now, we do not set any timeout // for it. We might change this behaviour later, by linking ... |
ps.setQueryTimeout(0L); ResultSet rs = ps.execute(lcc, false); | ResultSet rs = ps.execute(lcc, false, 0L); | private long getColumnMax(Activation activation, TableDescriptor td, String columnName, long increment, long initial) throws StandardException { String maxStr = (increment > 0) ? "MAX" : "MIN"; String maxStmt = "SELECT " + maxStr + "(\"" + columnName + "\")" + "FROM \"" + td.getSchemaName() + "\... |
NetSqlca netSqlca = new NetSqlca(netAgent_.netConnection_, sqlcode, sqlstate, sqlerrproc, netAgent_.targetTypdef_.getCcsidSbc()); | NetSqlca netSqlca = null; try { netSqlca = new NetSqlca(netAgent_.netConnection_, sqlcode, sqlstate, sqlerrproc); } catch(SqlException sqle) { throw new DisconnectException(netAgent_,sqle); } | private NetSqlca parseSQLCAGRP(Sqlca[] rowsetSqlca) throws DisconnectException { if (readFastUnsignedByte() == CodePoint.NULLDATA) { return null; } int sqlcode = readFastInt(); byte[] sqlstate = readFastBytes(5); byte[] sqlerrproc = readFastBytes(8); NetSqlca net... |
try { if (sqldcCode == 20237) { rowsetSqlca[0] = new NetSqlca(netAgent_.netConnection_, | if (sqldcCode == 20237) { rowsetSqlca[0] = new NetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState, null); } else { if (rowsetSqlca[sqldcRown] != null) { rowsetSqlca[sqldcRown].resetRowsetSqlca(netAgent_.netConnection_, | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, Typdef.UTF8ENCODING); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcLinen = readFastInt(); // L... |
sqldcState.getBytes(Typdef.UTF8ENCODING), null, netAgent_.targetTypdef_.getCcsidSbc()); | sqldcState, null); | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, Typdef.UTF8ENCODING); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcLinen = readFastInt(); // L... |
if (rowsetSqlca[sqldcRown] != null) { rowsetSqlca[sqldcRown].resetRowsetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState.getBytes(Typdef.UTF8ENCODING), null, netAgent_.targetTypdef_.getCcsidSbc()); } else { rowsetSqlca[sqldcRown] = new NetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState.getBytes(Typdef.UTF8EN... | rowsetSqlca[sqldcRown] = new NetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState, null); | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, Typdef.UTF8ENCODING); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcLinen = readFastInt(); // L... |
} catch(UnsupportedEncodingException uee) { throw new DisconnectException(uee,netAgent_); | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, Typdef.UTF8ENCODING); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcLinen = readFastInt(); // L... | |
{ 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; } | { 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) sendUnexpectedException(s... |
} | 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) sendUnexpectedException(s... | |
if (isAfterLast) { rs.afterLast(); } if (isBeforeFirst) { rs.beforeFirst(); } | if (isAfterLast) { rs.afterLast(); | 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()) { ... |
else { final boolean qryclsOnLmtblkprc = appRequester.supportsQryclsimpForLmtblkprc(); if (stmt.isRSCloseImplicit(qryclsOnLmtblkprc)) { stmt.rsClose(); stmt.rsSuspend(); } | 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()) { ... |
} | 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.r... | |
{ Properties p = new Properties(); databaseAccessException = null; if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(Attribute.DRDAID_ATTR, session.drdaID); try { database.makeConnection(p); } catch (SQLException se) { String sqlState = se.getSQLState(); databaseAccessExce... | { Properties p = new Properties(); databaseAccessException = null; if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(Attribute.DRDAID_ATTR, session.drdaID); try { database.makeConnection(p); } catch (SQLException se) { String sqlState = se.getSQLState(); databaseAccessExce... | 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... |
if (sqlState.regionMatches(0,SQLState.LOGIN_FAILED,0,5)) return CodePoint.SECCHKCD_USERIDINVALID; return 0; } catch (Exception e) { println2Log(database.dbName, session.drdaID, "Driver not loaded" + e.getMessage()); try { agentError("Driver not loaded"); } catch (DRDAProtocolException dpe) { try { server.star... | throw dpe; } } | 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... |
{ synchronized(logConnectionsSync) { return logConnections; } | { synchronized(logConnectionsSync) { return logConnections; | private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; } } |
} | private boolean getLogConnections() { synchronized(logConnectionsSync) { return logConnections; } } | |
{ synchronized(timeSliceSync) { return timeSlice; } | { synchronized(timeSliceSync) { return timeSlice; | private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; } } |
} | private long getTimeSlice() { synchronized(timeSliceSync) { return timeSlice; } } | |
if (e instanceof DRDAProtocolException) { try { DRDAProtocolException de = (DRDAProtocolException) e; println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(e); reader.clearBuffer(); de.write(writer); finalizeChain(); closeSession(); close(); } catch (DRDAProtocolException ioe) { println... | if (e instanceof DRDAProtocolException) { try { DRDAProtocolException de = (DRDAProtocolException) e; println2Log(dbname,session.drdaID, e.getMessage()); | 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... |
} } | } catch (DRDAProtocolException ioe) { println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(ioe); closeSession(); close(); } } else { sendUnexpectedException(e); 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... |
{ int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); | { int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2); int sqlam = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("RDBACCCL = " +... | 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... |
while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2); int sqlam = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("RDBACCCL = " + sqlam); if (sqlam != CodePoint.SQLAM) invalidValue(CodePoint.RDBACCCL); removeFromRequired(CodePoint.RDBACCCL); break; cas... | } 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... |
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 d... |
{ | { try { if (decryptionManager == null) decryptionManager = new DecryptionManager(); myPublicKey = decryptionManager.obtainPublicKey(); } catch (SQLException e) { println2Log(null, session.drdaID, e.getMessage()); securityCheckCode = CodePoint.SECCHKCD_0A; } } } } break; case CodePoint.RDBNAM: String dbname = parseRDB... | 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 d... |
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... | } else agentError("Attempt to decode mixed byte string without CCSID being set"); return strVal; } | 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... | } else agentError("Attempt to decode single byte string without CCSID being set"); return strVal; } | 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... |
if(database.getConnection() == null && databaseAccessException == null){ | if(database.getConnection() == null && databaseAccessException == null){ writeRDBfailure(CodePoint.RDBAFLRM); return false; } if (databaseAccessException != null) { int failureType = getRdbAccessErrorCodePoint(); if (failureType == CodePoint.RDBNFNRM || failureType == CodePoint.RDBATHRM) { writeRDBfailure(failureTy... | 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 f... |
return false; } if (databaseAccessException != null) { | } return false; } else if (database.accessCount > 1 ) { writeRDBfailure(CodePoint.RDBACCRM); return false; } else writeACCRDBRM(svrcod); | 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 f... |
int failureType = getRdbAccessErrorCodePoint(); if (failureType == CodePoint.RDBNFNRM || failureType == CodePoint.RDBATHRM) { writeRDBfailure(failureType); } else { writeRDBfailure(CodePoint.RDBAFLRM); } return false; } else if (database.accessCount > 1 ) { writeRDBfailure(CodePoint.RDBACCRM); return false; } else writ... | session.appRequester = server.getAppRequester(appRequester); return sessionOK; } | 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 f... |
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... | } 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: ... |
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 ACC... |
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(); ... | } } | 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: cas... |
{ int codePoint; reader.markCollection(); Pkgnamcsn pkgnamcsn = null; | { int codePoint; reader.markCollection(); Pkgnamcsn pkgnamcsn = null; codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLIMM); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.RDBCMTOK: parseRDBCMTOK(... | 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); bre... |
while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLIMM); break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.RDBCMTOK: parseRDBCMTOK(); break; case CodePoint.MONITOR: parseMONITOR(); break; default: invalidCodePoint(codePoint); } codePo... | } DRDAStatement drdaStmt = database.getDefaultStatement(pkgnamcsn); drdaStmt.initialize(); String sqlStmt = parseEXECSQLIMMobjects(); | 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); bre... |
while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.EXCSQLSET); break; case CodePoint.PKGNAMCT: String pkgnamct = parsePKGNAMCT(); break; case CodePoint.MONITOR: parseMONITOR(); break; case CodePoint.PKGNAMCSN: Pkgnamcsn pkgnamcsn = parsePKGNAMCSN(); break; default: in... | } | 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 cas... |
} codePoint = reader.getCodePoint(); } parseEXCSQLSETobjects(); return true; } | 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 cas... |
if (e.getSQLState().equals(SYNTAX_ERR)) hadUnrecognizedStmt = true; else throw e; } break; default: invalidCodePoint(codePoint); | if (e.getSQLState().equals(SYNTAX_ERR)) hadUnrecognizedStmt = true; else throw e; | 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();... |
} | break; default: invalidCodePoint(codePoint); } } | 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();... |
{ int codePoint; String strVal; reader.markCollection(); | { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; Pkgnamcsn pkgnamcsn = null; int numRows = 1; int blkSize = 0; int maxrslcnt = 0; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int outovropt = CodePoi... | 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 va... |
boolean outputExpected = false; Pkgnamcsn pkgnamcsn = null; int numRows = 1; int blkSize = 0; int maxrslcnt = 0; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int outovropt = CodePoint.OUTOVRFRS; byte [] rslsetflg = null; String procName = null; while (codePoint != -1) { sw... | } if (pkgnamcsn == null) missingCodePoint(CodePoint.PKGNAMCSN); DRDAStatement stmt; boolean needPrepareCall = false; stmt = database.getDRDAStatement(pkgnamcsn); boolean isProcedure = (procName !=null || (stmt != null && stmt.wasExplicitlyPrepared() && stmt.isCall)); if (isProcedure) { if ( stmt == null || !(stmt... | 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 va... |
database.setCurrentStatement(stmt); if (reader.isChainedWithSameID()) parseEXCSQLSTTobjects(stmt); else if (isProcedure && (needPrepareCall)) | 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 va... |
String prepareString = "call " + stmt.procName +"()"; if (SanityManager.DEBUG) trace ("$$$prepareCall is: "+prepareString); database.getConnection().clearWarnings(); CallableStatement cs = (CallableStatement) stmt.prepare(prepareString); | 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.LMTBLKPRC) writeQRYDTA(s... | 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 va... |
stmt.ps.clearWarnings(); boolean hasResultSet = stmt.execute(); ResultSet rs = null; if (hasResultSet) | else if (! sendSQLDTARD) | 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 va... |
rs = stmt.getResultSet(); | int updateCount = ps.getUpdateCount(); if (false && (database.RDBUPDRM_sent == false) && ! isProcedure) { writeRDBUPDRM(); } 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 va... |
hasResultSet = (rs != null); int numResults = 0; if (hasResultSet) { numResults = stmt.getNumResultSets(); writeRSLSETRM(stmt); } boolean sendSQLDTARD = stmt.hasOutputParams() && outputExpected; if (isProcedure) { if (sendSQLDTARD) { writer.createDssObject(); writer.startDdm(CodePoint.SQLDTARD); writer.startDdm(Cod... | } while(hasResultSet && (++rsNum < numResults)); return; } | 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 va... |
{ int manager, managerLevel; int currentLevel; unknownManagers = new Vector(); knownManagers = new Vector(); errorManagers = new Vector(); errorManagersLevel = new Vector(); | { int manager, managerLevel; int currentLevel; unknownManagers = new Vector(); knownManagers = new Vector(); errorManagers = new Vector(); errorManagersLevel = new Vector(); if (SanityManager.DEBUG) trace("Manager Levels"); while (reader.moreDdmData()) { manager = reader.readNetworkShort(); managerLevel = reader.read... | 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 (SanityManage... |
trace("Manager Levels"); 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_LEV... | 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++] = errorMan... | 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 (SanityManage... |
{ 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(); if (tripType == FdocaConstants.RLO_TRIPLET_TYPE) { reader.skipBytes(); break; } nu... | { 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(); if (tripType == FdocaConstants.RLO_TRIPLET_TYPE) { reader.skipBytes(); break; } nu... | 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.... |
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); } 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.... |
while (codePoint != -1) { switch (codePoint) { case CodePoint.RDBNAM: setDatabase(CodePoint.PRPSQLSTT); databaseToSet = database; break; case CodePoint.PKGNAMCSN: pkgnamcsn = parsePKGNAMCSN(); break; case CodePoint.RTNSQLDA: rtnsqlda = readBoolean(CodePoint.RTNSQLDA); break; case CodePoint.TYPSQLDA: rtnOutput = pa... | } | 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(); code... |
} codePoint = reader.getCodePoint(); } | stmt = database.newDRDAStatement(pkgnamcsn); String sqlStmt = parsePRPSQLSTTobjects(stmt); if (databaseToSet != null) stmt.setDatabase(database); stmt.explicitPrepare(sqlStmt); database.setCurrentStatement(stmt); | 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(); code... |
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; } | 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(); code... |
{ int codePoint, securityCheckCode = 0; int securityMechanism = 0; databaseAccessException = null; reader.markCollection(); | { 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 CodePoint.SECMEC: checkLength(CodePoint.SECMEC, 2); sec... | 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.SECM... |
while (codePoint != -1) { switch (codePoint) { case CodePoint.SECMGRNM: reader.skipBytes(); break; case CodePoint.SECMEC: checkLength(CodePoint.SECMEC, 2); securityMechanism = reader.readNetworkShort(); if (SanityManager.DEBUG) trace("Security mechanism = " + securityMechanism); if (securityMechanism != database.se... | } if (securityMechanism == 0) missingCodePoint(CodePoint.SECMEC); | 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.SECM... |
} 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.SECCHKCD_USERIDMISSING; else if ( database.securityMechanism == CodePoint.SECMEC_USRIDPWD) { if (database.passw... | 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.SECM... |
if (securityCheckCode == 0 && (database.securityMechanism == CodePoint.SECMEC_USRIDPWD|| database.securityMechanism == CodePoint.SECMEC_USRIDONL )) { if (database.userId == null) securityCheckCode = CodePoint.SECCHKCD_USERIDMISSING; else if ( database.securityMechanism == CodePoint.SECMEC_USRIDPWD) { if (database.passw... | } | 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.SECM... |
} | 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.SECM... |
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.SECM... |
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.SECM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.