rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
rs = stmt.executeQuery("SELECT * FROM AllDataTypesForTestingTable FOR UPDATE"); | rs = pstmt.executeQuery(); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
rs1 = stmt1.executeQuery("SELECT * FROM AllDataTypesNewValuesData"); | rs1 = pstmt1.executeQuery(); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if (updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR")) { | if ((TestUtil.isNetFramework() && updateXXXRulesTableForNetworkServer[sqlType-1][updateXXXName-1].equals("ERROR")) || (TestUtil.isEmbeddedFramework() && updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR"))) { | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if (updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR")) | if ((TestUtil.isNetFramework() && updateXXXRulesTableForNetworkServer[sqlType-1][updateXXXName-1].equals("ERROR")) || (TestUtil.isEmbeddedFramework() && updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR"))) | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); stmt1 = conn.createStatement(); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... | |
if (updateXXXRulesTableForEmbedded[sqlType-1][updateXXXName-1].equals("ERROR")) { | if (TestUtil.isNetFramework() && updateXXXName == 13 && (sqlType==7 || sqlType==8 || sqlType==9 || sqlType==13)) System.out.print(""); else if (TestUtil.isNetFramework() && updateXXXName == 17 && (sqlType==12 || sqlType==17)) System.out.print(""); else if ((TestUtil.isNetFramework() && updateXXXRulesTableForNetworkSe... | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if(rs.getBigDecimal(4) != bd) | if(rs.getBigDecimal(4).compareTo(bd) != 0) | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
if (JVMInfo.JDK_ID != 2){ | if (JVMInfo.JDK_ID != 2 && TestUtil.isEmbeddedFramework()){ | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
System.out.println("FAIL!!! updateInt should have failed because c12 is not the FOR UPDATE columns list."); } catch (SQLException e) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception " + e.getMessage()); | if (TestUtil.isEmbeddedFramework()) System.out.println("PASS!!! Embedded throws exception for updateRow"); else System.out.println("FAIL!!! Network Server should throw exception for updateXXX"); } catch (SQLException e) { System.out.println("SQL State : " + e.getSQLState()); System.out.println("Got expected exception "... | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
} | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... | |
Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); | PreparedStatement pstmt1 = conn.prepareStatement("select * from " + checkAgainstTheTable); ResultSet rs1 = pstmt1.executeQuery(); | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from AllDataTypesForTestingTable"); | PreparedStatement pstmt = conn.prepareStatement("select * from AllDataTypesForTestingTable"); ResultSet rs = pstmt.executeQuery(); | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
if (sqlType == 1) | if (sqlType == 1) { | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
else if (sqlType == 2) | } else if (sqlType == 2) { | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
else if (sqlType == 3) | } else if (sqlType == 3) | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
else if (sqlType == 15) | else if (sqlType == 15) { | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
else if (sqlType == 16) if(rs.getTimestamp(sqlType) != rs1.getTimestamp(updateXXXName)) { | } else if (sqlType == 16) { if(!rs.getTimestamp(sqlType).equals(rs1.getTimestamp(updateXXXName))) { | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
else if (sqlType == 17 && JVMInfo.JDK_ID != 2) | } else if (sqlType == 17 && JVMInfo.JDK_ID != 2) | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... |
rs.close(); rs1.close(); pstmt.close(); pstmt1.close(); Statement stmt = conn.createStatement(); | static boolean verifyData(int sqlType, int updateXXXName, String checkAgainstTheTable) throws SQLException { Statement stmt1 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select * from " + checkAgainstTheTable); rs1.next(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(... | |
dd.addRemovePermissionsDescriptor( grant, tablePermsDesc, grantee, tc); | { if (dd.addRemovePermissionsDescriptor( grant, tablePermsDesc, grantee, tc)) { dd.getDependencyManager().invalidateFor(tablePermsDesc, DependencyManager.REVOKE_PRIVILEGE, lcc); } } | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... |
dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc); | { if (dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc)) dd.getDependencyManager().invalidateFor(colPermsDescs[i], DependencyManager.REVOKE_PRIVILEGE, lcc); } | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... |
!StringUtil.SQLEqualsIgnoreCase(value_s, Property.FULL_ACCESS)) throw StandardException.newException(SQLState.AUTH_INVALID_AUTHORIZATION_PROPERTY , key,value_s); | !StringUtil.SQLEqualsIgnoreCase(value_s, Property.FULL_ACCESS) && !StringUtil.SQLEqualsIgnoreCase(value_s, Property.SQL_STANDARD_ACCESS)) throw StandardException.newException(SQLState.AUTH_INVALID_AUTHORIZATION_PROPERTY, key, value_s); | public boolean validate(String key, Serializable value, Dictionary p) throws StandardException { if (value == null) return true; else if (key.equals(Property.DEFAULT_CONNECTION_MODE_PROPERTY)) { String value_s = (String)value; if (value_s != null && !StringUtil.SQLEqualsIgnoreCase(value_s, Pro... |
if (stmt != null) { writer.clearDSSesBackToMark(writerMark); if (! stmt.rsIsClosed()) { try { stmt.rsClose(); } catch (SQLException ec) { if (SanityManager.DEBUG) trace("Warning: Error closing statement"); } writeABNUOWRM(); writeSQLCARD(e,CodePoint.SVRCOD_ERROR,0,0); } } else { writeSQLCARDs(e, 0); } errorInChain(e)... | cleanUpAndCloseResultSet(stmt, e, writerMark); | 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.getQryprctyp() == CodePoint.LMTBLKPRC) { DRDAResultSet drdars = stmt.getCurrentDrdaResultSet(); try { if (drdars != null && !drdars.hasLobColumns()) { writeQRYDTA(stmt); } } catch (SQLException sqle) { cleanUpAndCloseResultSet(stmt, sqle, writerMark); } } | 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(); ... | |
greaterEqualString = Like.greaterEqualString(pattern, escape); | int maxWidth = receiver.getTypeServices().getMaximumWidth(); greaterEqualString = Like.greaterEqualString(pattern, escape, maxWidth); | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { boolean eliminateLikeComparison = false; String greaterEqualString = null; String lessThanString = null; String pattern; /* We... |
lessThanString = Like.lessThanString(greaterEqualString); | lessThanString = Like.lessThanString(pattern, escape, maxWidth); | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { boolean eliminateLikeComparison = false; String greaterEqualString = null; String lessThanString = null; String pattern; /* We... |
"lessThanStringFromParameter"); | "lessThanStringFromParameter", maxWidth); | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { boolean eliminateLikeComparison = false; String greaterEqualString = null; String lessThanString = null; String pattern; /* We... |
"greaterEqualStringFromParameter"); | "greaterEqualStringFromParameter", maxWidth); | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { boolean eliminateLikeComparison = false; String greaterEqualString = null; String lessThanString = null; String pattern; /* We... |
ValueNode escapeNode,String methodName) | ValueNode escapeNode,String methodName, int maxWidth) | private ValueNode setupOptimizeStringFromParameter(ValueNode parameterNode, ValueNode escapeNode,String methodName) throws StandardException { Vector param; if (escapeNode != null) { param = new Vector(2); methodName += "WithEsc"; } else param = new Vector(1); StaticMethodCallNode methodCall = (StaticM... |
QueryTreeNode maxWidthNode = getNodeFactory().getNode( C_NodeTypes.INT_CONSTANT_NODE, new Integer(maxWidth), getContextManager()); param.addElement(maxWidthNode); | private ValueNode setupOptimizeStringFromParameter(ValueNode parameterNode, ValueNode escapeNode,String methodName) throws StandardException { Vector param; if (escapeNode != null) { param = new Vector(2); methodName += "WithEsc"; } else param = new Vector(1); StaticMethodCallNode methodCall = (StaticM... | |
if (innerTable.getProperties() != null) mb.push(PropertyUtil.sortProperties(innerTable.getProperties())); else mb.pushNull("java.lang.String"); | protected void fillInScanArgs2(MethodBuilder mb, Optimizable innerTable, int bulkFetch, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel) throws StandardException { mb.push(innerTable.getBaseTableName()); ConglomerateDescriptor... | |
test6(conn, "test6", "TEST6"); | public void testList(Connection conn) throws SQLException { test1(conn, "test1", "TEST1"); // test2(conn, "test2", "TEST2"); test3(conn, "test3", "TEST3"); // test4(conn, "test4", "TEST4"); test5(conn, "test5", "TEST5"); } | |
conn_ = conn; | conn_ = conn.getNetConnection(); netXAConn_ = conn; | public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, org.apache.derby.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = ... |
port_ = conn.netAgent_.getPort(); ipaddr_ = conn.netAgent_.socket_.getLocalAddress().getHostAddress(); | port_ = conn_.netAgent_.getPort(); ipaddr_ = conn_.netAgent_.socket_.getLocalAddress().getHostAddress(); | public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, org.apache.derby.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = ... |
callInfoArray_[0].actualConn_ = conn_; | callInfoArray_[0].actualConn_ = conn; | public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, org.apache.derby.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = ... |
public Object convert(Object value) { if (value != null) { int result = 0; StringTokenizer stok = new StringTokenizer(value.toString(), ", \t|", false); while (stok.hasMoreTokens()) { String tok = stok.nextToken(); result = result | recognizeOption(tok); } return new Integer(result); } return null; | public Object convert(Class type, Object value) { return convert(value); | public Object convert(Object value) { if (value != null) { int result = 0; StringTokenizer stok = new StringTokenizer(value.toString(), ", \t|", false); while (stok.hasMoreTokens()) { String tok = stok.nextToken(); result = result ... |
if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); if (x == null) { updateNull(columnIndex); return; } | public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { //If the column type is the right datatype, this method will eventually call getDVDforColumnToBeUpdated which will check for //the read only resultset. But for other datatypes, we want to catch if this updateChar... | |
LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn.setLimit(length); ReaderToUTF8Stream utfIn = new ReaderToUTF8Stream(limitIn); getDVDforColumnToBeUpdated(columnIndex, updateMethodName).setValue(utfIn, length); } catch (StandardException t) { throw noStateChangeException(t); } | if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH); if (reader == null) { updateNull(columnIndex); return; } LimitReader limitIn = new LimitReader(reader); int usableLength = length; ReaderToUTF8Stream utfIn = null; if (getColumnType(columnIndex) == Types.CLOB) { int colWidth = resul... | protected void updateCharacterStreamInternal(int columnIndex, java.io.Reader reader, int length, String updateMethodName) throws SQLException { try { LimitReader limitIn = new LimitReader(reader); if (length != -1) limitIn.setLimit(length); ReaderToUTF8Stream utfIn = new ReaderToUTF8Stream(limitI... |
updateCharacterStreamInternal(columnIndex, x.getCharacterStream(), -1, "updateClob"); | { int length = (int)x.length(); updateCharacterStreamInternal( columnIndex, x.getCharacterStream(),length, "updateClob"); } | public void updateClob(int columnIndex, Clob x) throws SQLException { checksBeforeUpdateXXX("updateClob", columnIndex); int colType = getColumnType(columnIndex); if (colType != Types.CLOB) throw dataTypeConversion(columnIndex, "java.sql.Clob"); if (x == null) updateNul... |
case REGULAR_FILE_GET_CANONICALPATH_ACTION: return (String)(actionRegularFile.getCanonicalPath()); case STORAGE_FILE_GET_CANONICALPATH_ACTION: return (String)(actionStorageFile.getCanonicalPath()); | public final Object run() throws IOException { switch(actionCode) { case FILE_WRITER_ACTION: // SECURITY PERMISSION - MP1 return new OutputStreamWriter( actionStorageFile.getOutputStream( actionAppend)); case REGULAR_FILE_EXISTS_ACTION: return ReuseFac... | |
System.out.print("[" + rsmd.getColumnTypeName(i) + "]"); | static void dumpRS(ResultSet s) throws SQLException { ResultSetMetaData rsmd = s.getMetaData (); // Get the number of columns in the result set int numCols = rsmd.getColumnCount (); String[] headers = new String[numCols]; if (numCols <= 0) { System.out.println("(no columns!)"); return; } // Display column... | |
String sqldcState = readFastString(5, netAgent_.targetTypdef_.getCcsidSbcEncoding()); | String sqldcState = readFastString(5, Typdef.UTF8ENCODING); | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, netAgent_.targetTypdef_.getCcsidSbcEncoding()); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcL... |
if (sqldcCode == 20237) { rowsetSqlca[0] = new NetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState.getBytes(), null, netAgent_.targetTypdef_.getCcsidSbc()); } else { if (rowsetSqlca[sqldcRown] != null) { rowsetSqlca[sqldcRown].resetRowsetSqlca(netAgent_.netConnection_, | try { if (sqldcCode == 20237) { rowsetSqlca[0] = new NetSqlca(netAgent_.netConnection_, | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, netAgent_.targetTypdef_.getCcsidSbcEncoding()); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcL... |
sqldcState.getBytes(), | sqldcState.getBytes(Typdef.UTF8ENCODING), | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, netAgent_.targetTypdef_.getCcsidSbcEncoding()); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcL... |
rowsetSqlca[sqldcRown] = new NetSqlca(netAgent_.netConnection_, sqldcCode, sqldcState.getBytes(), null, netAgent_.targetTypdef_.getCcsidSbc()); | 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... | private int parseSQLDCGRP(Sqlca[] rowsetSqlca, int lastRow) throws DisconnectException { int sqldcCode = readFastInt(); // SQLCODE String sqldcState = readFastString(5, netAgent_.targetTypdef_.getCcsidSbcEncoding()); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcL... |
} 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, netAgent_.targetTypdef_.getCcsidSbcEncoding()); // SQLSTATE int sqldcReason = readFastInt(); // REASON_CODE int sqldcL... | |
if (restoreCount != 0 && (Boolean.valueOf(p.getProperty( Attribute.DATA_ENCRYPTION)).booleanValue() || p.getProperty(Attribute.NEW_BOOT_PASSWORD) != null || p.getProperty(Attribute.NEW_CRYPTO_EXTERNAL_KEY) != null )) { throw newSQLException(SQLState.CONFLICTING_RESTORE_ATTRIBUTES); } | private boolean createBoot(Properties p) throws SQLException { int createCount = 0; if (Boolean.valueOf(p.getProperty(Attribute.CREATE_ATTR)).booleanValue()) createCount++; int restoreCount=0; //check if the user has specified any /create/restore/recover from backup attributes. if (p.getProperty(Attribute.CREAT... | |
preparedStmt.setRequiredPermissionsList(cc.getRequiredPermissionsList()); | private PreparedStatement prepMinion(LanguageConnectionContext lcc, boolean cacheMe, Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException { long beginTime = 0; long parseTime = 0; long bindTime = 0; long optimizeTime = 0; long generateTime = 0;... | |
static void dumpRS(ResultSet s) throws SQLException { | public static void dumpRS(ResultSet s) throws SQLException { | static void dumpRS(ResultSet s) throws SQLException { ResultSetMetaData rsmd = s.getMetaData (); // Get the number of columns in the result set int numCols = rsmd.getColumnCount (); if (numCols <= 0) { System.out.println("(no columns!)"); return; } // Display column headings for (int i=1; i<=numCols; i++)... |
try { System.out.println(); System.out.println("getSuperTypes() with null :"); checkEmptyRSOrNotImplemented(met.getSuperTypes(null,null,null),null); } catch (SQLException ex) { checkEmptyRSOrNotImplemented(null,ex); } | System.out.println(); System.out.println("getSuperTypes() with null :"); checkEmptyRS(met.getSuperTypes(null,null,null)); | public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm... |
try { System.out.println(); System.out.println("getSuperTables() with null :"); checkEmptyRSOrNotImplemented(met.getSuperTables(null,null,null),null); } catch (SQLException ex) { checkEmptyRSOrNotImplemented(null,ex); } | System.out.println(); System.out.println("getSuperTables() with null :"); checkEmptyRS(met.getSuperTables(null,null,null)); | public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm... |
try { System.out.println(); System.out.println("getAttributes() with null :"); | System.out.println(); System.out.println("getAttributes() with null :"); | public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm... |
checkEmptyRSOrNotImplemented(met.getAttributes(null, null, null, null), null); } catch (SQLException ex) { checkEmptyRSOrNotImplemented(null,ex); } | checkEmptyRS(met.getAttributes(null, null, null, null)); | public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm... |
try { System.out.println(); System.out.println("locatorsUpdateCopy(): "); System.out.println("Returned: " + met.locatorsUpdateCopy()); } catch (SQLException ex) { System.out.println("Expected : " + ex.getMessage()); } | System.out.println(); System.out.println("locatorsUpdateCopy(): "); System.out.println("Returned: " + met.locatorsUpdateCopy()); | public static void main(String[] args) { DatabaseMetaData met; Connection con; Statement s; System.out.println("Test dbMetaDataJdbc30 starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); con.setAutoComm... |
else return (XADataSource)(Class.forName("org.apache.derby.jdbc.EmbeddedXADataSource").newInstance()); | else { if (JVMInfo.JDK_ID >= JVMInfo.J2SE_16) { try { return (XADataSource)(Class.forName( "org.apache.derby.jdbc." + "EmbeddedXADataSource40").newInstance()); } catch (ClassNotFoundException e) { } } return (XADataSource)(Class.forName("org.apache.derby.jdbc.EmbeddedXADataSource").newInstance()); } | private XADataSource getXADataSource() throws Exception { // We need to construct this object in this round about fashion because // if we new it directly, then it will the tools.jar file to bloat. try { if (isJCC) return (XADataSource) (Class.forName("com.ibm.db2.jcc.DB2XADataSource").newInstance()); ... |
public final void setAsciiStream(int parameterIndex, InputStream x, int length) | public final void setAsciiStream(int parameterIndex, InputStream x, long length) | public final void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; default: throw data... |
public final void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { | public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { | public final void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: break; default: thro... |
int length) throws SQLException { | long length) throws SQLException { | public final void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: case Types.CLOB: break; ... |
if (predicate.isScopedForPush()) { continue; } | public boolean hasOptimizableEquijoin(Optimizable optTable, int columnNumber) throws StandardException { int size = size(); for (int index = 0; index < size; index++) { AndNode andNode; Predicate predicate; predicate = (Predicate) elementAt(index); andNode = (AndNode) predicate.getAndNode(... | |
fail("CallableStatement.setAsciiStream() " + "should not be implemented"); | public void testSetAsciiStream() throws SQLException { try { cStmt.setAsciiStream("Some String",null,0L); } catch(SQLFeatureNotSupportedException sqlfne) { //Do nothing as this is the expected behaviour } } | |
fail("CallableStatement.setBinaryStream() " + "should not be implemented"); | public void testSetBinaryStream() throws SQLException { try { cStmt.setBinaryStream("Some String",null,0L); } catch(SQLFeatureNotSupportedException sqlfne) { //Do nothing as this is the expected behaviour } } | |
fail("CallableStatement.setCharacterStream() " + "should not be implemented"); | public void testSetCharacterStream() throws SQLException { try { cStmt.setCharacterStream("Some String",null,0L); } catch(SQLFeatureNotSupportedException sqlfne) { //Do nothing as this is the expected behaviour } } | |
SQLState.LANG_UNEXPECTED_XML_EXCEPTION, te); | SQLState.LANG_XML_QUERY_ERROR, te); | public void compileXQExpr(String queryExpr) throws StandardException { try { // The following XPath constructor compiles the expression // as part of the construction process. query = new XPath(queryExpr, null, null, XPath.SELECT); } catch (TransformerExcepti... |
String tblname) | boolean create_table, String tblname, int num_rows) | private void createAndLoadTable( Connection conn, String tblname) throws SQLException { Statement s = conn.createStatement(); s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(... |
Statement s = conn.createStatement(); | if (create_table) { Statement s = conn.createStatement(); | private void createAndLoadTable( Connection conn, String tblname) throws SQLException { Statement s = conn.createStatement(); s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(... |
s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(2000))"); | s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(2000))"); s.close(); } | private void createAndLoadTable( Connection conn, String tblname) throws SQLException { Statement s = conn.createStatement(); s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(... |
for (int i = 0; i < 10000; i++) | for (int i = 0; i < num_rows; i++) | private void createAndLoadTable( Connection conn, String tblname) throws SQLException { Statement s = conn.createStatement(); s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(... |
insert_stmt.execute(); } if (create_table) { Statement s = conn.createStatement(); s.execute( "create index " + tblname + "_idx_keycol on " + tblname + "(keycol)"); s.execute( "create index " + tblname + "_idx_indcol1 on " + tblname + "(indcol1)"); s.execute( "create index " + tblname + "_idx_indcol2 on " + tblname +... | private void createAndLoadTable( Connection conn, String tblname) throws SQLException { Statement s = conn.createStatement(); s.execute( "create table " + tblname + "(keycol int, indcol1 int, indcol2 int, indcol3 int, data1 varchar(2000), data2 varchar(... | |
createAndLoadTable(conn, "test1"); | int[] test_cases = {0, 1, 50, 10000}; | private void test1(Connection conn) throws SQLException { beginTest(conn, "test1"); createAndLoadTable(conn, "test1"); OnlineCompress.compressTable("APP", "TEST1", true, true, true); endTest(conn, "test1"); } |
OnlineCompress.compressTable("APP", "TEST1", true, true, true); | for (int i = 0; i < test_cases.length; i++) { row_count_based_tests( conn, true, false, "APP", "TEST1", test_cases[i]); row_count_based_tests( conn, false, true, "APP", "TEST1", test_cases[i]); } | private void test1(Connection conn) throws SQLException { beginTest(conn, "test1"); createAndLoadTable(conn, "test1"); OnlineCompress.compressTable("APP", "TEST1", true, true, true); endTest(conn, "test1"); } |
System.out.println("Notice that connection's holdability at this point is CLOSE_CURSORS_AT_COMMIT because it is part of the global transaction"); System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); | if (TestUtil.isEmbeddedFramework()) { System.out.println("Notice that connection's holdability at this point is CLOSE_CURSORS_AT_COMMIT because it is part of the global transaction"); System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); } | private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = dscsx.getXAConnection("fred", "wilma"); XAResource xr = xa... |
System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); | if (TestUtil.isEmbeddedFramework()) { System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); } | private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = dscsx.getXAConnection("fred", "wilma"); XAResource xr = xa... |
rsx.next(); System.out.println("X@3 id " + rsx.getInt(1)); | if (TestUtil.isEmbeddedFramework()) { rsx.next(); System.out.println("X@3 id " + rsx.getInt(1)); } | private void checkXAHoldability() { System.out.println("START XA HOLDABILITY TEST"); try { Properties attrs = new Properties(); attrs.setProperty("databaseName", "wombat"); XADataSource dscsx = TestUtil.getXADataSource(attrs); XAConnection xac = dscsx.getXAConnection("fred", "wilma"); XAResource xr = xa... |
tester.runTest(args); | if (TestUtil.isEmbeddedFramework()) tester.runTest(args); | public static void main(String[] args) throws Exception { checkDataSource30 tester = new checkDataSource30(); tester.runTest(args); tester.checkXAHoldability(); // Print a report on System.out of the issues // found with the security checks. SecurityCheck.report(); System.out.println("Completed checkDataSou... |
String ccsidSBCEncoding = database.getCurrentStatement().ccsidSBCEncoding; | DRDAStatement currentStatement; currentStatement = database.getCurrentStatement(); if (currentStatement == null) { currentStatement = database.getDefaultStatement(); currentStatement.initialize(); } String ccsidSBCEncoding = currentStatement.ccsidSBCEncoding; System.out.println("ccsidSBCEncoding - " + ccsidSBCEncodin... | private String parseCcsidSBC(int length) throws DRDAProtocolException { String strVal = null; String ccsidSBCEncoding = database.getCurrentStatement().ccsidSBCEncoding; if (length == 0) return null; byte [] byteStr = reader.readBytes(length); if (ccsidSBCEncoding != null) { try { strVal = new String(byteS... |
case CodePoint.QRYOPTVAL: parseQRYOPTVAL(); break; | private String parseOPNQRY() throws DRDAProtocolException, SQLException { String pkgnamcsn = null; boolean gotQryblksz = false; int blksize = 0; int qryblkctl = CodePoint.QRYBLKCTL_DEFAULT; int maxblkext = CodePoint.MAXBLKEXT_DEFAULT; int qryrowset = CodePoint.QRYROWSET_DEFAULT; int qryclsimp = DRDAResultSet.QR... | |
System.out.println("Issue SQL to change isolation in local transaction"); s.executeUpdate("set current isolation = RR"); printState("SQL to change isolation in local", cs1); xid = new cdsXid(1, (byte) 35, (byte) 47); xar.start(xid, XAResource.TMNOFLAGS); printState("1st global(new)", cs1); xar.end(xid, XAResource.TMSU... | if (canSetIsolationWithStatement) testSetIsolationWithStatement(s, xar, cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
showHoldStatus("Local(held) close Prepared", psch); | PreparedStatement psch_d = conn.prepareStatement("DELETE FROM APP.FOO WHERE A < -99", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT); showHoldStatus("Local(held) close Prepared", psch); | private static void derby966(XADataSource xads) { System.out.println("derby966"); try { XAConnection xac = xads.getXAConnection(); XAResource xar = xac.getXAResource(); Xid xid = XATestUtil.getXid(996, 9, 48); Connection conn = xac.get... |
showHoldStatus("Local(close) close Prepared", pscc); | PreparedStatement pscc_d = conn.prepareStatement("DELETE FROM APP.FOO WHERE A < -99", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT); showHoldStatus("Local(close) close Prepared", pscc); | private static void derby966(XADataSource xads) { System.out.println("derby966"); try { XAConnection xac = xads.getXAConnection(); XAResource xar = xac.getXAResource(); Xid xid = XATestUtil.getXid(996, 9, 48); Connection conn = xac.get... |
if (!TestUtil.isDerbyNetClientFramework()) { psdc_d.executeUpdate(); pshc_d.executeUpdate(); pscc_d.executeUpdate(); } | private static void derby966(XADataSource xads) { System.out.println("derby966"); try { XAConnection xac = xads.getXAConnection(); XAResource xar = xac.getXAResource(); Xid xid = XATestUtil.getXid(996, 9, 48); Connection conn = xac.get... | |
rowHolder = new TemporaryRowHolderImpl(tc, properties, resultDescription); | rowHolder = new TemporaryRowHolderImpl(activation, properties, resultDescription); | protected void openCore() throws StandardException { int rowLocationColumn = -1; boolean firstRow = true; rs = activation.getTargetVTI(); ExecRow row = getNextRowCore(sourceResultSet); if( null != row) rowLocationColumn = row.nColumns(); if (!firstExecute) lcc.getStat... |
skipNullKeyColumns); | skipNullKeyColumns, false ); | public void openCore() throws StandardException { TransactionController tc; beginTime = getCurrentTimeMillis(); // source expected to be non-null, mystery stress test bug // - sometimes get NullPointerException in openCore(). if (SanityManager.DEBUG) { SanityManager.ASSERT(source != null, "HTRS().openCo... |
System.out.println("Testing Sysinfo (method)"); NetworkServerControl derbyServer = new NetworkServerControl( InetAddress.getByName("localhost"), NetworkServerControl.DEFAULT_PORTNUMBER); System.out.println(derbyServer.getSysinfo()); System.out.println("End test (method)"); | public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); try { Connection conn1 = ij.st... | |
if(SanityManager.DEBUG) { SanityManager.DEBUG_PRINT("RAFContainer4", "New style readPage attempted with uninitialized ioChannel"); } | protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { FileChannel ioChannel; synchronized (this) { ioChannel = ourChannel; if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); }... | |
if(SanityManager.DEBUG) { SanityManager.DEBUG_PRINT("RAFContainer4", "New style writePage attempted with uninitialized ioChannel"); } | protected void writePage(long pageNumber, byte[] pageData, boolean syncPage) throws IOException, StandardException { FileChannel ioChannel; synchronized(this) { // committed and dropped, do nothing. // This file container may only be a stub if (getCommittedD... | |
((ParameterNode) operand).setDescriptor( new DataTypeDescriptor(TypeId.getBuiltInTypeId(Types.VARCHAR), true)); | operand.setType(new DataTypeDescriptor(TypeId.getBuiltInTypeId(Types.VARCHAR), true)); | void bindParameter() throws StandardException { /* ** If IS [NOT] NULL has a ? operand, we assume ** its type is varchar with the implementation-defined maximum length ** for a varchar. */ ((ParameterNode) operand).setDescriptor( new DataTypeDescriptor(TypeId.getBuiltInTypeId(Types.VARCHAR), true)); } |
singleLegXA = Boolean.valueOf(props.getProperty(KEY_SINGLE_LEG_XA) ).booleanValue(); | private TestConfiguration(Properties props) throws NumberFormatException { systemStartupProperties = props; dbName = props.getProperty(KEY_DBNAME, DEFAULT_DBNAME); userName = props.getProperty(KEY_USER_NAME, DEFAULT_USER_NAME); userPassword = props.getProperty(KEY_USER_PASSWORD, ... | |
public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql, Object generatedKeys) throws SQLException { return new BrokeredPreparedStatement40(statementControl, getJDBCLevel(), sql, generatedKeys); | public BrokeredStatement newBrokeredStatement (BrokeredStatementControl statementControl) throws SQLException { return new BrokeredStatement40(statementControl, getJDBCLevel()); | public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql, Object generatedKeys) throws SQLException { return new BrokeredPreparedStatement40(statementControl, getJDBCLevel(), sql, generatedKeys); } |
dd.getDependencyManager().invalidateFor(tablePermsDesc, DependencyManager.REVOKE_PRIVILEGE, lcc); | privileges_revoked = true; dd.getDependencyManager().invalidateFor(tablePermsDesc, DependencyManager.REVOKE_PRIVILEGE, lcc); | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... |
if (dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc)) dd.getDependencyManager().invalidateFor(colPermsDescs[i], DependencyManager.REVOKE_PRIVILEGE, lcc); | if (dd.addRemovePermissionsDescriptor( grant, colPermsDescs[i], grantee, tc)) { privileges_revoked = true; dd.getDependencyManager().invalidateFor(colPermsDescs[i], DependencyManager.REVOKE_PRIVILEGE, lcc); } | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... |
addWarningIfPrivilegeNotRevoked(activation, grant, privileges_revoked, grantee); | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); String currentUser = lcc.getAuthorizationId(); TransactionControll... | |
throw new java.lang.IllegalArgumentException("Precision exceeds 31 digits!"); | throw new java.lang.IllegalArgumentException( MessageUtil.getCompleteMessage("J105", SqlException.CLIENT_MESSAGE_RESOURCE_NAME, (Object[])null)); | static public int computeBigDecimalPrecision(java.math.BigDecimal decimal) { byte[] bBytes = decimal.unscaledValue().abs().toByteArray(); if (byteArrayCmp(bBytes, tenRadixArr[tenRadixArr.length - 1]) >= 0) { throw new java.lang.IllegalArgumentException("Precision exceeds 31 digits!"); ... |
throws StandardException | public double selectivity(Optimizable optTable) { return andNode.getLeftOperand().selectivity(optTable); } | |
for (int i = 0; i < currentRequiredLength; i++) { if (required[i] != 0) { firstMissing = required[i]; break; } | for (int i = 0; i < currentRequiredLength; i++) { if (required[i] != 0) { firstMissing = required[i]; break; | private void checkRequired(int codePoint) throws DRDAProtocolException { int firstMissing = 0; for (int i = 0; i < currentRequiredLength; i++) { if (required[i] != 0) { firstMissing = required[i]; break; } } if (firstMissing != 0) missingCodePoint(firstMissing); } |
} | private void checkRequired(int codePoint) throws DRDAProtocolException { int firstMissing = 0; for (int i = 0; i < currentRequiredLength; i++) { if (required[i] != 0) { firstMissing = required[i]; break; } } if (firstMissing != 0) missingCodePoint(firstMissing); } | |
} | private void doneData(DRDAStatement stmt, ResultSet rs) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("*****NO MORE DATA!!"); int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; if (rs != null) { if (stmt.isScrollable()) { //keep isAft... | |
catch (Exception e) { println2Log(database.dbName, session.drdaID, "Driver not loaded" + e.getMessage()); try { agentError("Driver not loaded"); } catch (DRDAProtocolException dpe) { try { server.startNetworkServer(); } catch (Exception re) { println2Log(database.dbName, session.drdaID, "Failed attempt to reloa... | private int getConnFromDatabaseName() throws DRDAProtocolException { Properties p = new Properties(); databaseAccessException = null; //if we haven't got the correlation token yet, use session number for drdaID if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(Attri... | |
switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: | switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; case ExceptionSeverity.WARNING_SEVERITY: severity = CodePoint.SVRCOD_WARNING; break; case ExceptionSeverity.SESSION_SEVERITY: case ExceptionSeverity.DATABASE_SEVERITY: case Exc... | private int getExceptionSeverity (SQLException e) { int severity= CodePoint.SVRCOD_INFO; if (e == null) return severity; int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; ... |
break; case ExceptionSeverity.WARNING_SEVERITY: severity = CodePoint.SVRCOD_WARNING; break; case ExceptionSeverity.SESSION_SEVERITY: case ExceptionSeverity.DATABASE_SEVERITY: case ExceptionSeverity.SYSTEM_SEVERITY: severity = CodePoint.SVRCOD_SESDMG; break; default: String sqlState = e.getSQLState(); if (sqlState != nu... | } | private int getExceptionSeverity (SQLException e) { int severity= CodePoint.SVRCOD_INFO; if (e == null) return severity; int ec = e.getErrorCode(); switch (ec) { case ExceptionSeverity.STATEMENT_SEVERITY: case ExceptionSeverity.TRANSACTION_SEVERITY: severity = CodePoint.SVRCOD_ERROR; break; ... |
} 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,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.