rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
throw new ColumnTypeConversionException(agent_.logWriter_); | throw new ColumnTypeConversionException(agent_.logWriter_, "java.sql.Types " + jdbcTypes_[column -1], "java.io.InputStream"); | public final java.io.InputStream getBinaryStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.BINARY: return new java.io.ByteArrayInputStream(get_CHAR_FOR_BIT_DATA(column)); case java.sql.Types.VARBINARY: ... |
throw new SqlException(agent_.logWriter_, "UnsupportedEncodingException: " + e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "BINARY", "java.io.Reader", e); | public final java.io.Reader getCharacterStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: Clob c = getClobColumn_(column, agent_); return c.getCharacterStream(); case java.sql.Types.CHAR: ... |
throw new SqlException(agent_.logWriter_, "UnsupportedEncodingException: " + e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "VARBINARY/LONGVARBINARY", "java.io.Reader", e); | public final java.io.Reader getCharacterStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: Clob c = getClobColumn_(column, agent_); return c.getCharacterStream(); case java.sql.Types.CHAR: ... |
throw new SqlException(agent_.logWriter_, "UnsupportedEncodingException: " + e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "BLOB", "java.io.Reader", e); | public final java.io.Reader getCharacterStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: Clob c = getClobColumn_(column, agent_); return c.getCharacterStream(); case java.sql.Types.CHAR: ... |
throw new ColumnTypeConversionException(agent_.logWriter_); | throw new ColumnTypeConversionException(agent_.logWriter_, "java.sql.Types " + jdbcTypes_[column -1], "java.io.Reader"); | public final java.io.Reader getCharacterStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: Clob c = getClobColumn_(column, agent_); return c.getCharacterStream(); case java.sql.Types.CHAR: ... |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "CLOB", "UnicodeStream", e); | public final java.io.InputStream getUnicodeStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: { Clob c = getClobColumn_(column, agent_); String s = c.getSubString(1L, (int) c.len... |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "CHAR", "UnicodeStream", e); | public final java.io.InputStream getUnicodeStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: { Clob c = getClobColumn_(column, agent_); String s = c.getSubString(1L, (int) c.len... |
throw new SqlException(agent_.logWriter_, e.getMessage()); | throw new SqlException(agent_.logWriter_, new MessageId (SQLState.UNSUPPORTED_ENCODING), "VARCHAR/LONGVARCHAR", "UnicodeStream", e); | public final java.io.InputStream getUnicodeStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: { Clob c = getClobColumn_(column, agent_); String s = c.getSubString(1L, (int) c.len... |
throw new ColumnTypeConversionException(agent_.logWriter_); | throw new ColumnTypeConversionException(agent_.logWriter_, "java.sql.Types " + jdbcTypes_[column -1], "UnicodeStream"); | public final java.io.InputStream getUnicodeStream(int column) throws SqlException { try { switch (jdbcTypes_[column - 1]) { case java.sql.Types.CLOB: { Clob c = getClobColumn_(column, agent_); String s = c.getSubString(1L, (int) c.len... |
public static String greaterEqualString(String pattern, String escape) | public static String greaterEqualString(String pattern, String escape, int maxWidth) | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
return greaterEqualString(pattern, escChar); | return padWithNulls(greaterEqualString(pattern, escChar), maxWidth); | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
if (firstAnyString == -1) | if (firstAnyString != -1) | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
return pattern; } else { return pattern.substring(0, firstAnyString); | pattern = pattern.substring(0, firstAnyString); | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
return pattern.substring(0, firstAnyChar); | pattern = pattern.substring(0, firstAnyChar); | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
return pattern.substring(0, (firstAnyChar > firstAnyString) ? firstAnyString : firstAnyChar); | pattern = pattern.substring(0, (firstAnyChar > firstAnyString) ? firstAnyString : firstAnyChar); | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... |
return padWithNulls(pattern, maxWidth); | public static String greaterEqualString(String pattern, String escape) throws StandardException { int firstAnyChar = pattern.indexOf(anyChar); int firstAnyString = pattern.indexOf(anyString); // // For Escape we don't utilize any of the stylish code // below but brute force walk the pattern to find out // w... | |
public static String greaterEqualStringFromParameter(String pattern) | public static String greaterEqualStringFromParameter(String pattern, int maxWidth) | public static String greaterEqualStringFromParameter(String pattern) throws StandardException { if (pattern == null) return null; return greaterEqualString(pattern, (String) null); } |
return greaterEqualString(pattern, (String) null); | return greaterEqualString(pattern, (String) null, maxWidth); | public static String greaterEqualStringFromParameter(String pattern) throws StandardException { if (pattern == null) return null; return greaterEqualString(pattern, (String) null); } |
public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape) | public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape, int maxWidth) | public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape) throws StandardException { if (pattern == null) return null; return greaterEqualString(pattern, escape); } |
return greaterEqualString(pattern, escape); | return greaterEqualString(pattern, escape, maxWidth); | public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape) throws StandardException { if (pattern == null) return null; return greaterEqualString(pattern, escape); } |
public static String lessThanString(String pattern) | public static String lessThanString(String pattern, int maxWidth) | public static String lessThanString(String pattern) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern.length()) == ... |
return new String(charArray); | return padWithNulls(new String(charArray), maxWidth); | public static String lessThanString(String pattern) throws StandardException { //int firstAnyChar = pattern.indexOf(anyChar); //int firstAnyString = pattern.indexOf(anyString); int lastUsableChar; int patternLen; char oldLastChar; char newLastChar; char[] charArray; if ((patternLen = pattern.length()) == ... |
public static String lessThanStringFromParameter(String pattern) throws StandardException { | public static String lessThanStringFromParameter(String pattern, int maxWidth) throws StandardException { | public static String lessThanStringFromParameter(String pattern) throws StandardException { if (pattern == null) return null; return lessThanString(pattern, null); } |
return lessThanString(pattern, null); | return lessThanString(pattern, null, maxWidth); | public static String lessThanStringFromParameter(String pattern) throws StandardException { if (pattern == null) return null; return lessThanString(pattern, null); } |
public static String lessThanStringFromParameterWithEsc(String pattern, String escape) throws StandardException | public static String lessThanStringFromParameterWithEsc(String pattern, String escape, int maxWidth) throws StandardException | public static String lessThanStringFromParameterWithEsc(String pattern, String escape) throws StandardException { if (pattern == null) return null; return lessThanString(pattern, escape); } |
return lessThanString(pattern, escape); | return lessThanString(pattern, escape, maxWidth); | public static String lessThanStringFromParameterWithEsc(String pattern, String escape) throws StandardException { if (pattern == null) return null; return lessThanString(pattern, escape); } |
case TABLEID_INDEX_NUM: row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null)); break; | public ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation) throws StandardException { ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length + 1); row.setColumn( row.nColumns(), rowLocatio... | |
case TABLEID_INDEX_NUM: row = getExecutionFactory().getIndexableRow( 1); colPerms = (ColPermsDescriptor) perm; tableUUIDStr = colPerms.getTableUUID().toString(); row.setColumn(1, getDataValueFactory().getCharDataValue( tableUUIDStr)); break; | public ExecIndexRow buildIndexKeyRow( int indexNumber, PermissionsDescriptor perm) throws StandardException { ExecIndexRow row = null; switch( indexNumber) { case GRANTEE_TABLE_TYPE_GRANTOR_INDEX_NUM: // RESOLVE We do not ... | |
public void updateNCharacterStream(int columnIndex, Reader x, int length) | public void updateNCharacterStream(int columnIndex, Reader x, long length) | public void updateNCharacterStream(int columnIndex, Reader x, int length) throws SQLException { throw Util.notImplemented(); } |
attrs.setProperty("serverName","localhost"); attrs.setProperty("portNumber","20000"); | if (TestUtil.isJCCFramework()) { attrs.setProperty("serverName","localhost"); } attrs.setProperty("portNumber","20000"); | private Properties addRequiredAttributes(Properties attrs) { if (TestUtil.isJCCFramework()) { attrs.setProperty("driverType","4"); } attrs.setProperty("serverName","localhost"); attrs.setProperty("portNumber","20000"); //attrs.setProperty("retrieveMessagesFromServerOnGetMessage","true"); return attrs; } |
System.setProperty("ij.user", "EDWARD"); System.setProperty("ij.password", "noodle"); | if (TestUtil.isJCCFramework()) { System.setProperty("ij.user", "EDWARD"); System.setProperty("ij.password", "noodle"); } | public void setProperties() { // Set required server properties. System.setProperty("database", TestUtil.getJdbcUrlPrefix("localhost", NETWORKSERVER_PORT) + "wombat;create=true"); System.setProperty("ij.user", "EDWARD"); System.setProperty("ij.password", "noodle"); } |
public static String getJdbcUrlPrefix(String server, int port) { int framework = getFramework(); switch (framework) { case EMBEDDED_FRAMEWORK: return "jdbc:derby:"; case DERBY_NET_FRAMEWORK: case OLD_NET_FRAMEWORK: return "jdbc:derby:net: case DERBY_NET_CLIENT_FRAMEWORK: return "jdbc:derby: case DB2JCC_FRAMEWORK: retur... | public static String getJdbcUrlPrefix() { String hostName=getHostName(); return getJdbcUrlPrefix(hostName, 1527); } | public static String getJdbcUrlPrefix(String server, int port) { int framework = getFramework(); switch (framework) { case EMBEDDED_FRAMEWORK: return "jdbc:derby:"; case DERBY_NET_FRAMEWORK: case OLD_NET_FRAMEWORK: return "jdbc:derby:net://" + server + ":" + port + "/"; case DERBY_NET_CLIENT_F... |
public static void dumpSQLExceptions(SQLException sqle, boolean expected) { String prefix = ""; if (!expected) { System.out.println("FAIL -- unexpected exception ****************"); } else { prefix = "EXPECTED "; } do { System.out.println(prefix + "SQLSTATE("+sqle.getSQLState()+"): " + sqle.getMessage()); sqle = sqle.... | public static void dumpSQLExceptions(SQLException sqle) { TestUtil.dumpSQLExceptions(sqle, false); | public static void dumpSQLExceptions(SQLException sqle, boolean expected) { String prefix = ""; if (!expected) { System.out.println("FAIL -- unexpected exception ****************"); } else { prefix = "EXPECTED "; } do { System.out.println(prefix + "SQLSTATE("+sqle.getSQLState()+"): " + sqle.getMessage())... |
byte [] bA = new byte[16800000]; | int lobSize = 16800000; | public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... |
new java.io.ByteArrayInputStream(bA), bA.length); | new LoopingAlphabetStream(lobSize), lobSize); | public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... |
Connection conn = DriverManager.getConnection("jdbc:default:connection"); | public static void insertAsciiColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { Connection conn = DriverManager.getConnection("jdbc:default:connection"); PreparedStatement ps = conn.prepareStatement(stmtText); setAsciiColumn(ps, colNumber, value.charAt(0), len... | |
Connection conn = DriverManager.getConnection("jdbc:default:connection"); | public static void insertBinaryColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { Connection conn = DriverManager.getConnection("jdbc:default:connection"); PreparedStatement ps = conn.prepareStatement(stmtText); setBinaryColumn(ps, colNumber, value.charAt(0), l... | |
throw Util.notImplemented(); | getPreparedStatement().setBlob (parameterIndex, inputStream, length); | public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setClob (parameterIndex, reader, length); | public void setClob(int parameterIndex, Reader reader, long length) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setNCharacterStream (index, value, length); | public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setNClob (index, value); | public void setNClob(int index, NClob value) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setNString (index, value); | public void setNString(int index, String value) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setRowId (parameterIndex, x); | public void setRowId(int parameterIndex, RowId x) throws SQLException{ throw Util.notImplemented(); } |
throw Util.notImplemented(); | getPreparedStatement().setSQLXML (parameterIndex, xmlObject); | public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{ throw Util.notImplemented(); } |
public boolean isClosed() throws SQLException { | protected boolean isClosed() throws SQLException { | public boolean isClosed() throws SQLException { // NOTE 1: Depending on implementation, this method may have to be // duplicated in the 3 *Statement40 classes. // NOTE 2: This is the only method using the Util class. Remove // import when method is implemented. throw Util... |
protected PreparedStatement getPreparedStatement() throws SQLException { | public PreparedStatement getPreparedStatement() throws SQLException { | protected PreparedStatement getPreparedStatement() throws SQLException { return control.getRealPreparedStatement(); } |
public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } | public void open(LogWriter lw, StepLoader steploader, Repository rep, JobMeta ti) { this.log = lw; this.rep = rep; this.jobMeta = ti; | public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... |
if (jobMeta.getName()!=null) setName(jobMeta.getName()+" ("+super.getName()+")"); } | if (ti.getName()!=null) setName(ti.getName()+" ("+super.getName()+")"); active=false; stopped=false; jobTracker = new JobTracker(jobMeta); parentThread = Thread.currentThread(); } | public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... |
public void waitUntilFinished(long maxMiliseconds) { long time = 0L; while (isAlive() && (time<maxMiliseconds || maxMiliseconds<0)) { try { Thread.sleep(10); time+=10; } catch(InterruptedException e) {} } } | public void waitUntilFinished() { waitUntilFinished(-1L); } | public void waitUntilFinished(long maxMiliseconds) { long time = 0L; while (isAlive() && (time<maxMiliseconds || maxMiliseconds<0)) { try { Thread.sleep(10); time+=10; } catch(InterruptedException e) {} } } |
TemporaryRowHolderResultSet.getNewRSOnCurrentRow(activation.getTransactionController(), brs)); | TemporaryRowHolderResultSet. getNewRSOnCurrentRow(activation, brs)); | void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... |
TemporaryRowHolderResultSet.getNewRSOnCurrentRow(activation.getTransactionController(), ars)); | TemporaryRowHolderResultSet. getNewRSOnCurrentRow(activation, ars)); | void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... |
ps.setQueryTimeout(0L); ResultSet rs = ps.execute(spsActivation, false, false, false); | ResultSet rs = ps.execute(spsActivation, false, false, false, 0L); | protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... |
ps.execute(spsActivation, false, false, false); | ResultSet rs = ps.execute(spsActivation, false, false, false); if( rs.returnsRows()) { while( rs.getNextRow() != null) { } } rs.close(); | protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... |
if (!updateRowCalled_) { resetUpdatedColumns(); } | resetUpdatedColumns(); | public void cancelRowUpdates() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "cancelRowUpdates"); } checkForClosedResultSet(); checkFor... |
Boolean nullIndicator = Cursor.ROW_IS_NULL; | private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... | |
cursor_.isUpdateDeleteHoleCache_.set((int) currentRowInRowset_, nullIndicator); cursor_.isUpdateDeleteHole_ = ((Boolean) cursor_.isUpdateDeleteHoleCache_.get((int) currentRowInRowset_)).booleanValue(); | if (preparedStatementForDelete_.updateCount_ > 0) { cursor_.isUpdateDeleteHoleCache_.set((int) currentRowInRowset_, Cursor.ROW_IS_NULL); cursor_.isUpdateDeleteHole_ = ((Boolean) cursor_.isUpdateDeleteHoleCache_. get((int) currentRowInRowset_)).booleanValue(); } | private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... |
updateRowCalled_ = false; | private final void resetUpdatedColumns() { if (updatedColumns_ != null) { for (int i = 0; i < updatedColumns_.length; i++) { updatedColumns_[i] = null; } } if (columnUpdated_ != null) { for (int i = 0; i < columnUpdated_.length; i++) { ... | |
updateRowCalled_ = true; } catch (SqlException e) { try { cancelRowUpdates(); } catch ( SQLException se ) { throw new SqlException(se); } throw e; | } finally { resetUpdatedColumns(); | private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... |
cursor_.setIsRowUpdated(true); | if (preparedStatementForUpdate_.updateCount_ > 0) { getAbsoluteRowset(absolutePosition_); } | private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... |
throws SQLException{ | throws SQLClientInfoException{ | public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } |
} catch (SQLException se) { | } catch (SQLClientInfoException se) { | public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } |
catch (SQLException se) { throw new SQLClientInfoException (se.getMessage(), se.getSQLState(), (new FailedProperties40 (FailedProperties40.makeProperties(name,value))). getProperties()); } | public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } | |
if (!isServerStarted(networkServer, 60)) System.exit(-1); | if (!isServerStarted(networkServer, 60)) { System.out.println("FAIL: Server failed to respond to ping - ending test"); break; } | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... |
super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); ps = new EmbedPreparedStatement40(conn, sql, false, resultSetType, resultSetConcurrency, resultSetHoldability, java.sql.Statement.NO_GENERATED_KEYS, null, null); | super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); | public EmbedCallableStatement40(EmbedConnection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException{ super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); ps = new EmbedPreparedStatement40(conn, sql, f... |
public <T> T createQueryObject(Class<T> ifc) throws SQLException { throw Util.notImplemented(); | public <T extends BaseQuery> T createQueryObject(Class<T> ifc) throws SQLException { return QueryObjectFactory.createDefaultQueryObject (ifc, this); | public <T> T createQueryObject(Class<T> ifc) throws SQLException { throw Util.notImplemented(); } |
if (lastSoftUpgradeVersion <= DataDictionary.DD_VERSION_DERBY_10_2) { if (fromMajorVersionNumber <= DataDictionary.DD_VERSION_DERBY_10_2) { modifySysTableNullability(tc, DataDictionaryImpl.SYSSTATEMENTS_CATALOG_NUM); modifySysTableNullability(tc, DataDictionaryImpl.SYSVIEWS_CATALOG_NUM); } } | private void applySafeChanges(TransactionController tc, int fromMajorVersionNumber, int lastSoftUpgradeVersion) throws StandardException { /* * OLD Cloudscape 5.1 upgrade code, Derby does not support * upgrade from Cloudscape 5.x databases. If it ever is changed * to do so, this code would be useful. * * ... | |
case DataDictionary.DD_VERSION_DERBY_10_3: return "10.3"; | private static String majorToString(int majorVersionNumber) { switch (majorVersionNumber) { case DataDictionary.DD_VERSION_CS_5_0: return "5.0"; case DataDictionary.DD_VERSION_CS_5_1: return "5.1"; case DataDictionary.DD_VERSION_CS_5_2: return "5.2"; case DataDictionary.DD_VERSION_CS_8_1: return "8.1"; c... | |
{ String[] arg_names = { "CATALOGNAME", "SCHEMANAME", "FUNCNAME", "OPTIONS"}; TypeDescriptor[] arg_types = { DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128), DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128), DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128), ... | void create_10_2_system_procedures( TransactionController tc, UUID sysUtilUUID) throws StandardException { // void SYSCS_UTIL.SYSCS_BACKUP_DATABASE_NOWAIT( // IN BACKUPDIR VARCHAR(Limits.DB2_VARCHAR_MAXWIDTH) // ) { // proc... | |
wroteLength <= total ; | wroteLength < total ; | public int read( char[] cbuf, int off, int len ){ if(wroteLength >= total) return -1; int i; for(i = off ; i < off + len && wroteLength <= total ; i++, wroteLength ++){ cbuf[i] = (char) (wroteLength % 0x10000L); } return i - off; } |
userSuppliedOptimizerOverrides, | public NoPutResultSet getBulkTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, ... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getDistinctScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, int hashKeyColumn, String tableName, String indexName, boolean isConstraint, int... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, ... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getHashLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFu... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getHashScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int ... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getLastIndexKeyResultSet ( Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEs... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, ... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod empt... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getRaDependentTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, ... | |
userSuppliedOptimizerOverrides, | public NoPutResultSet getTableScanResultSet( long conglomId, int scociItem, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int... | |
protected Lob(Agent agent) { | protected Lob(Agent agent, boolean willBeLayerBStreamed) { | protected Lob(Agent agent) { agent_ = agent; lengthObtained_ = false; } |
willBeLayerBStreamed_ = willBeLayerBStreamed; | protected Lob(Agent agent) { agent_ = agent; lengthObtained_ = false; } | |
double optimizerEstimatedCost, GeneratedMethod closeCleanup | double optimizerEstimatedCost | RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... |
this.closeCleanup = closeCleanup; | RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... | |
if (closeCleanup != null) { closeCleanup.invoke(activation); } | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if (isOpen) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be... | |
private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; | private boolean caseGrantRevoke(Connection conn, int phase, URLClassLoader classLoader, boolean sqlAuthorization) throws Exception { System.out.println("Test grant/revoke, Phase: " + PHASES[phase] + "; " + "derby.database.sqlAuthorization=" + sqlAuthorization); boolean passed = true; boolean grantRevokeSupport = ((old... | private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... |
if(grantRevokeNotSupported) passed = testGrantRevokeNotSupported(s, phase); | passed = testGrantRevokeSupport(s, phase, grantRevokeSupport); | private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... |
private Connection getConnection(URLClassLoader classLoader, String dbName, | private Connection getConnection(URLClassLoader classLoader, | private Connection getConnection(URLClassLoader classLoader, String dbName, int phase) throws Exception{ Connection conn = null; Properties prop = new Properties(); prop.setProperty("databaseName", dbName); switch(phase) { case PH_CREATE: prop.setProperty("connectionAttributes", "create=true"); b... |
String dbName = "wombat"; | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | |
conn = getConnection(classLoader, dbName, phase); | conn = getConnection(classLoader, phase); | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... |
passed = caseGrantRevoke(conn, phase, oldMajorVersion, oldMinorVersion) && passed; | passed = caseGrantRevoke(conn, phase, classLoader, false) && passed; if(phase == PH_HARD_UPGRADE) { setSQLAuthorization(conn, true); conn = restartDatabase(classLoader); passed = caseGrantRevoke(conn, phase, classLoader, true) && passed; } | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... |
shutdown(classLoader, dbName); | shutdownDatabase(classLoader); | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... |
protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException { return stringCompare(char1.getCharArray(), char1.getLength(), char2.getCharArray(), char2.getLength()); } | protected static int stringCompare(String op1, String op2) { int posn; char leftchar; char rightchar; int leftlen; int rightlen; int retvalIfLTSpace; String remainingString; int remainingLen; if (op1 == null || op2 == null) { if (op1 != null) return -1; if (op2 != null) return 1; return 0; } leftlen = ... | protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException { return stringCompare(char1.getCharArray(), char1.getLength(), char2.getCharArray(), char2.getLength()); } |
protected ContainerLocking2(LockFactory lf) | protected ContainerLocking2() | protected ContainerLocking2(LockFactory lf) { this.lf = lf; } |
this.lf = lf; | this.lf = null; | protected ContainerLocking2(LockFactory lf) { this.lf = lf; } |
{ for (Enumeration e = trans.elements(); e.hasMoreElements(); ) { TransactionTableEntry ent = (TransactionTableEntry) e.nextElement(); if (ent != null && ent.isRecovery() && (ent.getTransactionStatus() & Xact.END_PREPARED) != 0) { return true; } } return false; } | { return hasPreparedXact(true); } | public boolean hasPreparedRecoveredXact() { for (Enumeration e = trans.elements(); e.hasMoreElements(); ) { TransactionTableEntry ent = (TransactionTableEntry) e.nextElement(); if (ent != null && ent.isRecovery() && (ent.getTransactionStatus() & Xact.END_PREPARED) != 0) { return true; ... |
throw new SqlException(agent_.logWriter_, "This is a named savepoint.").getSQLException(); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_ID_FOR_NAMED_SAVEPOINT)).getSQLException(); | public int getSavepointId() throws SQLException { if (savepointId_ != 0) { return savepointId_; } else { throw new SqlException(agent_.logWriter_, "This is a named savepoint.").getSQLException(); } } |
throw new SqlException(agent_.logWriter_, "This is an un-named savepoint.").getSQLException(); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_NAME_FOR_UNNAMED_SAVEPOINT)).getSQLException(); | public String getSavepointName() throws SQLException { if (savepointName_ != null) { return savepointName_; } else { throw new SqlException(agent_.logWriter_, "This is an un-named savepoint.").getSQLException(); } } |
public HeapRowLocation() | HeapRowLocation(RecordHandle rh) | public HeapRowLocation() { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } |
this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; | setFrom(rh); | public HeapRowLocation() { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } |
public BaseTypeIdImpl(int formatId) { this.formatId = formatId; setTypeIdSpecificInstanceVariables(); } | public BaseTypeIdImpl() {} | public BaseTypeIdImpl(int formatId) { this.formatId = formatId; setTypeIdSpecificInstanceVariables(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.