rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
case NetConfiguration.SECMEC_USRSSBPWD: checkUserPassword(user_, password); flowUSRSSBPWDconnect(password); break;
public void flowConnect(String password, int securityMechanism) throws SqlException { netAgent_ = (NetAgent) super.agent_; constructExtnam(); // these calls need to be after newing up the agent // because they require the ccsid manager constructPrddta();...
case NetConfiguration.SECMEC_USRSSBPWD: checkUserPassword(user_, password); resetConnectionAtFirstSql_ = true; setDeferredResetPassword(password); return true;
protected boolean flowReconnect(String password, int securityMechanism) throws SqlException { constructExtnam(); // these calls need to be after newing up the agent // because they require the ccsid manager constructPrddta(); //modify this to not new up an array checkSecmgrForSec...
encryptionManager_ = new org.apache.derby.client.am.EncryptionManager(agent_);
encryptionManager_ = new EncryptionManager(agent_);
private void initializePublicKeyForEncryption() throws SqlException { if (encryptionManager_ == null) { encryptionManager_ = new org.apache.derby.client.am.EncryptionManager(agent_); } publicKey_ = encryptionManager_.obtainPublicKey(); }
sourceSeed_ = null; targetSeed_ = null;
public void resetNetConnection(org.apache.derby.client.am.LogWriter logWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource ds, boolean recomputeFromDat...
targetPublicKey_ = sectkn;
if (targetSecmec_ == NetConfiguration.SECMEC_USRSSBPWD) targetSeed_ = sectkn; else targetPublicKey_ = sectkn;
void setAccessSecurityData(int secchkcd, int desiredSecmec, int[] secmecList, boolean sectknReceived, byte[] sectkn) throws DisconnectException { // - if the secchkcd is not 0, then map to ...
initializePublicKeyForEncryption();
if (securityMechanism_ == NetConfiguration.SECMEC_USRSSBPWD) initializeClientSeed(); else initializePublicKeyForEncryption();
void writeDeferredReset() throws SqlException { if (canUseCachedConnectBytes_ && cachedConnectBytes_ != null && (securityMechanism_ == NetConfiguration.SECMEC_USRIDPWD || securityMechanism_ == NetConfiguration.SECMEC_USRIDONL)) { writeDeferredResetFromCache(); ...
flowServerAttributesAndKeyExchange(securityMechanism_, publicKey_);
if (securityMechanism_ == NetConfiguration.SECMEC_USRSSBPWD) flowSeedExchange(securityMechanism_, sourceSeed_); else flowServerAttributesAndKeyExchange(securityMechanism_, publicKey_);
void writeDeferredReset() throws SqlException { if (canUseCachedConnectBytes_ && cachedConnectBytes_ != null && (securityMechanism_ == NetConfiguration.SECMEC_USRIDPWD || securityMechanism_ == NetConfiguration.SECMEC_USRIDONL)) { writeDeferredResetFromCache(); ...
else {
else if (securityMechanism_ == NetConfiguration.SECMEC_USRSSBPWD) { writeSecurityCheckAndAccessRdb(NetConfiguration.SECMEC_USRSSBPWD, user_, null, null, passwordSubstituteForUSRSSBPWD(getDeferredResetPassword())); } else {
void writeDeferredReset() throws SqlException { if (canUseCachedConnectBytes_ && cachedConnectBytes_ != null && (securityMechanism_ == NetConfiguration.SECMEC_USRIDPWD || securityMechanism_ == NetConfiguration.SECMEC_USRIDONL)) { writeDeferredResetFromCache(); ...
Logs.reportMessage("CSLOOK_Header", "stored procedures");
Logs.reportMessage("CSLOOK_StoredProcHeader");
public static void doStoredProcedures(Connection conn) throws SQLException { // Note: it is safe to cast the long varchar column "javaclassname" // to varchar(128) because it is defined to correspond to the // 'aliasid' column for a given stored procedure; since the aliasid // column is varchar(128), javaclassnam...
String urlText = null;
protected URL createRelativeURL(URL rootURL, String relativeURI) throws MalformedURLException { String urlText = null; if (rootURL == null) { String userDir = System.getProperty("user.dir"); urlText = "file://" + userDir + relativeURI; } else { url...
String userDir = System.getProperty("user.dir"); urlText = "file:
File file = new File(System.getProperty("user.dir")); rootURL = file.toURL();
protected URL createRelativeURL(URL rootURL, String relativeURI) throws MalformedURLException { String urlText = null; if (rootURL == null) { String userDir = System.getProperty("user.dir"); urlText = "file://" + userDir + relativeURI; } else { url...
else { urlText = rootURL.toString() + relativeURI; }
String urlText = rootURL.toString() + relativeURI;
protected URL createRelativeURL(URL rootURL, String relativeURI) throws MalformedURLException { String urlText = null; if (rootURL == null) { String userDir = System.getProperty("user.dir"); urlText = "file://" + userDir + relativeURI; } else { url...
Object module,
String db_name,
public static long diag_containerid_to_conglomid( Object module, long containerid) { String ret_string = null; AccessFactory store_module = null; long conglom_id = Long.MIN_VALUE; // Find the AccessFactory store_module = (AccessFacto...
String ret_string = null; AccessFactory store_module = null; long conglom_id = Long.MIN_VALUE;
Object store_module = getModuleFromDbName(db_name);
public static long diag_containerid_to_conglomid( Object module, long containerid) { String ret_string = null; AccessFactory store_module = null; long conglom_id = Long.MIN_VALUE; // Find the AccessFactory store_module = (AccessFacto...
store_module = (AccessFactory) Monitor.getServiceModule(module, AccessFactory.MODULE); if (store_module != null) { try { TransactionController tc = store_module.getTransaction( ContextService.getFactory().getCurrentContextManager()); conglom_id = tc.findConglomid(containerid); } catch (Throwable t) { t.printStackTrac...
return(diag_containerid_to_conglomid(store_module, containerid));
public static long diag_containerid_to_conglomid( Object module, long containerid) { String ret_string = null; AccessFactory store_module = null; long conglom_id = Long.MIN_VALUE; // Find the AccessFactory store_module = (AccessFacto...
public boolean init(int initSize, int maxSize)
public boolean init()
public boolean init(int initSize, int maxSize) { this.maxSize = maxSize; if (maxSize < initSize) initSize = maxSize; array = new Node[initSize]; if (array == null) return false; nAllocated = 0; return true; }
this.maxSize = maxSize; if (maxSize < initSize) initSize = maxSize; array = new Node[initSize]; if (array == null) return false; nAllocated = 0; return true;
return init(DEFAULT_INIT_SIZE, DEFAULT_MAX_SIZE);
public boolean init(int initSize, int maxSize) { this.maxSize = maxSize; if (maxSize < initSize) initSize = maxSize; array = new Node[initSize]; if (array == null) return false; nAllocated = 0; return true; }
super(message); nestedException = nestedError;
super(message, nestedError);
public AssertFailure(String message, Throwable nestedError) { super(message); nestedException = nestedError; }
getAllRelevantConstraints(dataDictionary,
getCompilerContext().pushCurrentPrivType( Authorizer.NULL_PRIV); try { getAllRelevantConstraints(dataDictionary,
public ValueNode bindConstraints ( DataDictionary dataDictionary, NodeFactory nodeFactory, TableDescriptor targetTableDescriptor, Dependent dependent, ResultColumnList sourceRCL, int[] changedColumnIds, FormatableBitSet readColsBitSet, boolean skipCheckConstraints, boolean includeTriggers ...
} } finally { getCompilerContext().popCurrentPrivType();
public ValueNode bindConstraints ( DataDictionary dataDictionary, NodeFactory nodeFactory, TableDescriptor targetTableDescriptor, Dependent dependent, ResultColumnList sourceRCL, int[] changedColumnIds, FormatableBitSet readColsBitSet, boolean skipCheckConstraints, boolean includeTriggers ...
public FKInfo( String[] fkConstraintNames, String tableName, int stmtType, int type, UUID refUUID, long refConglomNumber, UUID[] fkUUIDs, long[] fkConglomNumbers, boolean[] fkIsSelfReferencing, int[] colArray, RowLocation rowLocation, int[] raRules ) { this.fkConstraintName...
public FKInfo() {}
public FKInfo( String[] fkConstraintNames, String tableName, int stmtType, int type, UUID refUUID, long refConglomNumber, UUID[] fkUUIDs, long[] fkConglomNumbers, boolean[] fkIsSelfReferencing, int[] colArray, RowLocation rowLocation, int[...
public TriggerInfo ( TableDescriptor td, int[] changedCols, GenericDescriptorList triggers ) throws StandardException { this.columnIds = changedCols; if (columnIds != null) { columnNames = new String[columnIds.length]; for (int i = 0; i < columnIds.length; i++) { columnNames[i] = td.getColumnDescriptor(columnId...
public TriggerInfo() {}
public TriggerInfo ( TableDescriptor td, int[] changedCols, GenericDescriptorList triggers ) throws StandardException { this.columnIds = changedCols; if (columnIds != null) { /* ** Find the names of all the columns that are ** being changd. */ columnNames = new String[columnIds.length]; for (in...
TestConnection tc=null; Connection conn_main=null; PreparedStatement ps_main=null; ResultSet rs_main=null;
try { ij.getPropertyArg(args); Connection conn_main = ij.startJBMS(); PreparedStatement ps_main=null; ResultSet rs_main=null;
public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; PreparedStatement ps_main=null; ResultSet rs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e)...
try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e) { e.printStackTrace(); }
ps_main = conn_main.prepareStatement("select count(*) from sys.systables"); rs_main = ps_main.executeQuery();
public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; PreparedStatement ps_main=null; ResultSet rs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e)...
try { ps_main = conn_main.prepareStatement("select count(*) from sys.systables"); rs_main = ps_main.executeQuery(); } catch(SQLException e) { System.out.println(""+e); e.printStackTrace(); }
TestResultSetMethods trsm = new TestResultSetMethods(); trsm.startTestResultSetMethods(conn_main,ps_main,rs_main);
public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; PreparedStatement ps_main=null; ResultSet rs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e)...
TestResultSetMethods trsm = new TestResultSetMethods(); trsm.startTestResultSetMethods(conn_main,ps_main,rs_main); conn_main=null; ps_main=null; try { conn_main = tc.createClientConnection(); } catch(Exception e) { e.printStackTrace(); } try { ps_main = conn_main.prepareStatement("select count(*) from sys.systable...
} catch(Exception e) { System.out.println(""+e); e.printStackTrace(); }
public static void main(String args[]) { TestConnection tc=null; Connection conn_main=null; PreparedStatement ps_main=null; ResultSet rs_main=null; try { tc = new TestConnection(); conn_main = tc.createEmbeddedConnection(); } catch(Exception e)...
ps.setBinaryStream(i+1, new ByteArrayInputStream(paramBytes), paramBytes.length);
ps.setBytes(i+1, paramBytes);
private void readAndSetExtParam( int i, DRDAStatement stmt, int drdaType, int extLen) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); drdaType = (drdaType & 0x000000ff); // need unsigned value boolean checkNullability = false; if (sqlamLevel >= MGR...
RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array)
RowLocation[] rowloc_array)
public int fetchNextGroup( DataValueDescriptor[][] row_array, RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array) throws StandardException { throw(StandardException.newException( SQLState.HEAP_UNIMPLEMENTED_FEATURE)); }
throw(StandardException.newException( SQLState.HEAP_UNIMPLEMENTED_FEATURE));
return( fetchRows( row_array, rowloc_array, (BackingStoreHashtable) null, row_array.length, (int[]) null));
public int fetchNextGroup( DataValueDescriptor[][] row_array, RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array) throws StandardException { throw(StandardException.newException( SQLState.HEAP_UNIMPLEMENTED_FEATURE)); }
RecordHandle rh)
RowPosition pos)
protected void setRowLocationArray( RowLocation[] rowloc_array, int index, RecordHandle rh) throws StandardException { if (rowloc_array[index] == null) { rowloc_array[index] = new HeapRowLocation(rh); } else { if (SanityMan...
rowloc_array[index] = new HeapRowLocation(rh);
rowloc_array[index] = new HeapRowLocation(pos.current_rh);
protected void setRowLocationArray( RowLocation[] rowloc_array, int index, RecordHandle rh) throws StandardException { if (rowloc_array[index] == null) { rowloc_array[index] = new HeapRowLocation(rh); } else { if (SanityMan...
((HeapRowLocation)rowloc_array[index]).setFrom(rh);
((HeapRowLocation)rowloc_array[index]).setFrom(pos.current_rh);
protected void setRowLocationArray( RowLocation[] rowloc_array, int index, RecordHandle rh) throws StandardException { if (rowloc_array[index] == null) { rowloc_array[index] = new HeapRowLocation(rh); } else { if (SanityMan...
}
else if(constants.hasAutoincrement()) { lcc.setIdentityValue(user_autoinc); } }
private void normalInsertCore(LanguageConnectionContext lcc, boolean firstExecute) throws StandardException { boolean firstDeferredRow = true; ExecRow deferredRowBuffer = null; /* Get or re-use the row changer. * NOTE: We need to set ourself as the top result set * if this is not the 1st execution. (Done in c...
checkCancellationFlag();
public ExecRow getNextRowCore() throws StandardException { ExecRow result = null; beginTime = getCurrentTimeMillis(); if (isOpen && scanControllerOpened) { if (currentRow == null) { currentRow = getCompactRow(candidate, accessedCols, (FormatableBitSet) null, isKeyed); }outer...
TransactionController tc = activation.getTransactionController();
public void truncate() throws StandardException { close(); for (int i = 0; i < rowArray.length; i++) { rowArray[i] = null; } lastArraySlot = -1; numRowsIn = 0; state = STATE_UNINIT; /* ** We are not expecting this to be called ** when we have a temporary conglomerate ** but just to be on the safe side, dr...
if ( autoloading() )
if ( CONFIG.autoloading() )
public void testAutoloading() throws Exception { //CONFIG.setVerbosity( true ); // // We expect that the connection to the database will fail for // one reason or another. // if ( autoloading() ) { println( "We ARE autoloading..." ); // // The DriverManager should have autoloaded the client driver. /...
controlCon_.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
controlCon_.getNetConnection().setTransactionIsolation( Connection.TRANSACTION_READ_UNCOMMITTED);
public NetXAConnection createControlConnection(NetLogWriter logWriter, String user, String password, org.apache.derby.jdbc.ClientDataSource dataSource, ...
String password, int rmId) throws SQLException { try {
String password) throws SQLException { try {
public ClientPooledConnection(ClientDataSource ds, org.apache.derby.client.am.LogWriter logWriter, String user, String password, int rmId) throws SQLException { try { ...
rmId_ = rmId;
public ClientPooledConnection(ClientDataSource ds, org.apache.derby.client.am.LogWriter logWriter, String user, String password, int rmId) throws SQLException { try { ...
netXAPhysicalConnection_ = new org.apache.derby.client.net.NetXAConnection((NetLogWriter) logWriter_,
netPhysicalConnection_ = (org.apache.derby.client.net.NetConnection) ClientDriver.getFactory().newNetConnection( (NetLogWriter) logWriter_,
public ClientPooledConnection(ClientDataSource ds, org.apache.derby.client.am.LogWriter logWriter, String user, String password, int rmId) throws SQLException { try { ...
rmId, true); physicalConnection_ = netXAPhysicalConnection_; } catch ( SqlException se ) {
-1, false); physicalConnection_ = netPhysicalConnection_; } catch ( SqlException se ) {
public ClientPooledConnection(ClientDataSource ds, org.apache.derby.client.am.LogWriter logWriter, String user, String password, int rmId) throws SQLException { try { ...
physicalConnection_.reset(logWriter_, user_, password_, ds_, false);
physicalConnection_.reset(logWriter_, user_, password_, ds_, true);
public synchronized java.sql.Connection getConnection() throws SQLException { try { if (logWriter_ != null) { logWriter_.traceEntry(this, "getConnection"); } createLogicalConnection(); if (!newPC_) { physicalConnection_.reset(lo...
return ( ( tableName != null) ? tableName.getTableName() : ((source != null) ? source.getTableName() : null));
return ((source != null) ? source.getTableName() : null);
public String getSourceTableName() { return ( ( tableName != null) ? tableName.getTableName() : ((source != null) ? source.getTableName() : null)); }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
public int getMaxColumnNameLength() { return 128; }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18;
public int getMaxCursorNameLength() { return 128; }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128;
public int getMaxProcedureNameLength() { return 128; }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
public int getMaxSchemaNameLength() { return 128; }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128;
public int getMaxTableNameLength() { return 128; }
return 128;
return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
public int getMaxUserNameLength() { return 128; }
public boolean setBackupBlockingState() {
public boolean setBackupBlockingState(boolean wait) throws StandardException {
public boolean setBackupBlockingState() { if (!inBackupBlockingState) inBackupBlockingState = xactFactory.canStartBackupBlockingOperation(); return inBackupBlockingState; }
xactFactory.canStartBackupBlockingOperation();
xactFactory.canStartBackupBlockingOperation(wait); }
public boolean setBackupBlockingState() { if (!inBackupBlockingState) inBackupBlockingState = xactFactory.canStartBackupBlockingOperation(); return inBackupBlockingState; }
public abstract boolean setBackupBlockingState();
public abstract boolean setBackupBlockingState(boolean wait) throws StandardException;
public abstract boolean setBackupBlockingState();
protected boolean canStartBackupBlockingOperation()
protected boolean canStartBackupBlockingOperation(boolean wait) throws StandardException
protected boolean canStartBackupBlockingOperation() { synchronized(backupSemaphore) { // do not allow backup blocking operations, if online backup is // is in progress. if (inBackup) { return false; } else { // not in online backup, allow backup blocking operations backupBlockingOperations++; retu...
if (inBackup) { return false; } else { backupBlockingOperations++; return true;
if (inBackup) { if(wait) { while(inBackup) { try { backupSemaphore.wait(); } catch (InterruptedException ie) { throw StandardException.interrupt(ie); } } }else { return false; }
protected boolean canStartBackupBlockingOperation() { synchronized(backupSemaphore) { // do not allow backup blocking operations, if online backup is // is in progress. if (inBackup) { return false; } else { // not in online backup, allow backup blocking operations backupBlockingOperations++; retu...
backupBlockingOperations++; return true;
protected boolean canStartBackupBlockingOperation() { synchronized(backupSemaphore) { // do not allow backup blocking operations, if online backup is // is in progress. if (inBackup) { return false; } else { // not in online backup, allow backup blocking operations backupBlockingOperations++; retu...
if (disallowLocalCommitRollback_()) {
if (! allowLocalCommitRollback_()) {
private void checkForInvalidXAStateOnCommitOrRollback() throws SqlException { if (disallowLocalCommitRollback_()) { throw new SqlException(agent_.logWriter_, "COMMIT or ROLLBACK invalid for application execution environment", SqlState._2D521, // Spec'ed by PRO...
checkForTransactionInProgress();
synchronized public void closeForReuse() throws SqlException { if (!open_) { return; } checkForTransactionInProgress(); resetConnectionAtFirstSql_ = false; // unset indicator of deferred reset SqlException accumulatedExceptions = null; try { flowClose(...
if (disallowLocalCommitRollback_()) {
if (! allowLocalCommitRollback_()) {
public boolean getAutoCommit() throws SqlException { checkForClosedConnection(); if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getAutoCommit", autoCommit_); } if (disallowLocalCommitRollback_()) { // autoCommit is always false between xars.start() and xars....
if ((xaState_ == XA_LOCAL) || (xaState_ == XA_LOCAL_START_SENT)) { readLocalXACommit_(); setXAState(XA_OPEN_IDLE);
if ((xaState_ == XA_LOCAL) ) { readLocalXACommit_();
public void readCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_LOCAL) || (xaState_ == XA_LOCAL_START_SENT)) { readLocalXACommit_(); setXAState(XA_OPEN_IDLE); } } else { readLocalCommit_(); ...
setXAState(XA_OPEN_IDLE);
public void readRollback() throws SqlException { if (isXAConnection_) { readLocalXARollback_(); setXAState(XA_OPEN_IDLE); } else { readLocalRollback_(); } }
} else if (xaState_ == XA_PENDING_START || xaState_ == XA_ACTIVE) { throw new SqlException(agent_.logWriter_, "Cannot release a savepoint during distributed transaction."); }
}
synchronized public void releaseSavepoint(java.sql.Savepoint savepoint) throws SqlException { int saveXaState = xaState_; if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "releaseSavepoint", savepoint); } checkForClosedConnection(); if (savepoint == nul...
xaState_ = XA_OPEN_IDLE;
protected void resetConnection(LogWriter logWriter, String user, ClientDataSource ds, boolean recomputeFromDataSource) throws SqlException { // clearWarningsX() will re-initialize the following properties ...
if (disallowLocalCommitRollback_()) {
if (! allowLocalCommitRollback_()) {
synchronized public void setAutoCommit(boolean autoCommit) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setAutoCommit", autoCommit); } checkForClosedConnection(); if (disallowLocalCommitRollback_()) { if (autoCommit) { // ...
} else if (xaState_ == XA_PENDING_START || xaState_ == XA_ACTIVE) { throw new SqlException(agent_.logWriter_, "Cannot set savepoint during distributed transaction."); }
}
synchronized public java.sql.Savepoint setSavepoint() throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setSavepoint"); } checkForClosedConnection(); if (autoCommit_) // Throw exception if auto-commit is on { throw new S...
if (disallowLocalCommitRollback_()) {
if (! allowLocalCommitRollback_()) {
public boolean willAutoCommitGenerateFlow() throws org.apache.derby.client.am.SqlException { if (!autoCommit_) { return false; } if (disallowLocalCommitRollback_()) { return false; } return true; }
if ((xaState_ == XA_LOCAL) || (xaState_ == XA_LOCAL_START_SENT)) {
if ((xaState_ == XA_LOCAL) ) {
public void writeCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_LOCAL) || (xaState_ == XA_LOCAL_START_SENT)) { writeLocalXACommit_(); } } else { writeLocalCommit_(); } }
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException
double optimizerEstimatedCost) throws StandardException
public MaterializedResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerE...
closeCleanup = c;
public MaterializedResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerE...
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 } currentRow = null; source.close(); if (materializedScan != null) materializedScan.close(); mat...
Connection conn = getConnection();
Connection conn = connectServer();
private static void createTestTable() throws SQLException, IllegalAccessException, ClassNotFoundException, InstantiationException { Connection conn = getConnection(); Statement createTableSt = conn.createStatement(); createTableSt.execute("create table TEST_TABLE( TEST_COL blob( 65536 ))")...
ij.getPropertyArg(args);
setSystemProperty("derby.debug.suicideOfLayerBStreaming","true");
public static void main(String[] args){ try{ ij.getPropertyArg(args); startServer(); createTestTable(); testInterruptedReadOfLob(); shutdownServer(); }catch(Throwable t){ t.printStackTrace(); } }
t.printStackTrace();
examineThrowable(t);
public static void main(String[] args){ try{ ij.getPropertyArg(args); startServer(); createTestTable(); testInterruptedReadOfLob(); shutdownServer(); }catch(Throwable t){ t.printStackTrace(); } }
getConnection();
connectServer();
private static void testInterruptedReadOfLob() throws SQLException, IOException, IllegalAccessException, ClassNotFoundException, InstantiationException { Connection conn = getConnection(); conn.setAutoCommit(false); PreparedStatement insertLobSt = conn.prepareStatement("...
conn.commit();
private static void reExecuteStatementTest() throws Exception { System.out.print("DERBY-557: reExecuteStatementTest() "); Connection conn = ij.startJBMS(); Statement stmt = conn.createStatement(); for (int i = 0; i < 50000; i++) { ResultSet rs = stmt.executeQuery("values(1)"); // How silly! I forgot to close t...
mb.pushNull(ClassName.GeneratedMethod);
public void generate(ActivationClassBuilder acb, MethodBuilder mb, ResultSetNode child) throws StandardException { /* ** If sorting is not required, don't generate a sort result set - ** just return the child result set. */ if ( ! sortNeeded) { child.generate(acb, mb); return; } /* Get...
ClassName.NoPutResultSet, 10);
ClassName.NoPutResultSet, 9);
public void generate(ActivationClassBuilder acb, MethodBuilder mb, ResultSetNode child) throws StandardException { /* ** If sorting is not required, don't generate a sort result set - ** just return the child result set. */ if ( ! sortNeeded) { child.generate(acb, mb); return; } /* Get...
if (ex.getSQLState().equals("22005")) { if (s.getBytes(i) != null) row.append(s.getBytes(i).toString()); else row.append(s.getBytes(i)); } else throw ex;
if (ex.getSQLState().equals("22005")) row.append("Invalid Conversion Error\n"); else throw ex;
public static void dumpRS(ResultSet s) throws SQLException { SecurityCheck.inspect(s, "java.sql.ResultSet"); if (s == null) { System.out.println("<NULL>"); return; } ResultSetMetaData rsmd = s.getMetaData(); SecurityCheck.inspect(rsmd, "java.sql.ResultSetMetaData"); // Get the number of columns in the res...
throw SQLExceptionFactory.notImplemented("free()");
if (!isValid) return; isValid = false; if(isString()) { string_ = null; utf8String_ = null; } if(isAsciiStream()) { try { asciiStream_.close(); } catch(IOException ioe) { throw new SqlException(null, new ClientMessageId(SQLState.IO_ERROR_UPON_LOB_FREE)).getSQLException(); } } if(isUnicodeStream()) { try { unicodeSt...
public void free() throws SQLException { throw SQLExceptionFactory.notImplemented("free()"); }
checkValidity();
public java.io.InputStream getAsciiStream() throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getAsciiStream"); } java.io.InputStream retVal = get...
checkValidity();
public java.io.Reader getCharacterStream() throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getCharacterStream"); } java.io.Reader retVal = getCh...
checkValidity();
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); ...
checkValidity();
public long length() throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "length"); } if (lengthObtained_) { return sqlLength_; ...
checkValidity();
public long position(String searchstr, long start) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "position(String, long)", ...
checkValidity();
public java.io.OutputStream setAsciiStream(long pos) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setAsciiStream", (int) pos); } ClobOutputSt...
checkValidity();
public java.io.Writer setCharacterStream(long pos) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setCharacterStream", (int) pos); } ClobWriter...
checkValidity();
public int setString(long pos, String str) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setString", (int) pos, str); } int length = setString...
checkValidity();
public void truncate(long len) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, " truncate", (int) len); } if (len < 0 ) { thro...
statement_.accumulateWarning (new SqlWarning(agent_.logWriter_, "Unable to open resultSet type " + statement_.resultSetType_ + "." + " ResultSet type " + resultSetType_ + " opened."));
statement_.accumulateWarning( new SqlWarning( agent_.logWriter_, new MessageId(SQLState.INVALID_RESULTSET_TYPE), new Integer(statement_.resultSetType_), new Integer(resultSetType_)));
protected ResultSet(Agent agent, Statement statement, Cursor cursor, int resultSetType, int resultSetConcurrency, int resultSetHoldability) { agent_ = agent; statement_ = statement; ...
statement_.accumulateWarning (new SqlWarning(agent_.logWriter_, "Unable to open ResultSet with concurrency " + statement_.resultSetConcurrency_ + "." + " ResultSet concurrency " + resultSetConcurrency_ + " is used."));
statement_.accumulateWarning( new SqlWarning( agent_.logWriter_, new MessageId(SQLState.INVALID_RESULTSET_CONCURRENCY), new Integer(resultSetConcurrency_), new Integer(statement_.resultSetConcurrency_)));
protected ResultSet(Agent agent, Statement statement, Cursor cursor, int resultSetType, int resultSetConcurrency, int resultSetHoldability) { agent_ = agent; statement_ = statement; ...
this.accumulateWarning(new SqlWarning(agent_.logWriter_, "Value too large to fit in an int."));
this.accumulateWarning(new SqlWarning(agent_.logWriter_, new MessageId(SQLState.NUMBER_OF_ROWS_TOO_LARGE_FOR_INT), new Long(row)));
private int getRowX() throws SqlException { checkForClosedResultSet(); long row; checkThatResultSetIsNotDynamic(); if (resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) // for forward-only cursors, getRow() should return 0 if cursor is not on a valid row, // i.e. afte...
return warnings_;
return warnings_ == null ? null : warnings_.getSQLWarning();
public final java.sql.SQLWarning getWarnings() { if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getWarnings", warnings_); } return warnings_; }
embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateBlobLengthless")); embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateBlobLengthlessParameterName")); embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateClobLengthless")); embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateClobLengthlessParameterNam...
private static TestSuite embeddedSuite(String name) { TestSuite embeddedSuite = new TestSuite(name); embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateBlob")); embeddedSuite.addTest(new ResultSetTest( "embeddedUpdateClob")); embeddedSuite.addTe...
int correlationId;
private void processCommand() throws IOException, DRDAProtocolException { int correlationId; Integer icmd = (Integer)commandTable.get(tkn.sval.toLowerCase(Locale.ENGLISH)); if (icmd == null) { System.err.println("Unknown command, " + tkn.sval + " in line " + tkn.lineno()); System.exit(1); } int cmd = i...
correlationId = getInt(); writer.createDssRequest(correlationId);
writer.createDssRequest();
private void processCommand() throws IOException, DRDAProtocolException { int correlationId; Integer icmd = (Integer)commandTable.get(tkn.sval.toLowerCase(Locale.ENGLISH)); if (icmd == null) { System.err.println("Unknown command, " + tkn.sval + " in line " + tkn.lineno()); System.exit(1); } int cmd = i...
writer.endDss();
tkn.nextToken(); tkn.pushBack(); if ((tkn.sval != null) && tkn.sval.startsWith("0x")) writer.endDss((getBytes())[0]); else writer.endDss();
private void processCommand() throws IOException, DRDAProtocolException { int correlationId; Integer icmd = (Integer)commandTable.get(tkn.sval.toLowerCase(Locale.ENGLISH)); if (icmd == null) { System.err.println("Unknown command, " + tkn.sval + " in line " + tkn.lineno()); System.exit(1); } int cmd = i...
writer.flush(monitorOs);
writer.finalizeChain(reader.getCurrChainState(), monitorOs);
private void processCommand() throws IOException, DRDAProtocolException { int correlationId; Integer icmd = (Integer)commandTable.get(tkn.sval.toLowerCase(Locale.ENGLISH)); if (icmd == null) { System.err.println("Unknown command, " + tkn.sval + " in line " + tkn.lineno()); System.exit(1); } int cmd = i...
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ throw SQLExceptionFactory.notImplemented ("setNCharacterStream " + "(int,Reader,long)");
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { throw SQLExceptionFactory.notImplemented("setNCharacterStream" + "(int,Reader)");
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ throw SQLExceptionFactory.notImplemented ("setNCharacterStream " + "(int,Reader,long)"); }
public void setNClob(int index, NClob value) throws SQLException{ throw SQLExceptionFactory.notImplemented ("setNClob (int, NClob)");
public void setNClob(int parameterIndex, Reader reader) throws SQLException { throw SQLExceptionFactory.notImplemented("setNClob(int,Reader)");
public void setNClob(int index, NClob value) throws SQLException{ throw SQLExceptionFactory.notImplemented ("setNClob (int, NClob)"); }
protected Statement getStatement() throws SQLException {
public Statement getStatement() throws SQLException {
protected Statement getStatement() throws SQLException { return control.getRealStatement(); }
throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INSUFFICIENT_DATA));
throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INEXACT_LENGTH_DATA));
private void checkSufficientData() throws IOException { if (!limitInPlace) return; int remainingBytes = clearLimit(); if (remainingBytes > 0) throw new IOException(MessageService.getTextMessage(SQLState.SET_STREAM_INSUFFICIENT_DATA)); // if we had a limit try reading one more byte. // JDBC 3.0 states the stre...