rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
} } catch (StandardException e) { e.printStackTrace(); throw new IOException(e.getMessage()); | } catch (IOException ioe) { | private void closeIn() throws IOException { if (in != null) { try { if(in instanceof Resetable){ ((Resetable) in).resetStream(); }else{ in.close(); } } catch (StandardException e) { e.printStackTrace(); throw new IOException(e.getMessage()); } finally... |
private IOException utfFormatException(String s) throws IOException { | private IOException utfFormatException(String s) { | private IOException utfFormatException(String s) throws IOException { noMoreReads = true; closeIn(); return new UTFDataFormatException(s); } |
this.isolationLevelSetUsingSQLorJDBC = true; | public void setIsolationLevel(int isolationLevel) throws StandardException { StatementContext stmtCtxt = getStatementContext(); if (stmtCtxt!= null && stmtCtxt.inTrigger()) throw StandardException.newException(SQLState.LANG_NO_XACT_IN_TRIGGER, getTriggerExecutionContext().toString()); // find if there are any hel... | |
jvmProps.addElement("user.language=en"); jvmProps.addElement("user.country=US"); | public void start() throws Exception { if (! startServer) { System.out.println("startServer = false. Bypass server startup"); return; } // Create the Server directory under the server dir (new File(homeDir, framework + "Server")).mkdir(); String[] startcmd = (String[]) frameworkInfo[START_CMD_POS];... | |
throws StandardException | boolean allSamePrecendence(int precedence) { boolean allSame = true; int size = size(); for (int index = 0; index < size; index++) { ValueNode valueNode; valueNode = (ValueNode) elementAt(index); DataTypeDescriptor valueNodeDTS = valueNode.getTypeServices(); if (valueNodeDTS == null) { return false;... | |
if (valueNode.isParameterNode()) | if (valueNode.requiresTypeFromContext()) | public void compatible(ValueNode leftOperand) throws StandardException { int size = size(); TypeId leftType; ValueNode valueNode; TypeCompiler leftTC; leftType = leftOperand.getTypeId(); leftTC = leftOperand.getTypeCompiler(); for (int index = 0; index < size; index++) { valueNode = (ValueNode) elementAt... |
if (! (((ValueNode) elementAt(index)).isParameterNode())) | if (! (((ValueNode) elementAt(index)).requiresTypeFromContext())) | public boolean containsAllParameterNodes() { int size = size(); for (int index = 0; index < size; index++) { if (! (((ValueNode) elementAt(index)).isParameterNode())) { return false; } } return true; } |
if (((ValueNode) elementAt(index)).isParameterNode()) | if (((ValueNode) elementAt(index)).requiresTypeFromContext()) | public boolean containsParameterNode() { int size = size(); for (int index = 0; index < size; index++) { if (((ValueNode) elementAt(index)).isParameterNode()) { return true; } } return false; } |
if (valueNode.isParameterNode()) | if (valueNode.requiresTypeFromContext()) | public DataTypeDescriptor getDominantTypeServices() throws StandardException { DataTypeDescriptor dominantDTS = null; for (int index = 0; index < size(); index++) { ValueNode valueNode; valueNode = (ValueNode) elementAt(index); if (valueNode.isParameterNode()) continue; DataTypeDescriptor valueNodeDTS ... |
throws StandardException | public boolean isNullable() { int size = size(); for (int index = 0; index < size; index++) { if (((ValueNode) elementAt(index)).getTypeServices().isNullable()) { return true; } } return false; } | |
if (valueNode.isParameterNode()) | if (valueNode.requiresTypeFromContext()) | public void setParameterDescriptor(DataTypeDescriptor descriptor) throws StandardException { int size = size(); ValueNode valueNode; for (int index = 0; index < size; index++) { valueNode = (ValueNode) elementAt(index); if (valueNode.isParameterNode()) { ((ParameterNode) valueNode).setDescriptor(desc... |
((ParameterNode) valueNode).setDescriptor(descriptor); | valueNode.setType(descriptor); | public void setParameterDescriptor(DataTypeDescriptor descriptor) throws StandardException { int size = size(); ValueNode valueNode; for (int index = 0; index < size; index++) { valueNode = (ValueNode) elementAt(index); if (valueNode.isParameterNode()) { ((ParameterNode) valueNode).setDescriptor(desc... |
if ((xaState == XA_OPEN_IDLE) || (xaState == XA_LOCAL) || (xaState == XA_LOCAL_START_SENT)) { | if (xaState == XA_LOCAL) { | public boolean willAutoCommitGenerateFlow() { // this logic must be in sync with writeCommit() logic if (!autoCommit_) { return false; } if (!isXAConnection_) { return true; } boolean doCommit = false; int xaState = getXAState(); if ((xaS... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public void commit(Xid xid, boolean onePhase) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "commit", xid, onePhase); } ... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public void commit(Xid xid, boolean onePhase) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "commit", xid, onePhase); } ... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public void end(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "end", xid, flags); } if (conn_.isPhysica... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public void end(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "end", xid, flags); } if (conn_.isPhysica... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public void forget(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "forget", xid); } if (conn_.isPhysicalConnClosed(... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public void forget(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "forget", xid); } if (conn_.isPhysicalConnClosed(... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public int prepare(Xid xid) throws XAException { // public interface for prepare // just call prepareX with the recursion flag set to true exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "prepare", xid); } if (conn_.i... |
if ((callInfo.xaRetVal_ != XARETVAL_XAOK) && (callInfo.xaRetVal_ != XARETVAL_XARDONLY)) { | if ((callInfo.xaRetVal_ != XAResource.XA_OK) && (callInfo.xaRetVal_ != XAException.XA_RDONLY)) { | public int prepare(Xid xid) throws XAException { // public interface for prepare // just call prepareX with the recursion flag set to true exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "prepare", xid); } if (conn_.i... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public Xid[] recover(int flag) throws XAException { int rc = XAResource.XA_OK; NetAgent netAgent = conn_.netAgent_; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "recover", flag); } exceptionsOnXA = null; if (conn_.isPhysicalConnCl... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public Xid[] recover(int flag) throws XAException { int rc = XAResource.XA_OK; NetAgent netAgent = conn_.netAgent_; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "recover", flag); } exceptionsOnXA = null; if (conn_.isPhysicalConnCl... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public void rollback(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "rollback", xid); } if (conn_.isPhysicalConnClo... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public void rollback(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "rollback", xid); } if (conn_.isPhysicalConnClo... |
callInfo.xaRetVal_ = XARETVAL_XAOK; | callInfo.xaRetVal_ = XAResource.XA_OK; | public synchronized void start(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "start", xid, flags); } if... |
if (callInfo.xaRetVal_ != XARETVAL_XAOK) { | if (callInfo.xaRetVal_ != XAResource.XA_OK) { | public synchronized void start(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "start", xid, flags); } if... |
if (rc == XARETVAL_XAOK) { | if (rc == XAResource.XA_OK) { | public synchronized void start(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "start", xid, flags); } if... |
int rc; switch (callInfo.xaRetVal_) { case XARETVAL_XAOK: case XARETVAL_NODISSOCIATE: rc = XAResource.XA_OK; break; case XARETVAL_XALCSNOTSUPP: rc = XAResource.XA_OK; break; case XARETVAL_RBROLLBACK: rc = XAException.XA_RBROLLBACK; break; case XARETVAL_RBOTHER: rc = XAException.XA_RBOTHER; break; case XARETVAL_RBDEADLO... | int rc = callInfo.xaRetVal_; | protected int xaRetValErrorAccumSQL(NetXACallInfo callInfo, int currentRC) { int rc; switch (callInfo.xaRetVal_) { case XARETVAL_XAOK: case XARETVAL_NODISSOCIATE: rc = XAResource.XA_OK; break; case XARETVAL_XALCSNOTSUPP: rc = XAResource.XA_OK; ... |
colDesc.setTableDescriptor(tableDescriptor); | public ResultColumnList genResultColList() throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; ColumnDescriptor colDesc = null; TableName exposedName; /* Cache exposed name for this table. * The exposed name becomes the qualifier for ... | |
if ( appRequester.getClientType() != AppRequester.DNC_CLIENT || appRequester.greaterThanOrEqualTo(10,3,0) ) { if (!rdbnam.toString().equals(database.dbName)) rdbnamMismatch(CodePoint.PKGNAMCSN); } | private Pkgnamcsn parsePKGNAMCSN() throws DRDAProtocolException { if (reader.getDdmLength() == CodePoint.PKGNAMCSN_LEN) { // This is a scalar object with the following fields reader.readString(rdbnam, CodePoint.RDBNAM_LEN, true); if (SanityManager.DEBUG) trace("rdbnam = " + rdbnam); reader.readString(rdb... | |
a.authorize(Authorizer.PROPERTY_WRITE_OP); | a.authorize((Activation) null, Authorizer.PROPERTY_WRITE_OP); | public static void setDatabaseProperty(String key, String value) throws SQLException { LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); try { Authorizer a = lcc.getAuthorizer(); a.authorize(Authorizer.PROPERTY_WRITE_OP); // Get the current transaction controller TransactionController t... |
bestCostEstimate.isUninitialized() || | public void considerCost(Optimizable optimizable, OptimizablePredicateList predList, CostEstimate estimatedCost, CostEstimate outerCost) throws StandardException { /* ** Don't consider non-feasible join strategies. */ if ( ! optimizable.feasibleJoinStrategy(predList, this)) { return; } ... | |
bestCostEstimate.isUninitialized() || | private void costBasedCostOptimizable(Optimizable optimizable, TableDescriptor td, ConglomerateDescriptor cd, OptimizablePredicateList predList, CostEstimate outerCost) throws StandardException { CostEstimate estimatedCost = estimateTotalCost(predList, cd, ... | |
if ((! foundABestPlan) || currentCost.compare(bestCost) < 0) | if ((! foundABestPlan) || (currentCost.compare(bestCost) < 0) || bestCost.isUninitialized()) | public boolean getNextDecoratedPermutation() throws StandardException { boolean retval; Optimizable curOpt = optimizableList.getOptimizable(proposedJoinOrder[joinPosition]); double originalRowCount = 0.0; // RESOLVE: Should we step through the different join strategies here? /* Returns true until all acc... |
if (currentSortAvoidanceCost.compare(bestCost) <= 0) | if ((currentSortAvoidanceCost.compare(bestCost) <= 0) || bestCost.isUninitialized()) | public boolean getNextDecoratedPermutation() throws StandardException { boolean retval; Optimizable curOpt = optimizableList.getOptimizable(proposedJoinOrder[joinPosition]); double originalRowCount = 0.0; // RESOLVE: Should we step through the different join strategies here? /* Returns true until all acc... |
optimizerEstimatedCost, closeCleanup); | optimizerEstimatedCost, null, closeCleanup); | public MergeJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod leftGreaterThanRight, GeneratedMethod restriction, int resultSetNumber, boo... |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return "java.lang.Integer"; } } | public String getParameterClassName(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return "java.lang.Integer"; } } return columnMetaData_.getColumnClassName(param); } | |
if (escapedProcedureCallWithResult_) { return columnMetaData_.columns_++; } | public int getParameterCount() throws SQLException { if (escapedProcedureCallWithResult_) { return columnMetaData_.columns_++; } return columnMetaData_.columns_; } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.ParameterMetaData.parameterModeOut; } } | public int getParameterMode(int param) throws SQLException { try { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.ParameterMetaData.parameterModeOut; } } columnMetaData_.... | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.Types.INTEGER; } } | public int getParameterType(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.Types.INTEGER; } } return columnMetaData_.getColumnType(param); } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return "INTEGER"; } } | public String getParameterTypeName(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return "INTEGER"; } } return columnMetaData_.getColumnTypeName(param); } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return 10; } } | public int getPrecision(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return 10; } } return columnMetaData_.getPrecision(param); } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return 0; } } | public int getScale(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return 0; } } return columnMetaData_.getScale(param); } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.ResultSetMetaData.columnNoNulls; } } | public int isNullable(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return java.sql.ResultSetMetaData.columnNoNulls; } } return columnMetaData_.isNullable(param); } | |
if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return true; } } | public boolean isSigned(int param) throws SQLException { if (escapedProcedureCallWithResult_) { param--; if (param == 0) { return true; } } return columnMetaData_.isSigned(param); } | |
gpClone.setStorableDataValue(this.getValue().getClone(), jdbcTypeId, declaredClassName); | gpClone.initialize(this.getValue().getClone(), jdbcTypeId, declaredClassName); | public GenericParameter getClone(GenericParameterValueSet pvs) { GenericParameter gpClone = new GenericParameter(pvs, isReturnOutputParameter); gpClone.setStorableDataValue(this.getValue().getClone(), jdbcTypeId, declaredClassName); gpClone.isSet = true; return gpClone; } |
this.setResultSetHoldability(CLOSE_CURSORS_AT_COMMIT); | public ClientXADataSource() { this.setResultSetHoldability(CLOSE_CURSORS_AT_COMMIT); } | |
ps.setQueryTimeout(timeoutMillis); ResultSet resultsToWrap = ps.execute(a, executeQuery, executeUpdate, false); | ResultSet resultsToWrap = ps.execute(a, executeQuery, executeUpdate, false, timeoutMillis); | protected boolean executeStatement(Activation a, boolean executeQuery, boolean executeUpdate) throws SQLException { // we don't differentiate the update from the resultset case. // so, there could be a result set. // note: the statement interface will paste together // an ac... |
case StoredFormatIds.COLUMNS_PERMISSION_FINDER_V01_ID: return new DDColumnPermissionsDependableFinder(fmtId); | public Object getNewInstance() { switch (fmtId) { /* DependableFinders */ case StoredFormatIds.ALIAS_DESCRIPTOR_FINDER_V01_ID: case StoredFormatIds.CONGLOMERATE_DESCRIPTOR_FINDER_V01_ID: case StoredFormatIds.CONSTRAINT_DESCRIPTOR_FINDER_V01_ID: case StoredFormatIds.DEFAULT_DESCRIPTOR_FINDER_V01_ID: ca... | |
int[] rsDrdaTypes = currentDrdaRs.getRsDRDATypes(); | int[] rsDrdaTypes = getRsDRDATypes(); | protected int getNumRsCols() { int[] rsDrdaTypes = currentDrdaRs.getRsDRDATypes(); if (rsDrdaTypes != null) return rsDrdaTypes.length; else return 0; } |
ResultSet rs = getResultSet(rsNum); return rs.getCursorName(); | DRDAResultSet drdaRs = getDrdaResultSet(rsNum); return drdaRs.getResultSetCursorName(); | public String getResultSetCursorName(int rsNum) throws SQLException { ResultSet rs = getResultSet(rsNum); return rs.getCursorName(); } |
public ResultSet executeQuery() throws SQLException | public ResultSet executeQuery(String sql) throws SQLException | public ResultSet executeQuery() throws SQLException { throw new SQLException("executeQuery"); } |
Logs.reportString(" Foreign\n"); | Logs.reportMessage("CSLOOK_ForeignHeader"); | private static void createKeysFrom (ResultSet rs) throws SQLException { boolean firstTime = true; while (rs.next()) { if (!rs.getBoolean(7)) // this row is NOT for a constraint, so skip it. continue; String tableId = rs.getString(3); String tableName = dblook.lookupTableId(tableId); if (dblook.isExclud... |
Logs.reportString(" Primary/unique\n"); | Logs.reportMessage("CSLOOK_PrimUniqueHeader"); | private static void createKeysFrom (ResultSet rs) throws SQLException { boolean firstTime = true; while (rs.next()) { if (!rs.getBoolean(7)) // this row is NOT for a constraint, so skip it. continue; String tableId = rs.getString(3); String tableName = dblook.lookupTableId(tableId); if (dblook.isExclud... |
Logs.reportMessage("CSLOOK_Header", "keys"); | Logs.reportMessage("CSLOOK_KeysHeader"); | private static void printHeader() { if (printedHeader) return; Logs.reportString("----------------------------------------------"); Logs.reportMessage("CSLOOK_Header", "keys"); Logs.reportString("----------------------------------------------\n"); printedHeader = true; } |
private SqlCode(int code) { | public SqlCode(int code) { | private SqlCode(int code) { code_ = code; } |
this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides; | public TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qua... | |
int year = 1000 * getDigit(s, 0); year += 100 * getDigit(s, 1); year += 10 * getDigit(s, 2); year += 1 * getDigit(s, 3); char hyphen = s.charAt(4); if (hyphen != '-') { throw new java.lang.IllegalArgumentException(formatError); } int month = 0; int day = 0; int pos = 0; hyphen = s.charAt(6); if (hyphen == '-') { mon... | s = s.trim(); return java.sql.Date.valueOf(s); | final java.sql.Date date_valueOf(String s) throws java.lang.IllegalArgumentException { String formatError = "JDBC Date format must be yyyy-mm-dd"; if (s == null) { throw new java.lang.IllegalArgumentException(formatError); } int year = 1000 * getDigit(s, 0); year += 100... |
int hour = 10 * getDigit(s, 0); hour += 1 * getDigit(s, 1); char colon = s.charAt(2); if (colon != ':' && colon != '.') { throw new java.lang.IllegalArgumentException(formatError); } int minute = 10 * getDigit(s, 3); minute += 1 * getDigit(s, 4); colon = s.charAt(5); if (colon != ':' && colon != '.') { throw new jav... | s = s.trim(); return java.sql.Time.valueOf(s); | final java.sql.Time time_valueOf(String s) throws java.lang.IllegalArgumentException, NumberFormatException { String formatError = "JDBC Time format must be hh:mm:ss"; if (s == null) { throw new java.lang.IllegalArgumentException(); } int hour = 10 * getDigit(s, 0); hou... |
int year = 1000 * getDigit(s, 0); year += 100 * getDigit(s, 1); year += 10 * getDigit(s, 2); year += 1 * getDigit(s, 3); char hyphen = s.charAt(4); if (hyphen != '-') { throw new java.lang.IllegalArgumentException(formatError); } int month = 10 * getDigit(s, 5); month += 1 * getDigit(s, 6); hyphen = s.charAt(7); if ... | s = s.trim(); return java.sql.Timestamp.valueOf(s); | final java.sql.Timestamp timestamp_valueOf(String s) throws java.lang.IllegalArgumentException, NumberFormatException { String formatError = "JDBC Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff"; if (s == null) { throw new java.lang.IllegalArgumentException(); } int ye... |
(int) vcl, 0), (int) vcl); | (int) vcl, 0, TypeId.CLOB_NAME), (int) vcl); | final void setObject(Object theValue) throws StandardException { Clob vc = (Clob) theValue; try { long vcl = vc.length(); if (vcl < 0L || vcl > Integer.MAX_VALUE) throw this.outOfRange(); setValue(new ReaderToUTF8Stream(vc.g... |
checkIfClosed(); | public <T> T unwrap(java.lang.Class<T> interfaces) throws SQLException{ //Derby does not implement non-standard methods on //JDBC objects try { return interfaces.cast(this); } catch (ClassCastException cce) { throw Util.generateCsSQLExce... | |
return new BigDecimal(value); | return new BigDecimal(Float.toString(value)); | public BigDecimal getBigDecimal() { if (isNull()) return null; return new BigDecimal(value); } |
throws SQLException{ | throws SQLClientInfoException{ Properties p = FailedProperties40.makeProperties(name,value); | public void setClientInfo(String name, String value) throws SQLException{ try { checkForClosedConnection(); } catch (SqlException se) { throw se.getSQLException(); } if (name == null && value == null) { return; } Properties p = new Properties(); p.setProperty(name, value); ... |
catch (SqlException se) { throw se.getSQLException(); } | catch (SqlException se) { throw new SQLClientInfoException (se.getMessage(), se.getSQLState(), new FailedProperties40(p).getProperties()); } | public void setClientInfo(String name, String value) throws SQLException{ try { checkForClosedConnection(); } catch (SqlException se) { throw se.getSQLException(); } if (name == null && value == null) { return; } Properties p = new Properties(); p.setProperty(name, value); ... |
Properties p = new Properties(); p.setProperty(name, value); | public void setClientInfo(String name, String value) throws SQLException{ try { checkForClosedConnection(); } catch (SqlException se) { throw se.getSQLException(); } if (name == null && value == null) { return; } Properties p = new Properties(); p.setProperty(name, value); ... | |
clientMessageIds.add(SQLState.INVALID_RESULTSET_CONCURRENCY); | static void initClientMessageIds() { // Add message ids that don't start with XJ here clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION); clientMessageIds.add(SQLState.NOT_IMPLEMENTED); clientMessageIds.add(SQLState.CANNOT_CLOSE_ACTIVE_CONNECTION); clientMessageIds.add(SQLSta... | |
clientMessageIds.add(SQLState.INSENSITIVE_UPDATABLE_NOT_SUPPORTED); | static void initClientMessageIds() { // Add message ids that don't start with XJ here clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION); clientMessageIds.add(SQLState.NOT_IMPLEMENTED); clientMessageIds.add(SQLState.CANNOT_CLOSE_ACTIVE_CONNECTION); clientMessageIds.add(SQLSta... | |
public Reader getCharacterStream(int parameterIndex) | public Reader getCharacterStream(String parameterName) | public Reader getCharacterStream(int parameterIndex) throws SQLException { throw Util.notImplemented(); } |
DataDictionary dd; AggregateNode aggregate = null; ColumnReference newColumnRef; ResultColumn rcBottom; ResultColumn newRC; ResultColumn gbRC; ResultColumn tmpRC; ResultColumn aggInputRC; ResultColumnList bottomRCL = childResult.getResultColumns(); ResultColumnList groupByRCL = resultColumns; ResultColumnList aggRCL... | private void addNewColumnsForAggregation() throws StandardException { /* ** Now we have two new nodes, the sort and a new PR above ** it. They all map to the child result set. Now we must ** find every aggregate and massage the tree. For now we ** will examine every result column of the original select ** li... | |
CollectNodesVisitor getUnaggVisitor = new CollectNodesVisitor(ColumnReference.class, AggregateNode.class); parent.getResultColumns().accept(getUnaggVisitor); Vector colRefVector = getUnaggVisitor.getList(); int crvSize = colRefVector.size(); for (int index = 0; index < crvSize; index++) | if (groupingList != null) | private void addNewColumnsForAggregation() throws StandardException { /* ** Now we have two new nodes, the sort and a new PR above ** it. They all map to the child result set. Now we must ** find every aggregate and massage the tree. For now we ** will examine every result column of the original select ** li... |
ColumnReference origColumnRef = (ColumnReference) colRefVector.elementAt(index); newColumnRef = (ColumnReference)origColumnRef.getClone(); newRC = (ResultColumn) getNodeFactory().getNode( C_NodeTypes.RESULT_COLUMN, "##UnaggColumn", newColumnRef, getContextManager()); newRC.setExpression(newColumnRef); bottomRCL.addEl... | addUnAggColumns(); | private void addNewColumnsForAggregation() throws StandardException { /* ** Now we have two new nodes, the sort and a new PR above ** it. They all map to the child result set. Now we must ** find every aggregate and massage the tree. For now we ** will examine every result column of the original select ** li... |
ReplaceAggregatesWithCRVisitor replaceAggsVisitor = new ReplaceAggregatesWithCRVisitor( (ResultColumnList) getNodeFactory().getNode( C_NodeTypes.RESULT_COLUMN_LIST, getContextManager()), ((FromTable) childResult).getTableNumber()); parent.getResultColumns().accept(replaceAggsVisitor); int alSize = aggregateVector.siz... | addAggregateColumns(); | private void addNewColumnsForAggregation() throws StandardException { /* ** Now we have two new nodes, the sort and a new PR above ** it. They all map to the child result set. Now we must ** find every aggregate and massage the tree. For now we ** will examine every result column of the original select ** li... |
for (int index = 0; index < glSize; index++) | int index; for (index = 0; index < glSize; index++) | public void init( Object bottomPR, Object groupingList, Object aggregateVector, Object tableProperties) throws StandardException { super.init(bottomPR, tableProperties); /* Group by without aggregates gets xformed into distinct */ if (SanityManager.DEBUG) { SanityManager.ASSERT(((Vector) a... |
crs[index] = gc.getColumnReference(); | if (gc.getColumnExpression() instanceof ColumnReference) { crs[index] = (ColumnReference)gc.getColumnExpression(); } else { isInSortedOrder = false; break; } | public void init( Object bottomPR, Object groupingList, Object aggregateVector, Object tableProperties) throws StandardException { super.init(bottomPR, tableProperties); /* Group by without aggregates gets xformed into distinct */ if (SanityManager.DEBUG) { SanityManager.ASSERT(((Vector) a... |
isInSortedOrder = childResult.isOrderedOn(crs, true, (Vector)null); | if (index == glSize) { isInSortedOrder = childResult.isOrderedOn(crs, true, (Vector)null); } | public void init( Object bottomPR, Object groupingList, Object aggregateVector, Object tableProperties) throws StandardException { super.init(bottomPR, tableProperties); /* Group by without aggregates gets xformed into distinct */ if (SanityManager.DEBUG) { SanityManager.ASSERT(((Vector) a... |
public ResultColumnList getAllResultColumns(String allTableName) | public ResultColumnList getAllResultColumns(TableName allTableName) | public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; String columnName; if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } rcList = (ResultColumnLi... |
if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } | if(allTableName != null) toCompare = makeTableName(allTableName.getSchemaName(),correlationName); else toCompare = makeTableName(null,correlationName); if ( allTableName != null && ! allTableName.equals(toCompare)) { return null; } | public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; String columnName; if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } rcList = (ResultColumnLi... |
if (Boolean.getBoolean("ij.showErrorCode")) { | if (showErrorCode) { | private void handleSQLException(LocalizedOutput out, SQLException e) throws ijFatalException { String errorCode; String sqlState = null; SQLException fatalException = null; if (Boolean.getBoolean("ij.showErrorCode")) { errorCode = langUtil.getTextMessage("IJ_Erro0", langUtil.getNumberAsString(e.getErrorCode... |
private void runScriptGuts() { | private int runScriptGuts() { | private void runScriptGuts() { boolean done = false; String command = null; while (!ijParser.exit && !done) { try{ ijParser.setConnection(connEnv[currCE], (numConnections > 1)); } catch(Throwable t){ //do nothing } connEnv[currCE].doPrompt(true, out); try { command = null; out.flush()... |
return scriptErrorCount; | private void runScriptGuts() { boolean done = false; String command = null; while (!ijParser.exit && !done) { try{ ijParser.setConnection(connEnv[currCE], (numConnections > 1)); } catch(Throwable t){ //do nothing } connEnv[currCE].doPrompt(true, out); try { command = null; out.flush()... | |
public ResultColumnList getAllResultColumns(String allTableName) | public ResultColumnList getAllResultColumns(TableName allTableName) | public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { ResultColumnList rcList = null; TableName exposedName; if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } /* Cache exposed name for this table. * The exposed name becomes the qua... |
if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } | if(allTableName != null) toCompare = makeTableName(allTableName.getSchemaName(),correlationName); else toCompare = makeTableName(null,correlationName); if ( allTableName != null && ! allTableName.equals(toCompare)) { return null; } | public ResultColumnList getAllResultColumns(String allTableName) throws StandardException { ResultColumnList rcList = null; TableName exposedName; if (allTableName != null && ! allTableName.equals(getExposedName())) { return null; } /* Cache exposed name for this table. * The exposed name becomes the qua... |
return newEmbedSQLException(SQLState.NOT_IMPLEMENTED, new Object[] {MessageService.getTextMessage(MessageId.CONN_NO_DETAILS)}, StandardException.getSeverityFromIdentifier(SQLState.NOT_IMPLEMENTED)); | return notImplemented( MessageService.getTextMessage(MessageId.CONN_NO_DETAILS) ); | public static SQLException notImplemented() { return newEmbedSQLException(SQLState.NOT_IMPLEMENTED, new Object[] {MessageService.getTextMessage(MessageId.CONN_NO_DETAILS)}, StandardException.getSeverityFromIdentifier(SQLState.NOT_IMPLEMENTED)); } |
private long setJar(final String jarExternalName, final InputStream contents) | private long setJar(final String jarExternalName, final InputStream contents, final boolean add, final long currentGenerationId) | private long setJar(final String jarExternalName, final InputStream contents) throws StandardException { try { return ((Long) AccessController .doPrivileged(new java.security.PrivilegedExceptionAction() { public Object run() throws StandardExcep... |
long generatedId = fr.add(jarExternalName, contents); return new Long(generatedId); | long generationId; if (add) generationId = fr.add(jarExternalName, contents); else generationId = fr.replace(jarExternalName, currentGenerationId, contents); return new Long(generationId); | private long setJar(final String jarExternalName, final InputStream contents) throws StandardException { try { return ((Long) AccessController .doPrivileged(new java.security.PrivilegedExceptionAction() { public Object run() throws StandardExcep... |
long generatedId = fr.add(jarExternalName, contents); return new Long(generatedId); | long generationId; if (add) generationId = fr.add(jarExternalName, contents); else generationId = fr.replace(jarExternalName, currentGenerationId, contents); return new Long(generationId); | public Object run() throws StandardException { long generatedId = fr.add(jarExternalName, contents); return new Long(generatedId); } |
SanityManager.DEBUG_PRINT("FileContainer", "got exception from initPage:" + "\nreuse = " + reuse + "\ncreatePageArgs[1] = " + createPageArgs[1] + "\nallocPage = " + allocPage ); | if (SanityManager.DEBUG) { SanityManager.DEBUG_PRINT("FileContainer", "got exception from initPage:" + "\nreuse = " + reuse + "\ncreatePageArgs[1] = " + createPageArgs[1] + "\nallocPage = " + allocPage ); } | protected BasePage newPage(BaseContainerHandle userHandle, RawTransaction ntt, BaseContainerHandle allocHandle, boolean isOverflow) throws StandardException { // NOTE: we are single threaded thru this method, see MT comment boolean useNTT = (ntt != null); // if ntt is null, use user t... |
if (testCondition.isParameterNode()) | if (testCondition.requiresTypeFromContext()) | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { testCondition = testCondition.bindExpression(fromList, subqueryList, aggregateVector); if (thisIsNullIfNode) { //for NULLIF(V1,V2), parser binds thenElseList.elementAt(0) to unty... |
((ParameterNode) testCondition).setDescriptor( | testCondition.setType( | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { testCondition = testCondition.bindExpression(fromList, subqueryList, aggregateVector); if (thisIsNullIfNode) { //for NULLIF(V1,V2), parser binds thenElseList.elementAt(0) to unty... |
if (thenExpression.isParameterNode()) | if (thenExpression.requiresTypeFromContext()) | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { testCondition = testCondition.bindExpression(fromList, subqueryList, aggregateVector); if (thisIsNullIfNode) { //for NULLIF(V1,V2), parser binds thenElseList.elementAt(0) to unty... |
conn.setAutoCommit(false); | protected synchronized Connection makeConnection(Properties p) throws SQLException { if (xaDataSource == null) { xaDataSource = new EmbeddedXADataSource(); } xaDataSource.setDatabaseName(shortDbName); appendAttrString(p); if (attrString != null) xaDataSource.setConnectionAttributes(attrString); Connection... | |
private void addDatabase(String dbname) { Database db; if (appRequester.isXARequester()) { db = new XADatabase(dbname); | private void addDatabase(String dbname) { Database db; if (appRequester.isXARequester()) { db = new XADatabase(dbname); } else db = new Database(dbname); session.addDatabase(db); session.database = db; database = db; | private void addDatabase(String dbname) { Database db; if (appRequester.isXARequester()) { db = new XADatabase(dbname); } else db = new Database(dbname); session.addDatabase(db); session.database = db; database = db; } |
else db = new Database(dbname); session.addDatabase(db); session.database = db; database = db; } | private void addDatabase(String dbname) { Database db; if (appRequester.isXARequester()) { db = new XADatabase(dbname); } else db = new Database(dbname); session.addDatabase(db); session.database = db; database = db; } | |
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; } | 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); } |
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); } | |
int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { SQLWarning warning = null; SQLWarning reportWarning = null; try { if (stmt != null) { warning = stmt.getWarnings(); if (warning != null) { stmt.clearWarnings(); reportWarning = warning; | int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { SQLWarning warning = null; SQLWarning reportWarning = null; try { if (stmt != null) { warning = stmt.getWarnings(); if (warning != null) { stmt.clearWarnings(); reportWarning = warning; } } if (rs != null) { warning = ... | private void checkWarning(Connection conn, Statement stmt, ResultSet rs, int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { // instead of writing a chain of sql warning, we send the first one, this is // jcc/db2 limitation, see beetle 4629 SQLWarning warning ... |
} if (rs != null) { warning = rs.getWarnings(); if (warning != null) { rs.clearWarnings(); if (reportWarning == null) reportWarning = warning; | catch (SQLException se) { if (SanityManager.DEBUG) trace("got SQLException while trying to get warnings."); | private void checkWarning(Connection conn, Statement stmt, ResultSet rs, int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { // instead of writing a chain of sql warning, we send the first one, this is // jcc/db2 limitation, see beetle 4629 SQLWarning warning ... |
} if (conn != null) { warning = conn.getWarnings(); if (warning != null) { conn.clearWarnings(); if (reportWarning == null) reportWarning = warning; } } } catch (SQLException se) { if (SanityManager.DEBUG) trace("got SQLException while trying to get warnings."); } | private void checkWarning(Connection conn, Statement stmt, ResultSet rs, int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { // instead of writing a chain of sql warning, we send the first one, this is // jcc/db2 limitation, see beetle 4629 SQLWarning warning ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.