rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
execCmdDumpResults(maxthreadsCmd3); | ExecProcUtil.execCmdDumpResults(maxthreadsCmd3,vCmd,bos); | public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; 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 vC... |
execCmdDumpResults(maxthreadsCmd4); | ExecProcUtil.execCmdDumpResults(maxthreadsCmd4,vCmd,bos); | public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; 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 vC... |
execCmdDumpResults(maxthreadsCmd5); | ExecProcUtil.execCmdDumpResults(maxthreadsCmd5,vCmd,bos); | public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; 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 vC... |
execCmdDumpResults(maxthreadsCmd6); | ExecProcUtil.execCmdDumpResults(maxthreadsCmd6,vCmd,bos); | public static void main (String args[]) throws Exception { host = TestUtil.getHostName(); maxthreadsCmd2[4] = host; 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 vC... |
System.out.println("FAIL -- unexpected exception"); | if( se.getSQLState() != null && (se.getSQLState().equals(EXPECTED_SQL_STATE))) { System.out.println("PASS -- expected exception"); | static private void dumpSQLExceptions (SQLException se) { System.out.println("FAIL -- unexpected exception"); while (se != null) { System.out.println("SQLSTATE("+se.getSQLState()+"): "+se); se = se.getNextException(); } ... |
System.out.println("SQLSTATE("+se.getSQLState()+"): "+se); se = se.getNextException(); | System.out.println("SQLSTATE("+se.getSQLState()+"): "+se.getMessage()); se = se.getNextException(); | static private void dumpSQLExceptions (SQLException se) { System.out.println("FAIL -- unexpected exception"); while (se != null) { System.out.println("SQLSTATE("+se.getSQLState()+"): "+se); se = se.getNextException(); } ... |
} else { System.out.println("FAIL--Unexpected SQLException: "+se.getMessage()); se.printStackTrace(System.out); } | static private void dumpSQLExceptions (SQLException se) { System.out.println("FAIL -- unexpected exception"); while (se != null) { System.out.println("SQLSTATE("+se.getSQLState()+"): "+se); se = se.getNextException(); } ... | |
Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; String returnValue = null; | public static void test1(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; String returnValue = null; System.out.println("Te... | |
sqle.printStackTrace(); | public static void test1(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; String returnValue = null; System.out.println("Te... | |
System.out.println("FAIL -- unexpected exception: "+e); e.printStackTrace(); | System.out.println("FAIL -- unexpected exception: "+e.getMessage()); e.printStackTrace(System.out); | public static void test1(String []args) { Connection con; ResultSet rs; PreparedStatement stmt = null; PreparedStatement pStmt = null; Statement stmt1 = null; String returnValue = null; System.out.println("Te... |
if (connection_.resultSetHoldability_ == 0) { setDefaultResultSetHoldability(); } | protected void computeFeatureSet_() { if (connection_.resultSetHoldability_ == 0) // property not set { setDefaultResultSetHoldability(); } // Support for QRYCLSIMP was added in 10.2.0 if (productLevel_.greaterThanOrEqualTo(10, 2, 0)) { supportsQryclsimp_ = ... | |
Enumeration enum = tableProperties.keys(); while (enum.hasMoreElements()) | Enumeration e = tableProperties.keys(); while (e.hasMoreElements()) | public void verifyProperties(DataDictionary dDictionary) throws StandardException { if (tableProperties == null) { return; } /* Check here for: * invalid properties key * invalid joinStrategy * invalid value for hashInitialCapacity * invalid value for hashLoadFactor * invalid value for hashMaxCap... |
String key = (String) enum.nextElement(); | String key = (String) e.nextElement(); | public void verifyProperties(DataDictionary dDictionary) throws StandardException { if (tableProperties == null) { return; } /* Check here for: * invalid properties key * invalid joinStrategy * invalid value for hashInitialCapacity * invalid value for hashLoadFactor * invalid value for hashMaxCap... |
} | public void verifyProperties(DataDictionary dDictionary) throws StandardException { if (tableProperties == null) { return; } /* Check here for: * invalid properties key * invalid joinStrategy * invalid value for hashInitialCapacity * invalid value for hashLoadFactor * invalid value for hashMaxCap... | |
if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerbyNet()) { | if (usingDerbyNet()) { | private static void assertMultipleResultsFromExecuteQuery(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerb... |
fail("Unrecognized framework."); | assertSQLState("Unexpected SQL state.", "X0Y78", sqle); | private static void assertMultipleResultsFromExecuteQuery(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerb... |
if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ205", sqle); } else if (usingDerbyNet()) { | if (usingDerbyNet()) { | private static void assertNoResultSetFromExecuteQuery(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ205", sqle); } else if (usingDerbyNet())... |
fail("Unrecognized framework."); | assertSQLState("Unexpected SQL state.", "X0Y78", sqle); | private static void assertNoResultSetFromExecuteQuery(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y78", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ205", sqle); } else if (usingDerbyNet())... |
if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y79", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerbyNet()) { | if (usingDerbyNet()) { | private static void assertResultsFromExecuteUpdate(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y79", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerbyNet()) { ... |
fail("Unrecognized framework."); | assertSQLState("Unexpected SQL state.", "X0Y79", sqle); | private static void assertResultsFromExecuteUpdate(SQLException sqle) { if (usingEmbedded()) { assertSQLState("Unexpected SQL state.", "X0Y79", sqle); } else if (usingDerbyNetClient()) { assertSQLState("Unexpected SQL state.", "XJ201", sqle); } else if (usingDerbyNet()) { ... |
} if (usingEmbedded()) { | public static Test suite() { TestSuite suite = new TestSuite(ProcedureTest.class); if (!usingDerbyNet()) { suite.addTest (new ProcedureTest ("xtestExecuteUpdateWithNoDynamicResultSets")); suite.addTest (new ProcedureTest ... | |
suite.addTest (new ProcedureTest ("xtestRollbackStoredProcWhenExecuteQueryReturnsNothing" + "_prepared")); suite.addTest (new ProcedureTest ("xtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch" + "_prepared")); suite.addTest (new ProcedureTest ("xtestRollbackStoredProcWhenExecuteUpdateReturnsResults" + "_prepared"))... | public static Test suite() { TestSuite suite = new TestSuite(ProcedureTest.class); if (!usingDerbyNet()) { suite.addTest (new ProcedureTest ("xtestExecuteUpdateWithNoDynamicResultSets")); suite.addTest (new ProcedureTest ... | |
private void initSlotTable() | private void initSlotTable( PageKey newIdentity) | private void initSlotTable() throws StandardException { int localSlotsInUse = slotsInUse; // must initialize the header now initializeHeaders(localSlotsInUse); // mark all the space on the page as free clearAllSpace(); // first count the space occupied by the slot table freeSpace -= localSlotsInUse * ... |
SQLState.DATA_CORRUPT_PAGE, getPageId())); | SQLState.DATA_CORRUPT_PAGE, newIdentity)); | private void initSlotTable() throws StandardException { int localSlotsInUse = slotsInUse; // must initialize the header now initializeHeaders(localSlotsInUse); // mark all the space on the page as free clearAllSpace(); // first count the space occupied by the slot table freeSpace -= localSlotsInUse * ... |
SQLState.DATA_CORRUPT_PAGE, ioe, getPageId())); | SQLState.DATA_CORRUPT_PAGE, ioe, newIdentity)); | private void initSlotTable() throws StandardException { int localSlotsInUse = slotsInUse; // must initialize the header now initializeHeaders(localSlotsInUse); // mark all the space on the page as free clearAllSpace(); // first count the space occupied by the slot table freeSpace -= localSlotsInUse * ... |
if(constants.hasAutoincrement()) | if(setUserIdentity ) | private void normalInsertCore(LanguageConnectionContext lcc, boolean firstExecute) throws StandardException { boolean firstDeferredRow = true; ExecRow deferredRowBuffer = null; long user_autoinc=0; /* Get or re-use the row changer. * NOTE: We need to set ourself as the top result set * if this i... |
else if(constants.hasAutoincrement()) | else if(setUserIdentity ) | private void normalInsertCore(LanguageConnectionContext lcc, boolean firstExecute) throws StandardException { boolean firstDeferredRow = true; ExecRow deferredRowBuffer = null; long user_autoinc=0; /* Get or re-use the row changer. * NOTE: We need to set ourself as the top result set * if this i... |
GeneratedMethod closeCleanup, | SetOpResultSet( NoPutResultSet leftSource, NoPutResultSet rightSource, Activation activation, int resultSetNumber, long optimizerEstimatedRowCount, double optimizerEstimatedCost, int opType, ... | |
this.closeCleanup = closeCleanup; | SetOpResultSet( NoPutResultSet leftSource, NoPutResultSet rightSource, Activation activation, int resultSetNumber, long optimizerEstimatedRowCount, double optimizerEstimatedCost, int opType, ... | |
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 clearCurrentRow(); currentRow = null; prevCols = null; leftSource.close(); rightS... | |
currentRow = null; | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { if (closeCleanup != null) closeCleanup.invoke(activation); // let activation tidy up clearCurrentRow(); currentRow = null; prevCols = null; leftSource.close(); rightS... | |
SanityManager.ASSERT(oldversion < this.page.getPageVersion()); | if (oldversion >= this.page.getPageVersion()) { SanityManager.THROWASSERT( "oldversion = " + oldversion + ";page version = " + this.page.getPageVersion() + "page = " + page + "; my class name is " + getClass().getName() + " undoOp is " + undoOp.getClass().getName() ); } SanityManager.ASSERT( oldversion < this.page.get... | public final void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException { long oldversion = 0; // sanity check LogInstant oldLogInstant = null; // sanity check if (SanityManager.DEBUG) { oldLogInstant = this.page.getLastLogInstant(); oldversion = this.page.ge... |
runTests(new TestConnection().createEmbeddedConnection()); runTests(new TestConnection().createClientConnection()); | ij.getPropertyArg(args); Connection conn_main = ij.startJBMS(); runTests( conn_main ); | public static void main(String[] args) { try { // Using TestConnection for now instead of ij because // ij.startJBMS() returns null for classes built against // JDK 1.6 runTests(new TestConnection().createEmbeddedConnection()); runTests(new TestConnection().crea... |
"EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.outparams.takesString'" + | "EXTERNAL NAME '" + CLASS_NAME + "takesString'" + | static boolean runCallableStatementWithOutputParamBatch(Connection conn) throws SQLException { boolean passed = true; int updateCount[] = null; ResultSet rs; System.out.println("Negative Callable Statement: callable statement with output parameters in the batch"); Statement s = conn.createStatement(); s... |
int holdability) throws SqlException { | int holdability,ClientPooledConnection cpc) throws SqlException { | public CallableStatement newCallableStatement(Agent agent, org.apache.derby.client.am.Connection connection, String sql,int type,int concurrency, int holdability) throws SqlException { return new CallableStatement(agent,connection,sql,type, concurrency,holdabil... |
concurrency,holdability); | concurrency,holdability,cpc); | public CallableStatement newCallableStatement(Agent agent, org.apache.derby.client.am.Connection connection, String sql,int type,int concurrency, int holdability) throws SqlException { return new CallableStatement(agent,connection,sql,type, concurrency,holdabil... |
String sql,Section section) throws SqlException { return new PreparedStatement(agent,connection,sql,section); | String sql,Section section,ClientPooledConnection cpc) throws SqlException { return new PreparedStatement(agent,connection,sql,section,cpc); | public PreparedStatement newPreparedStatement(Agent agent, org.apache.derby.client.am.Connection connection, String sql,Section section) throws SqlException { return new PreparedStatement(agent,connection,sql,section); } |
TestSuite mainSuite = new TestSuite( "CallableStatementTest and SetObjectUnsupportedTest suite"); TestSuite suite = new TestSuite(CallableStatementTest.class, "CallableStatementTest suite"); mainSuite.addTest(new CallableStatementTestSetup(suite)); mainSuite.addTest(SetObjectUnsupportedTest.suite(true)); return mainSui... | TestSuite suite = new TestSuite("CallableStatementTest suite"); suite.addTest(baseSuite("CallableStatementTest:embedded")); suite.addTest(TestConfiguration.clientServerDecorator( baseSuite("CallableStatementTest:client"))); return suite; | public static Test suite() { TestSuite mainSuite = new TestSuite( "CallableStatementTest and SetObjectUnsupportedTest suite"); TestSuite suite = new TestSuite(CallableStatementTest.class, "CallableStatementTest suite"); mainSuite.addTest(new... |
logFactory.setDatabaseEncrypted(); | logFactory.setDatabaseEncrypted(false); | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... |
boolean error = true; try { | try { | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
error = false; }finally { | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... | |
if (error) { transaction.abort(); } else { if (SanityManager.DEBUG) { crashOnDebugFlag(TEST_REENCRYPT_CRASH_BEFORE_COMMT); | if (SanityManager.DEBUG) { crashOnDebugFlag(TEST_REENCRYPT_CRASH_BEFORE_COMMT, reEncrypt); } if (!logFactory.isCheckpointInLastLogFile()) { logFactory.checkpoint(this, dataFactory, xactFactory, true); } encryptDatabase = false; logFactory.setDatabaseEncrypted(true); if (!reEncrypt) { databaseEncrypted... | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
if (!reEncrypt) { encryptDatabase = false; databaseEncrypted = true; dataFactory.setDatabaseEncrypted(); logFactory.setDatabaseEncrypted(); } else { decryptionEngine = newDecryptionEngine; encryptionEngine = newEncryptionEngine; currentCipherFactory = newCipherFactory; } logFactory.startNewLogFile(); ... | if (reEncrypt) { if (externalKeyEncryption) { StorageFile oldVerifyKeyFile = storageFactory.newStorageFile( | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
if(!privCopyFile(verifyKeyFile, oldVerifyKeyFile)) throw StandardException. newException(SQLState.RAWSTORE_ERROR_COPYING_FILE, verifyKeyFile, oldVerifyKeyFile); currentCipherFactory.verifyKey(reEncrypt, storageFactory, properties); } else { String keyString = properties.getProperty( RawStoreFactory.ENCRYPTED_KEY); i... | if (!privDelete(oldVerifyKeyFile)) throw StandardException.newException( | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
} else { properties.remove(RawStoreFactory.OLD_ENCRYPTED_KEY); } | } else { properties.remove(RawStoreFactory.OLD_ENCRYPTED_KEY); | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
properties.remove(RawStoreFactory.DB_ENCRYPTION_STATUS); } | } properties.remove(RawStoreFactory.DB_ENCRYPTION_STATUS); transaction.close(); } catch (StandardException se) { throw StandardException.newException( (reEncrypt ? SQLState.DATABASE_REENCRYPTION_FAILED : SQLState.DATABASE_ENCRYPTION_FAILED), se, se.getMessage()); } finally { | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... |
transaction.close(); | public void configureDatabaseForEncryption(Properties properties, CipherFactory newCipherFactory) throws StandardException { boolean reEncrypt = (databaseEncrypted && encryptDatabase); // check if the database can be encrypted. canEncryp... | |
private void crashOnDebugFlag(String debugFlag) | private void crashOnDebugFlag(String debugFlag, boolean reEncrypt) | private void crashOnDebugFlag(String debugFlag) throws StandardException { if (SanityManager.DEBUG) { // if the test debug flag is set, throw an // exception to simulate error cases. if (SanityManager.DEBUG_ON(debugFlag)) { Standar... |
StandardException se= StandardException.newException( SQLState.LOG_IO_ERROR, new IOException(debugFlag)); markCorrupt(se); throw se; | StandardException se = StandardException.newException( (reEncrypt ? SQLState.DATABASE_REENCRYPTION_FAILED : SQLState.DATABASE_ENCRYPTION_FAILED), debugFlag); markCorrupt(se); throw se; | private void crashOnDebugFlag(String debugFlag) throws StandardException { if (SanityManager.DEBUG) { // if the test debug flag is set, throw an // exception to simulate error cases. if (SanityManager.DEBUG_ON(debugFlag)) { Standar... |
TEST_REENCRYPT_CRASH_AFTER_RECOVERY_UNDO_LOGFILE_DELETE); | TEST_REENCRYPT_CRASH_AFTER_RECOVERY_UNDO_LOGFILE_DELETE, reEncryption); | public void handleIncompleteDatabaseEncryption(Properties properties) throws StandardException { // find what was the encryption status before database crashed. int dbEncryptionStatus = 0; String dbEncryptionStatusStr = properties.getProperty(RawStoreFactory.DB_ENCRYPTI... |
TEST_REENCRYPT_CRASH_AFTER_RECOVERY_UNDO_REVERTING_KEY); | TEST_REENCRYPT_CRASH_AFTER_RECOVERY_UNDO_REVERTING_KEY, reEncryption); | public void handleIncompleteDatabaseEncryption(Properties properties) throws StandardException { // find what was the encryption status before database crashed. int dbEncryptionStatus = 0; String dbEncryptionStatusStr = properties.getProperty(RawStoreFactory.DB_ENCRYPTI... |
TEST_REENCRYPT_CRASH_BEFORE_RECOVERY_FINAL_CLEANUP); | TEST_REENCRYPT_CRASH_BEFORE_RECOVERY_FINAL_CLEANUP, reEncryption); | public void handleIncompleteDatabaseEncryption(Properties properties) throws StandardException { // find what was the encryption status before database crashed. int dbEncryptionStatus = 0; String dbEncryptionStatusStr = properties.getProperty(RawStoreFactory.DB_ENCRYPTI... |
public GenericPreparedStatement(Statement st) { this(); | GenericPreparedStatement() { UUIDFactory uuidFactory = Monitor.getMonitor().getUUIDFactory(); | public GenericPreparedStatement(Statement st) { this(); statement = st; } |
statement = st; | UUIDValue = uuidFactory.createUUID(); UUIDString = UUIDValue.toString(); spsAction = false; | public GenericPreparedStatement(Statement st) { this(); statement = st; } |
GenericStorablePreparedStatement(Statement stmt) | public GenericStorablePreparedStatement() | GenericStorablePreparedStatement(Statement stmt) { super(stmt); } |
super(stmt); | super(); | GenericStorablePreparedStatement(Statement stmt) { super(stmt); } |
}catch(SQLException e){ System.out.println("Expected exception may happen."); e.printStackTrace(System.out); }finally{ | }catch(SQLException e){ acknowledgeException( e ); } finally{ | public void testGetStreamTwice(Connection conn) throws SQLException, IOException { Statement st = null; ResultSet rs = null; InputStream is = null; try{ st = conn.createStatement(); rs = st.executeQuery("select " + colName + " "+ "from " + tableName); rs.next()... |
}catch(SQLException e){ System.out.println("Expected exception may happen."); e.printStackTrace(System.out); }finally{ | }catch(SQLException e){ acknowledgeException( e ); } finally{ | public void testGetReaderTwice( Connection conn ) throws SQLException, IOException { Statement st = null; ResultSet rs = null; Reader reader = null; try{ st = conn.createStatement(); rs = st.executeQuery( "select " + colName + " " + "from " + tableName ); rs... |
(scanController.isCurrentPositionDeleted()) || (!scanController.doesCurrentPositionQualify())) | (qualify && scanController.isCurrentPositionDeleted()) || (qualify && (!scanController.doesCurrentPositionQualify()))) | public ExecRow getCurrentRow() throws StandardException { ExecRow result = null; if (SanityManager.DEBUG) SanityManager.ASSERT(isOpen, "TSRS expected to be open"); if (currentRowPrescanned) return currentRow; /* Nothing to do if we're not currently on a row or * if the current row get deleted out from un... |
scanController.fetch(result.getRowArray()); | scanController.fetchWithoutQualify(result.getRowArray()); | public ExecRow getCurrentRow() throws StandardException { ExecRow result = null; if (SanityManager.DEBUG) SanityManager.ASSERT(isOpen, "TSRS expected to be open"); if (currentRowPrescanned) return currentRow; /* Nothing to do if we're not currently on a row or * if the current row get deleted out from un... |
if (rlTemplate == null) rlTemplate = scanController.newRowLocationTemplate(); rl = rlTemplate; scanController.fetchLocation(rl); | if (currentRowIsValid) { if (rlTemplate == null) rlTemplate = scanController.newRowLocationTemplate(); rl = rlTemplate; scanController.fetchLocation(rl); } else { rl = null; } | public RowLocation getRowLocation() throws StandardException { RowLocation rl; if (! isOpen) return null; if ( ! scanControllerOpened) return null; /* ** If the conglomerate is keyed, the row location of the base row ** is in the last column of the current row. If it's not keyed, ** we get the row location f... |
protected void checkJBMSToString() throws Exception | protected static void checkJBMSToString() throws Exception | protected void checkJBMSToString() throws Exception { clearConnections(); // Open ten connections rather than just two to // try and catch any odd uniqueness bugs. Still // no guarantee but is better than just two. int numConnections = 10; for ( int i = 0 ; i < numConne... |
protected void checkToString(Connection conn) throws Exception | protected static void checkToString(Connection conn) throws Exception | protected void checkToString(Connection conn) throws Exception { String str = conn.toString(); if ( conns.containsKey(str)) { throw new Exception("ERROR: Connection toString() is not unique: " + str); } conns.put(str, conn); } |
checkStringFormat(conn); | protected void checkToString(Connection conn) throws Exception { String str = conn.toString(); if ( conns.containsKey(str)) { throw new Exception("ERROR: Connection toString() is not unique: " + str); } conns.put(str, conn); } | |
protected void clearConnections() throws SQLException | protected static void clearConnections() throws SQLException | protected void clearConnections() throws SQLException { java.util.Iterator it = conns.values().iterator(); while ( it.hasNext() ) { Connection conn = (Connection)it.next(); conn.close(); } conns.clear(); } |
Factory.getDatabaseOfConnection().backup(backupDir); | backupDatabase(backupDir , true); | public static void SYSCS_BACKUP_DATABASE( String backupDir) throws SQLException { Factory.getDatabaseOfConnection().backup(backupDir); } |
Factory.getDatabaseOfConnection().backupAndEnableLogArchiveMode( | backupDatabaseAndEnableLogArchiveMode( | public static void SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE( String backupDir, int deleteOnlineArchivedLogFiles) throws SQLException { Factory.getDatabaseOfConnection().backupAndEnableLogArchiveMode( backupDir, (deleteOnlineArchivedLogFiles != 0)); } |
(deleteOnlineArchivedLogFiles != 0)); } | (deleteOnlineArchivedLogFiles != 0), true); } | public static void SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE( String backupDir, int deleteOnlineArchivedLogFiles) throws SQLException { Factory.getDatabaseOfConnection().backupAndEnableLogArchiveMode( backupDir, (deleteOnlineArchivedLogFiles != 0)); } |
Factory.getDatabaseOfConnection().disableLogArchiveMode( (deleteOnlineArchivedLogFiles != 0)); | checkBackupTransactionIsIdle(); Connection conn = getDefaultConn(); try { Factory.getDatabaseOfConnection().disableLogArchiveMode( (deleteOnlineArchivedLogFiles != 0)); }catch(SQLException se) { conn.rollback(); throw se; } conn.commit(); | public static void SYSCS_DISABLE_LOG_ARCHIVE_MODE( int deleteOnlineArchivedLogFiles) throws SQLException { Factory.getDatabaseOfConnection().disableLogArchiveMode( (deleteOnlineArchivedLogFiles != 0)); } |
public void saveRep(Repository rep, IProgressMonitor monitor) | public void saveRep(Repository rep) | public void saveRep(Repository rep, IProgressMonitor monitor) throws KettleException { try { int nrWorks = 2+nrDatabases()+nrNotes()+nrJobEntries()+nrJobHops(); if (monitor!=null) monitor.beginTask("Saving transformation "+directory+Const.FILE_SEPARATOR+getName(), nrWorks); // Before we start, make sure we... |
try { int nrWorks = 2+nrDatabases()+nrNotes()+nrJobEntries()+nrJobHops(); if (monitor!=null) monitor.beginTask("Saving transformation "+directory+Const.FILE_SEPARATOR+getName(), nrWorks); if (monitor!=null) monitor.subTask("Handling previous version of job..."); setID( rep.getJobID(getName(), directory.getID()) ... | saveRep(rep, null); | public void saveRep(Repository rep, IProgressMonitor monitor) throws KettleException { try { int nrWorks = 2+nrDatabases()+nrNotes()+nrJobEntries()+nrJobHops(); if (monitor!=null) monitor.beginTask("Saving transformation "+directory+Const.FILE_SEPARATOR+getName(), nrWorks); // Before we start, make sure we... |
return (new TestSuite(ResultSetMetaDataTest.class, "ResultSetMetaDataTest suite")); | return TestConfiguration.defaultSuite(ResultSetMetaDataTest.class); | public static Test suite() { return (new TestSuite(ResultSetMetaDataTest.class, "ResultSetMetaDataTest suite")); } |
ps = null; rs = null; rsmd = null; | protected void tearDown() throws Exception { if(rs != null && !rs.isClosed()) rs.close(); if(ps != null && !ps.isClosed()) ps.close(); super.tearDown(); } | |
JBitSet parentRSNsTables, ResultSetNode childRSN) throws StandardException | JBitSet parentRSNsTables, ResultSetNode childRSN, int [] whichRC) throws StandardException | protected Predicate getPredScopedForResultSet( JBitSet parentRSNsTables, ResultSetNode childRSN) throws StandardException { // We only deal with binary relational operators here. if (!(getAndNode().getLeftOperand() instanceof BinaryRelationalOperatorNode)) { return this; } // The predicate must have an AndN... |
childRSN), | childRSN, whichRC), | protected Predicate getPredScopedForResultSet( JBitSet parentRSNsTables, ResultSetNode childRSN) throws StandardException { // We only deal with binary relational operators here. if (!(getAndNode().getLeftOperand() instanceof BinaryRelationalOperatorNode)) { return this; } // The predicate must have an AndN... |
(opNode.getRightOperand() instanceof ColumnReference)); | (opNode.getRightOperand() instanceof ColumnReference) && (((ColumnReference)opNode.getLeftOperand()).getTableNumber() != ((ColumnReference)opNode.getRightOperand()).getTableNumber())); | protected boolean isJoinPredicate() { // If the predicate isn't a binary relational operator, // then it's not a join predicate. if (!(getAndNode().getLeftOperand() instanceof BinaryRelationalOperatorNode)) { return false; } BinaryRelationalOperatorNode opNode = (BinaryRelationalOperatorNode)getAndNode().g... |
if (fromTable.getExposedName().equals (((FromTable) elementAt(index)).getExposedName()) ) | leftTable = fromTable.getTableName(); if(((FromTable) elementAt(index)) instanceof TableOperatorNode) { continue; } else { rightTable = ((FromTable) elementAt(index)).getTableName(); } if(leftTable.equals(rightTable)) | public void addFromTable(FromTable fromTable) throws StandardException { /* Don't worry about checking TableOperatorNodes since * they don't have exposed names. This will potentially * allow duplicate exposed names in some degenerate cases, * but the binding of the ColumnReferences will catch those * cases w... |
public ResultColumnList expandAll(String allTableName) | public ResultColumnList expandAll(TableName allTableName) | public ResultColumnList expandAll(String allTableName) throws StandardException { ResultColumnList resultColumnList = null; ResultColumnList tempRCList = null; boolean matchfound = false; FromTable fromTable; /* Expand the "*" for the table that matches, if it is qualified * (allTableName is not null) o... |
suite.addTest(new PreparedStatementTest( "embonlytmptestSetClobLengthless")); suite.addTest(new PreparedStatementTest( "embonlytmptestSetBlobLengthless")); suite.addTest(new PreparedStatementTest( "embonlytmptestSetCharacterStreamLengthless")); suite.addTest(new PreparedStatementTest( "embonlytmptestSetAsciiStreamLengt... | public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(PreparedStatementTest.class); suite.addTest(SetObjectUnsupportedTest.suite(false)); return suite; } | |
byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; | public void testSetAsciiStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new ja... | |
InputStream is = new java.io.ByteArrayInputStream(bytes); | InputStream is = new java.io.ByteArrayInputStream(BYTES); | public void testSetAsciiStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new ja... |
ps_sb.setAsciiStream(2,is,bytes.length); | ps_sb.setAsciiStream(2,is,BYTES.length); | public void testSetAsciiStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new ja... |
for(int i=0;i<bytes.length;i++) { assertEquals("Error in inserting data into the Clob",bytes[i],bytes1[i]); | for(int i=0;i<BYTES.length;i++) { assertEquals("Error in inserting data into the Clob",BYTES[i],bytes1[i]); | public void testSetAsciiStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new ja... |
byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; | public void testSetBinaryStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new j... | |
InputStream is = new java.io.ByteArrayInputStream(bytes); | InputStream is = new java.io.ByteArrayInputStream(BYTES); | public void testSetBinaryStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new j... |
ps_sb.setBinaryStream(2,is,bytes.length); | ps_sb.setBinaryStream(2,is,BYTES.length); | public void testSetBinaryStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new j... |
for(int i=0;i<bytes.length;i++) { assertEquals("Error in inserting data into the Blob",bytes[i],bytes1[i]); | for(int i=0;i<BYTES.length;i++) { assertEquals("Error in inserting data into the Blob",BYTES[i],bytes1[i]); | public void testSetBinaryStream() throws Exception { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; byte [] bytes1 = new byte[10]; InputStream is = new j... |
public void testSetBlob() throws SQLException { | public void testSetBlob() throws IOException, SQLException { | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { is.reset(); } catch (IOException ioe) { fail("Failed to reset blob input stream: " + ioe.getMessage()); } | InputStream is = new java.io.ByteArrayInputStream(BYTES); is.reset(); | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
ps_sb.setBlob(2,is,bytes.length); | ps_sb.setBlob(2,is,BYTES.length); | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
Blob blobToBeInerted = rs.getBlob(2); | Blob blobToBeInserted = rs.getBlob(2); | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
ps_sb.setBlob(2,blobToBeInerted); | ps_sb.setBlob(2,blobToBeInserted); | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
if(!equalBlob(blobToBeInerted,blobRetrieved)) fail("Blob not inserted properly using setBlob"); | assertEquals(blobToBeInserted, blobRetrieved); | public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { ... |
public void testSetClob() throws SQLException { | public void testSetClob() throws IOException, SQLException { | public void testSetClob() throws SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { ... |
try { is.reset(); } catch (IOException ioe) { fail("Failed to reset blob input stream: " + ioe.getMessage()); } | is.reset(); | public void testSetClob() throws SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { ... |
Clob clobToBeInerted = rs.getClob(2); | Clob clobToBeInserted = rs.getClob(2); | public void testSetClob() throws SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { ... |
ps_sc.setClob(2,clobToBeInerted); | ps_sc.setClob(2,clobToBeInserted); | public void testSetClob() throws SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { ... |
if(!equalClob(clobToBeInerted,clobRetrieved)) fail("Clob not inserted properly using setClob"); | assertEquals(clobToBeInserted,clobRetrieved); | public void testSetClob() throws SQLException { //insert default values into the table String str = "Test data for the Clob object"; StringReader is = new StringReader("Test data for the Clob object"); try { is.reset(); } catch (IOException ioe) { ... |
boolean exists = (new File("extin", "littleclob.txt")).exists(); | boolean exists = (new File("extin", "littleclob.utf")).exists(); | public static void main(String[] args) { Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Test resultsetStream starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); st... |
File file = new File(filePath + sep + "littleclob.txt"); | File file = new File(filePath + sep + "littleclob.utf"); | public static void main(String[] args) { Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Test resultsetStream starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.