rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
writer.createDssObject(reuseCorrID); | writer.createDssObject(); | private void writeSQLCARD(boolean reuseCorrID, SQLException e,int severity, int updateCount, long rowCount ) throws DRDAProtocolException { writer.createDssObject(reuseCorrID); writer.startDdm(CodePoint.SQLCARD); writeSQLCAGRP(e, getSqlCode(severity), updateCount, rowCount); writer.endDdmAndDss(); // If we have... |
private void writeSQLCARDs(SQLException e, boolean reuseCorrID, int updateCount) | private void writeSQLCARDs(SQLException e, int updateCount) | private void writeSQLCARDs(SQLException e, boolean reuseCorrID, int updateCount) throws DRDAProtocolException { writeSQLCARDs(e, reuseCorrID, updateCount, false); } |
writeSQLCARDs(e, reuseCorrID, updateCount, false); | writeSQLCARDs(e, updateCount, false); | private void writeSQLCARDs(SQLException e, boolean reuseCorrID, int updateCount) throws DRDAProtocolException { writeSQLCARDs(e, reuseCorrID, updateCount, false); } |
writer.createDssObject(false); | writer.createDssObject(); | private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); ResultSetMetaData rsmeta = ps.getMetaData(); EmbedParameterSetMetaData pmeta = ((EmbedPreparedStatement) ps).getEmbedParameterSetMetaData(... |
public HashTableResultSet(NoPutResultSet s, | HashTableResultSet(NoPutResultSet s, | public HashTableResultSet(NoPutResultSet s, Activation a, GeneratedMethod str, Qualifier[][] nextQualifiers, GeneratedMethod p, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacit... |
double optimizerEstimatedCost, GeneratedMethod c) | double optimizerEstimatedCost) | public HashTableResultSet(NoPutResultSet s, Activation a, GeneratedMethod str, Qualifier[][] nextQualifiers, GeneratedMethod p, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacit... |
closeCleanup = c; | public HashTableResultSet(NoPutResultSet s, Activation a, GeneratedMethod str, Qualifier[][] nextQualifiers, GeneratedMethod p, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacit... | |
if (closeCleanup != null) { closeCleanup.invoke(activation); } currentRow = null; | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be in a finally // block, to ensure that it is executed? clearCurrentRow(); if (clos... | |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "US-ASCII", "CharacterStream", e); | public void convertFromAsciiToCharacterStream() throws SqlException { try { characterStream_ = new java.io.InputStreamReader(asciiStream_, "US-ASCII"); dataType_ = CHARACTER_STREAM; } catch (java.io.UnsupportedEncodingException e) { throw new SqlExce... |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(e); | protected Clob createClobWrapper(java.sql.Clob clob) throws SqlException { long length; java.io.Reader rdr; try { length = clob.length(); } catch (java.sql.SQLException e) { throw new SqlException(agent_.logWriter_, e.getMessage()); } if (length > java... |
if (length > java.lang.Integer.MAX_VALUE) { throw new SqlException(agent_.logWriter_, "searchstr Clob object is too large"); | if (length > Integer.MAX_VALUE) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT), new Long(length), new Integer(Integer.MAX_VALUE)); | protected Clob createClobWrapper(java.sql.Clob clob) throws SqlException { long length; java.io.Reader rdr; try { length = clob.length(); } catch (java.sql.SQLException e) { throw new SqlException(agent_.logWriter_, e.getMessage()); } if (length > java... |
if ((pos <= 0) || (length < 0)) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " or length " + length); | if ( pos <= 0 ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_BAD_POSITION), new Long(pos)); } if ( length < 0 ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), new Integer(length)); | public String getSubString(long pos, int length) throws SQLException { try { synchronized (agent_.connection_) { String retVal = null; if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getSubString", (int) pos, length); ... |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNSUPPORTED_ENCODING), "String", "UTF8 byte[]", e); | public int getUTF8Length() throws SqlException { if (utf8String_ != null) { return utf8String_.length; } try { utf8String_ = string_.getBytes("UTF-8"); return utf8String_.length; } catch (java.io.UnsupportedEncodingException e) { throw new SqlE... |
throw new SqlException(agent_.logWriter_, "Search string cannot be null."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NULL_PATTERN_OR_SEARCH_STR)); | public long position(String searchstr, long start) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "position(String, long)", ... |
throw new SqlException(agent_.logWriter_, "Clob.position(): start must be >= 1."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_API_PARAMETER), new Long(start), "start", "Clob.position()"); | private long positionX(String searchstr, long start) throws SqlException { checkForClosedConnection(); if (start <= 0) { throw new SqlException(agent_.logWriter_, "Clob.position(): start must be >= 1."); } int index = string_.indexOf(searchstr, (int) start - 1); if (ind... |
if ((int) pos <= 0 || pos - 1 > sqlLength_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len); | if ((int) pos <= 0 ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_BAD_POSITION), new Long(pos)); | public int setStringX(long pos, String str, int offset, int len) throws SqlException { if ((int) pos <= 0 || pos - 1 > sqlLength_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len); } if ((offset < ... |
if ((offset < 0) || offset > str.length() || len < 0) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len); | if ( pos - 1 > sqlLength_) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_POSITION_TOO_LARGE), new Long(pos)); | public int setStringX(long pos, String str, int offset, int len) throws SqlException { if ((int) pos <= 0 || pos - 1 > sqlLength_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len); } if ((offset < ... |
if ((offset < 0) || offset > str.length() ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_INVALID_OFFSET), new Integer(offset)); } if ( len < 0 ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), new Integer(len)); } | public int setStringX(long pos, String str, int offset, int len) throws SqlException { if ((int) pos <= 0 || pos - 1 > sqlLength_) { throw new SqlException(agent_.logWriter_, "Invalid position " + pos + " , offset " + offset + " or length " + len); } if ((offset < ... | |
if (len < 0 || len > this.length()) { throw new SqlException(agent_.logWriter_, "Invalid length " + len); | if (len < 0 ) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), new Long(len)); | public void truncate(long len) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, " truncate", (int) len); } if (len < 0 || len > this.length()) { ... |
if ( len > this.length()) { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BLOB_LENGTH_TOO_LONG), new Long(len)); } | public void truncate(long len) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, " truncate", (int) len); } if (len < 0 || len > this.length()) { ... | |
BaseDataFileFactory dataFactory, Properties prop) | BaseDataFileFactory dataFactory) | StreamFileContainer( ContainerKey identity, BaseDataFileFactory dataFactory, Properties prop) throws StandardException { this.identity = identity; this.dataFactory = dataFactory; try { file = getFileName(identity, true, false); if (file.exists()) ... |
this.identity = identity; this.dataFactory = dataFactory; try { file = getFileName(identity, true, false); if (file.exists()) { throw StandardException.newException( SQLState.FILE_EXISTS, file); } getContainerProperties(prop); } catch (SecurityException se) { throw StandardException.newException( SQLSt... | this.identity = identity; this.dataFactory = dataFactory; | StreamFileContainer( ContainerKey identity, BaseDataFileFactory dataFactory, Properties prop) throws StandardException { this.identity = identity; this.dataFactory = dataFactory; try { file = getFileName(identity, true, false); if (file.exists()) ... |
if (!container.exists()) | if (!privExists(container)) | protected StorageFile getFileName( ContainerKey identity, boolean forCreate, boolean errorOK) throws StandardException { if (identity.getSegmentId() == StreamContainerHandle.TEMPORARY_SEGMENT) { return( dataFactory.storageFactory.newStorageFile( dataFactory.storageFactory.... |
if (!directory.exists()) | if (!privExists(directory)) | protected StorageFile getFileName( ContainerKey identity, boolean forCreate, boolean errorOK) throws StandardException { if (identity.getSegmentId() == StreamContainerHandle.TEMPORARY_SEGMENT) { return( dataFactory.storageFactory.newStorageFile( dataFactory.storageFactory.... |
if (!directory.mkdirs()) | if (!privMkdirs(directory)) | protected StorageFile getFileName( ContainerKey identity, boolean forCreate, boolean errorOK) throws StandardException { if (identity.getSegmentId() == StreamContainerHandle.TEMPORARY_SEGMENT) { return( dataFactory.storageFactory.newStorageFile( dataFactory.storageFactory.... |
fileOut = file.getOutputStream(); | fileOut = privGetOutputStream(file); | public void load(RowSource rowSource) throws StandardException { // use this output stream to buffer rows before inserting into file. out = new DynamicByteArrayOutputStream(bufferSize); logicalDataOut = new FormatIdOutputStream(out); boolean encrypted = dataFactory.databaseEncryp... |
if (!file.exists()) | if (!privExists(file)) | protected StreamFileContainer open(boolean forUpdate) throws StandardException { file = getFileName(this.identity, false, true); if (!file.exists()) return null; try { if (!forUpdate) { fileIn = file.getInputStream(); if (dataFactory.databaseEncrypted()) ... |
fileIn = file.getInputStream(); | fileIn = privGetInputStream(file); | protected StreamFileContainer open(boolean forUpdate) throws StandardException { file = getFileName(this.identity, false, true); if (!file.exists()) return null; try { if (!forUpdate) { fileIn = file.getInputStream(); if (dataFactory.databaseEncrypted()) ... |
columnGotUpdated = new boolean[getMetaData().getColumnCount()]; copyOfDatabaseRow = new DataValueDescriptor[columnGotUpdated.length]; | columnGotUpdated = new boolean[columnCount]; updateRow = factory.getValueRow(columnCount); for (int i = 1; i <= columnCount; i++) { updateRow.setColumn(i, resultDescription.getColumnDescriptor(i). getType().getNull()); } initializeUpdateRowModifiers(); } else { updateRow = null; | public EmbedResultSet(EmbedConnection conn, ResultSet resultsToWrap, boolean forMetaData, EmbedStatement stmt, boolean isAtomic) throws SQLException { super(conn); if (SanityManager.DEBUG) SanityManager.ASSERT(resultsToWrap!=null); theResults = resultsToWrap; this.forMetaData = forMetaData; this.ap... |
if (currentRowHasBeenUpdated == false) return; | public void cancelRowUpdates () throws SQLException { checksBeforeUpdateOrDelete("cancelRowUpdates", -1); checkNotOnInsertRow(); if (currentRowHasBeenUpdated == false) return; //nothing got updated on this row so cancelRowUpdates is a no-op in this case. for (int i=0; i <... | |
for (int i=0; i < columnGotUpdated.length; i++){ if (columnGotUpdated[i] == true) currentRow.setColumn(i+1, copyOfDatabaseRow[i]); columnGotUpdated[i] = false; } currentRowHasBeenUpdated = false; rowData = currentRow.getRowArray(); } | initializeUpdateRowModifiers(); } | public void cancelRowUpdates () throws SQLException { checksBeforeUpdateOrDelete("cancelRowUpdates", -1); checkNotOnInsertRow(); if (currentRowHasBeenUpdated == false) return; //nothing got updated on this row so cancelRowUpdates is a no-op in this case. for (int i=0; i <... |
protected final DataValueDescriptor[] checkOnRow() throws SQLException { DataValueDescriptor[] theCurrentRow = rowData; if (theCurrentRow == null) | protected final void checkOnRow() throws SQLException { if (currentRow.getRowArray() == null) { | protected final DataValueDescriptor[] checkOnRow() throws SQLException { DataValueDescriptor[] theCurrentRow = rowData; if (theCurrentRow == null) throw newSQLException(SQLState.NO_CURRENT_ROW); return theCurrentRow; } |
return theCurrentRow; | } | protected final DataValueDescriptor[] checkOnRow() throws SQLException { DataValueDescriptor[] theCurrentRow = rowData; if (theCurrentRow == null) throw newSQLException(SQLState.NO_CURRENT_ROW); return theCurrentRow; } |
checkOnRow(); | if (!isOnInsertRow) checkOnRow(); | protected void checksBeforeUpdateOrDelete(String methodName, int columnIndex) throws SQLException { //1)Make sure JDBC ResultSet is not closed checkIfClosed(methodName); //2)Make sure this is an updatable ResultSet checkUpdatableCursor(methodName); //3)Make sure JDBC ResultSet is positioned on... |
currentRow = null; rowData = null; | currentRow.setRowArray(null); | public void close() throws SQLException { /* if this result is already closed, don't try to close again * we may have closed it earlier because of an error and trying * to close again will cause a different problem if the connection * has been closed as in XA error handling */ if (isClosed) return; clo... |
rowData = null; currentRow = null; | currentRow.setRowArray(null); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... |
initializeUpdateRowModifiers(); | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... | |
DataValueDescriptor dvd = currentRow.getColumn(columnIndex); | DataValueDescriptor dvd = getColumn(columnIndex); | public Blob getBlob(int columnIndex) throws SQLException { closeCurrentStream(); // closing currentStream does not depend on the // underlying connection. Do this outside of // the connection synchronization. checkIfClosed("getBlob"); // checking result set closure does not depend // on the underlying connection.... |
DataValueDescriptor dvd = currentRow.getColumn(columnIndex); | DataValueDescriptor dvd = getColumn(columnIndex); | public final Clob getClob(int columnIndex) throws SQLException { closeCurrentStream(); // closing currentStream does not depend on the // underlying connection. Do this outside of // the connection synchronization. checkIfClosed("getClob"); // checking result set closure does not depend // on the underlying conne... |
DataValueDescriptor[] theCurrentRow = checkOnRow(); try { return theCurrentRow[columnIndex - 1]; } catch (ArrayIndexOutOfBoundsException aoobe) { throw newSQLException(SQLState.COLUMN_NOT_FOUND, new Integer(columnIndex)); } | if (columnIndex < 1 || columnIndex > currentRow.nColumns()) { throw newSQLException(SQLState.COLUMN_NOT_FOUND, new Integer(columnIndex)); } if (isOnInsertRow || currentRowHasBeenUpdated && columnGotUpdated[columnIndex -1]) { return updateRow.getColumn(columnIndex); } else { checkOnRow(); return currentRow.getColumn(col... | protected final DataValueDescriptor getColumn(int columnIndex) throws SQLException, StandardException { closeCurrentStream(); DataValueDescriptor[] theCurrentRow = checkOnRow(); // first make sure there's a row try { return theCurrentRow[columnIndex - 1]; } catch (ArrayIndexOutOfBoundsException aoobe... |
checkOnRow(); | if (!isOnInsertRow) checkOnRow(); | final int getColumnType(int columnIndex) throws SQLException { checkOnRow(); // first make sure there's a row if (columnIndex < 1 || columnIndex > resultDescription.getColumnCount()) throw newSQLException(SQLState.COLUMN_NOT_FOUND, new Integer(columnIndex)); return resultDescriptio... |
if (columnGotUpdated[columnIndex-1] == false) { copyOfDatabaseRow[columnIndex - 1] = currentRow.getColumn(columnIndex).getClone(); } | protected DataValueDescriptor getDVDforColumnToBeUpdated(int columnIndex, String updateMethodName) throws StandardException, SQLException { checksBeforeUpdateXXX(updateMethodName, columnIndex); if (columnGotUpdated[columnIndex-1] == false) {//this is the first updateXXX call on this column //this is t... | |
currentRowHasBeenUpdated = true; return currentRow.getColumn(columnIndex); | currentRowHasBeenUpdated = true; return updateRow.getColumn(columnIndex); | protected DataValueDescriptor getDVDforColumnToBeUpdated(int columnIndex, String updateMethodName) throws StandardException, SQLException { checksBeforeUpdateXXX(updateMethodName, columnIndex); if (columnGotUpdated[columnIndex-1] == false) {//this is the first updateXXX call on this column //this is t... |
setValue(currentRow.getColumn(i)); | setValue(updateRow.getColumn(i)); | public void insertRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeInsert(); setupContextStack(); LanguageConnectionContext lcc = null; StatementContext statementContext = null; try { /* ... |
currentRow = currentRowBeforeInsert; currentRowBeforeInsert = null; | public void moveToCurrentRow() throws SQLException { checkExecIfClosed("moveToCurrentRow"); // if not updatable resultset, then throw exception checkUpdatableCursor("moveToCurrentRow"); synchronized (getConnectionSynchronization()) { try { if (isOnInsertRow) { // Get position previous to moveToInsertRow ... | |
for (int i=0; i < columnGotUpdated.length; i++) { columnGotUpdated[i] = false; } currentRowHasBeenUpdated = false; if (currentRow != null) { rowData = currentRow.getRowArray(); } | initializeUpdateRowModifiers(); | public void moveToCurrentRow() throws SQLException { checkExecIfClosed("moveToCurrentRow"); // if not updatable resultset, then throw exception checkUpdatableCursor("moveToCurrentRow"); synchronized (getConnectionSynchronization()) { try { if (isOnInsertRow) { // Get position previous to moveToInsertRow ... |
for (int i=0; i < columnGotUpdated.length; i++) { columnGotUpdated[i] = false; } currentRowHasBeenUpdated = false; if (!isOnInsertRow) { currentRowBeforeInsert = currentRow; } isOnInsertRow = true; if (insertRow == null) { insertRow = stmt.lcc.getExecutionContext(). getExecutionFactory().getValueRow(columnGotUpdat... | initializeUpdateRowModifiers(); isOnInsertRow = true; | public void moveToInsertRow() throws SQLException { checkExecIfClosed("moveToInsertRow"); // if not updatable resultset, then throw exception checkUpdatableCursor("moveToInsertRow"); synchronized (getConnectionSynchronization()) { try { // initialize state corresponding to insertRow/updateRow impl. for (in... |
insertRow.setColumn(i, | updateRow.setColumn(i, | public void moveToInsertRow() throws SQLException { checkExecIfClosed("moveToInsertRow"); // if not updatable resultset, then throw exception checkUpdatableCursor("moveToInsertRow"); synchronized (getConnectionSynchronization()) { try { // initialize state corresponding to insertRow/updateRow impl. for (in... |
currentRow = insertRow; rowData = currentRow.getRowArray(); | public void moveToInsertRow() throws SQLException { checkExecIfClosed("moveToInsertRow"); // if not updatable resultset, then throw exception checkUpdatableCursor("moveToInsertRow"); synchronized (getConnectionSynchronization()) { try { // initialize state corresponding to insertRow/updateRow impl. for (in... | |
if (columnGotUpdated != null) { Arrays.fill(columnGotUpdated, false); currentRowHasBeenUpdated = false; } | public boolean next() throws SQLException { // we seem to have some trigger paths which don't have // statement initialized, may not need this check in those cases if (maxRows !=0 ) { NumberofFetchedRows++; // check whether we hit the maxRows limit ... | |
DataValueDescriptor value = currentRow.getColumn(columnIndex); | DataValueDescriptor value = updateRow.getColumn(columnIndex); | public void updateObject(int columnIndex, Object x, int scale) throws SQLException { updateObject(columnIndex, x); /* * If the parameter type is DECIMAL or NUMERIC, then * we need to set them to the passed scale. */ int colType = getColumnType(columnIndex); if ((colType == Types.DECIMAL) || (colType == Types.... |
act.getParameterValueSet().getParameterForSet(paramPosition++).setValue(currentRow.getColumn(i)); | act.getParameterValueSet().getParameterForSet(paramPosition++).setValue(updateRow.getColumn(i)); | public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); LanguageConnectionContex... |
rowData = null; currentRow = null; | currentRow.setRowArray(null); } else { movePosition(RELATIVE, 0, "relative"); | public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); LanguageConnectionContex... |
initializeUpdateRowModifiers(); | public void updateRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("updateRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); LanguageConnectionContex... | |
public static SQLException newEmbedSQLException(String messageId, Object[] args, int severity) { return newEmbedSQLException(messageId, args, (SQLException) null, severity, (Throwable) null); | private static SQLException newEmbedSQLException(String messageId, Object[] args, SQLException next, int severity, Throwable t) { String message = MessageService.getCompleteMessage (messageId, args); return exceptionFactory.getSQLException ( message, messageId, next, severity, t, args); | public static SQLException newEmbedSQLException(String messageId, Object[] args, int severity) { return newEmbedSQLException(messageId, args, (SQLException) null, severity, (Throwable) null); } |
public int maxCapacity() | public int maxCapacity( JoinStrategy joinStrategy, int maxMemoryPerTable) throws StandardException | public int maxCapacity() { if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Not expected to be called"); } return 0; } |
if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Not expected to be called"); } return 0; | return joinStrategy.maxCapacity( maxCapacity, maxMemoryPerTable, getPerRowUsage()); | public int maxCapacity() { if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Not expected to be called"); } return 0; } |
return new SqlException(agent_.logWriter_, "JDBC 3 method called - not yet supported").getSQLException(); | return SQLExceptionFactory.notImplemented( "JDBC 3 method called - not yet supported"); | private SQLException jdbc3MethodNotSupported() { // This will get internationalized in another patch return new SqlException(agent_.logWriter_, "JDBC 3 method called - not yet supported").getSQLException(); } |
clientMessageIds.add(SQLState.CANNOT_CLOSE_ACTIVE_XA_CONNECTION); | clientMessageIds.add(SQLState.CANNOT_CLOSE_ACTIVE_CONNECTION); | 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_XA_CONNECTION); clientMessageIds.add(SQL... |
public DefaultInfoImpl(boolean isDefaultValueAutoinc, String defaultText, DataValueDescriptor defaultValue) { this.type = calcType(isDefaultValueAutoinc); this.defaultText = defaultText; this.defaultValue = defaultValue; } | public DefaultInfoImpl() {} | public DefaultInfoImpl(boolean isDefaultValueAutoinc, String defaultText, DataValueDescriptor defaultValue) { this.type = calcType(isDefaultValueAutoinc); this.defaultText = defaultText; this.defaultValue = defaultValue; } |
con.createArray(null, null); fail("createArray(String,Object[]) should not be implemented"); | con.createArrayOf(null, null); fail("createArrayOf(String,Object[]) should not be implemented"); | public void testCreateArrayNotImplemented() throws SQLException { try { con.createArray(null, null); fail("createArray(String,Object[]) should not be implemented"); } catch (SQLFeatureNotSupportedException sfnse) { // Do nothing, we are fine } } |
"ClientInfoException"); } catch (ClientInfoException cie) { | "SQLClientInfoException"); } catch (SQLClientInfoException cie) { | public void testSetClientInfoProperties() throws SQLException { con.setClientInfo(null); Properties p = new Properties(); con.setClientInfo(p); p.setProperty("prop1", "val1"); p.setProperty("prop2", "val2"); try { con.setClientInfo(p); fail("set... |
getProperty("prop1"). equals(""+ClientInfoException.REASON_UNKNOWN_PROPERTY)); assertTrue("Setting property 'prop2' must fail with "+ "REASON_UNKNOWN_PROPERTY", cie.getFailedProperties(). getProperty("prop2"). equals(""+ClientInfoException.REASON_UNKNOWN_PROPERTY)); | get("prop1"). equals(ClientInfoStatus.REASON_UNKNOWN_PROPERTY)); assertTrue("Setting property 'prop2' must fail with "+ "REASON_UNKNOWN_PROPERTY", cie.getFailedProperties(). get("prop2"). equals(ClientInfoStatus.REASON_UNKNOWN_PROPERTY)); | public void testSetClientInfoProperties() throws SQLException { con.setClientInfo(null); Properties p = new Properties(); con.setClientInfo(p); p.setProperty("prop1", "val1"); p.setProperty("prop2", "val2"); try { con.setClientInfo(p); fail("set... |
"ClientInfoException"); } catch (ClientInfoException cie) { | "SQLClientInfoException"); } catch (SQLClientInfoException cie) { | public void testSetClientInfoString() throws SQLException { con.setClientInfo(null, null); try { con.setClientInfo("foo", null); fail("setClientInfo(String, null) should throw "+ "NullPointerException"); } catch (NullPointerException npe) {} t... |
getProperty("name"). equals(""+ClientInfoException.REASON_UNKNOWN_PROPERTY)); | get("name"). equals(ClientInfoStatus.REASON_UNKNOWN_PROPERTY)); | public void testSetClientInfoString() throws SQLException { con.setClientInfo(null, null); try { con.setClientInfo("foo", null); fail("setClientInfo(String, null) should throw "+ "NullPointerException"); } catch (NullPointerException npe) {} t... |
if (result != null) { result = getRowFromHashTable(row); } | public ExecRow getAbsoluteRow(int row) throws StandardException { if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "absolute"); } attachStatementContext(); if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be... | |
{ ExecRow result; | { | public ExecRow getLastRow() throws StandardException { ExecRow result; if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "next"); } /* Have we already seen the last row? */ if (seenLast) { // Return null if the set was empty if (lastPosition == 0) { curren... |
if (seenLast) | if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be the top ResultSet"); } } ExecRow result = null; while ((result = getNextRowFromSource()) != null); } if (SanityManager.DEBUG && !seenLast) | public ExecRow getLastRow() throws StandardException { ExecRow result; if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "next"); } /* Have we already seen the last row? */ if (seenLast) { // Return null if the set was empty if (lastPosition == 0) { curren... |
if (lastPosition == 0) { currentRow = null; return null; } else { return getRowFromHashTable(lastPosition); } | SanityManager.THROWASSERT(this + "expected to have seen last"); | public ExecRow getLastRow() throws StandardException { ExecRow result; if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "next"); } /* Have we already seen the last row? */ if (seenLast) { // Return null if the set was empty if (lastPosition == 0) { curren... |
attachStatementContext(); if (SanityManager.DEBUG) { if (!isTopResultSet) { SanityManager.THROWASSERT( this + "expected to be the top ResultSet"); } } while ((result = getNextRowFromSource()) != null); | public ExecRow getLastRow() throws StandardException { ExecRow result; if ( ! isOpen ) { throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "next"); } /* Have we already seen the last row? */ if (seenLast) { // Return null if the set was empty if (lastPosition == 0) { curren... | |
if (result !=null) { result = getRowFromHashTable(currentPosition); } | public ExecRow getNextRowCore() throws StandardException { ExecRow result = null; beginTime = getCurrentTimeMillis(); if (!isOpen) throw StandardException.newException(SQLState.LANG_RESULT_SET_NOT_OPEN, "next"); if (seenLast && currentPosition == lastPosition) { return setAfterLastRow(); } /* Should we get... | |
protected static void dropConstraintAndIndex(DependencyManager dm, | public static void dropConstraintAndIndex(DependencyManager dm, | protected static void dropConstraintAndIndex(DependencyManager dm, TableDescriptor td, DataDictionary dd, ConstraintDescriptor conDesc, TransactionController tc, Activation activation, boolean clearDependencies) throws StandardException { if (SanityManager.DEBU... |
Activation activation, | LanguageConnectionContext lcc, | protected static void dropConstraintAndIndex(DependencyManager dm, TableDescriptor td, DataDictionary dd, ConstraintDescriptor conDesc, TransactionController tc, Activation activation, boolean clearDependencies) throws StandardException { if (SanityManager.DEBU... |
dm.clearDependencies(activation.getLanguageConnectionContext(), conDesc); | dm.clearDependencies(lcc, conDesc); | protected static void dropConstraintAndIndex(DependencyManager dm, TableDescriptor td, DataDictionary dd, ConstraintDescriptor conDesc, TransactionController tc, Activation activation, boolean clearDependencies) throws StandardException { if (SanityManager.DEBU... |
conglomDescs[i], td, activation); | conglomDescs[i], td, lcc); | protected static void dropConstraintAndIndex(DependencyManager dm, TableDescriptor td, DataDictionary dd, ConstraintDescriptor conDesc, TransactionController tc, Activation activation, boolean clearDependencies) throws StandardException { if (SanityManager.DEBU... |
dropConstraintAndIndex(dm, td, dd, conDesc, tc, activation, !cascadeOnRefKey); | dropConstraintAndIndex(dm, td, dd, conDesc, tc, lcc, !cascadeOnRefKey); | public void executeConstantAction( Activation activation ) throws StandardException { ConstraintDescriptor conDesc = null; TableDescriptor td; UUID indexId = null; String indexUUIDString; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDat... |
tc, activation, true); | tc, lcc, true); | public void executeConstantAction( Activation activation ) throws StandardException { ConstraintDescriptor conDesc = null; TableDescriptor td; UUID indexId = null; String indexUUIDString; LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDat... |
if (fm == null) { return; } | public void setFramework(String fm) { framework = fm.toUpperCase(Locale.ENGLISH); if (framework.endsWith("NET") || framework.equals("DB2JCC")) isJCC = true; else if (framework.equals("DERBYNETCLIENT")) isNetClient = true; } | |
public static String getNumber(int o){ | public static String getNumber(long o){ | public static String getNumber(int o){ return getInstance().getNumberAsString(o); } |
System.out.println("Successfully Connected"); | execCmdDumpResults(cmdTraceOn); execCmdDumpResults(cmdLogconnectionsOn); listProperties("1527"); | 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 { bos = new Buffered... |
execCmdDumpResults(cmdWithoutArgs); execCmdDumpResults(cmdUnknown); execCmdDumpResults(cmdWithWrongArgNum); | 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 { bos = new Buffered... | |
costEstimate = getFinalCostEstimate(); | public void generate( ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. */ assignResultSetNumber(); // build up the tree. /* Generate the Set... | |
return (leftRowCount + Math.min( 0, leftRowCount - rightRowCount))/2; | return (leftRowCount + Math.max(0, leftRowCount - rightRowCount))/2; | double getRowCountEstimate( double leftRowCount, double rightRowCount) { switch( opType) { case INTERSECT_OP: // The result has at most min( leftRowCount, rightRowCount). Estimate the actual row count at // half that. return Math.min( leftRowCount, rightRowCo... |
escapedProcedureCallWithResult_ = false; | protected void initResetPreparedStatement() { warnings_ = null; //section_ = null; resultSet_ = null; updateCount_ = -1; returnValueFromProcedure_ = 0; cursorName_ = null; openOnClient_ = true; openOnServer_ = false; indexOfCurrentResultSet_ = -1; ... | |
buildHashSet(); | public void setUp() throws SQLException { con = getConnection(); clob = BlobClobTestSetup.getSampleClob(con); } | |
AttributeEntry(ClassInput in) throws IOException { attribute_name_index = in.getU2(); infoIn = in.getU1Array(in.getU4()); | AttributeEntry(int name_index, ClassFormatOutput info) { super(); attribute_name_index = name_index; this.infoOut = info; | AttributeEntry(ClassInput in) throws IOException { attribute_name_index = in.getU2(); infoIn = in.getU1Array(in.getU4()); } |
if ( !composeDefault ) | if ( !composeDefault || SanityManager.DEBUG ) | public static String formatMessage(ResourceBundle bundle, String messageId, Object[] arguments, boolean composeDefault) { String message = null; String badArgsMessage = null; if (arguments == null) arguments = new Object[0]; if (bundle != null) { try... |
System.out.println("TEST28A : CREATE VIEW in SESSION schema referencing a table outside of SESSION schema"); s.executeUpdate("CREATE TABLE t28A (c28 int)"); s.executeUpdate("INSERT INTO t28A VALUES (280),(281)"); s.executeUpdate("CREATE VIEW SESSION.t28v1 as select * from t28A"); System.out.println("SELECT * from SESSI... | static boolean testOtherOperations(Connection con1, Statement s, Connection con2) throws SQLException { boolean passed = true; try { System.out.println("TEST4A : ALTER TABLE not allowed on global temporary tables"); s.executeUpdate("DECLARE GLOBAL TEMPORARY TABLE SESSION.t2(c21 int) not logged on commit del... | |
if (statement_.section_ instanceof Section) { agent_.sectionManager_.mapCursorNameToQuerySection(statement_.cursorName_, (Section) statement_.section_); } | public String getCursorName() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getCursorName"); } checkForClosedResultSet(); if (generate... | |
return new NetConnection (netLogWriter, user, password, dataSource, rmId, isXAConn); | return (NetConnection)ClientDriver.getFactory().newNetConnection (netLogWriter, user, password,dataSource, rmId, isXAConn); | protected NetConnection createNetConnection (NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) t... |
protected final PreparedStatement getPreparedStatement() throws SQLException { | public final PreparedStatement getPreparedStatement() throws SQLException { | protected final PreparedStatement getPreparedStatement() throws SQLException { return getCallableStatement(); } |
if (correlationName == null) { exposedName = tableName; } else { exposedName = makeTableName(null, correlationName); } | exposedName = getExposedTableName(); | public ResultColumnList addColsToList ( ResultColumnList inputRcl, FormatableBitSet colsWeWant ) throws StandardException { ResultColumnList rcList = null; ResultColumn resultColumn; ValueNode valueNode; ColumnDescriptor cd = null; TableName exposedName; /* Cache exposed name for this ... |
(correlationName != null) ? correlationName : tableName.getTableName(), | (correlationName != null) ? correlationName : getOrigTableName().getTableName(), | public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException { TableDescriptor tableDescriptor = bindTableDescriptor(); if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) { ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI( ... |
fsq.setOrigTableName(this.getOrigTableName()); | public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException { TableDescriptor tableDescriptor = bindTableDescriptor(); if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) { ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI( ... | |
if (correlationName == null) { exposedName = tableName; } else { exposedName = makeTableName(null, correlationName); } | exposedName = getExposedTableName(); | 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 ... |
return getResultColumnsForList(allTableName, resultColumns, tableName); | return getResultColumnsForList(allTableName, resultColumns, getOrigTableName()); | public ResultColumnList getAllResultColumns(TableName allTableName) throws StandardException { return getResultColumnsForList(allTableName, resultColumns, tableName); } |
return tableName.getFullTableName(); | return getOrigTableName().getFullTableName(); | public String getExposedName() { if (correlationName != null) return correlationName; else return tableName.getFullTableName(); } |
if (correlationName != null) { exposedTableName = makeTableName(null, correlationName); } else { exposedTableName = tableName; } | exposedTableName = getExposedTableName(); | public ResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException { ResultColumn resultColumn = null; TableName columnsTableName; TableName exposedTableName; columnsTableName = columnReference.getTableNameNode(); if(columnsTableName != null) { if(columnsTableName.g... |
setOrigTableName(this.tableName); | public void init( Object arg1, Object arg2, Object arg3, Object arg4) { if (arg3 instanceof Integer) { init(arg2, null); this.tableName = (TableName) arg1; this.updateOrDelete = ((Integer) arg3).intValue(); resultColumns = (ResultColumnList) arg4; } else { init(arg2, arg4); t... | |
org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true, 0L); | org.apache.derby.iapi.sql.ResultSet rs = ps.execute(act, false, true, true, 0L); SQLWarning w = act.getWarnings(); if (w != null) { addWarning(w); } | public void deleteRow() throws SQLException { synchronized (getConnectionSynchronization()) { checksBeforeUpdateOrDelete("deleteRow", -1); // Check that the cursor is not positioned on insertRow checkNotOnInsertRow(); setupContextStack(); //now c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.