rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
backup = new OnlineBackup(TEST_DATABASE_NAME);
backup = new OnlineBackup(TEST_DATABASE_NAME, BACKUP_PATH);
void installJarTest() throws SQLException, Exception{ logMessage("Begin Install Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); ...
void removeJarTest() throws SQLException, Exception{
void removeJarTest() throws Exception{
void removeJarTest() throws SQLException, Exception{ logMessage("Begin Remove Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); S...
OnlineBackup backup = new OnlineBackup(TEST_DATABASE_NAME);
OnlineBackup backup = new OnlineBackup(TEST_DATABASE_NAME, BACKUP_PATH);
void removeJarTest() throws SQLException, Exception{ logMessage("Begin Remove Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); S...
backup = new OnlineBackup(TEST_DATABASE_NAME);
backup = new OnlineBackup(TEST_DATABASE_NAME, BACKUP_PATH);
void removeJarTest() throws SQLException, Exception{ logMessage("Begin Remove Jar Test"); Connection conn1 = getConnection(); conn1.setAutoCommit(false); Statement conn1_stmt = conn1.createStatement(); Connection conn2 = getConnection(); conn2.setAutoCommit(false); S...
private void runTest() throws SQLException, Exception {
private void runTest() throws Exception{
private void runTest() throws SQLException, Exception { logMessage("Begin Online Backup Test3"); Connection conn = ij.startJBMS(); conn.setAutoCommit(false); Statement stmt = conn.createStatement(); stmt.execute("create table t1(a int ) "); stmt.execute("insert into t1 valu...
public GroupedAggregateResultSet(NoPutResultSet s,
GroupedAggregateResultSet(NoPutResultSet s,
public GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) t...
double optimizerEstimatedCost, GeneratedMethod c) throws StandardException
double optimizerEstimatedCost) throws StandardException
public GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) t...
super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost, c);
super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
public GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) t...
if (closeCleanup != null) { closeCleanup.invoke(activation); }
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be in a finally // block, to ensure that it is executed? clearCurrentRow(); if (clo...
currentRow = null;
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if ( isOpen ) { // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be in a finally // block, to ensure that it is executed? clearCurrentRow(); if (clo...
if (usingEmbedded()) {
if (usingEmbedded() || usingDerbyNetClient() ){
public void testSetAsciiStreamLengthLessOnClobTooLong() { int length = 1*1024*1024+512; try { setAsciiStream(psInsertClob, key, length, -1, 0, true); } catch (SQLException sqle) { if (usingEmbedded()) { assertSQLState("XSDA4", sqle); } else { ...
if (usingEmbedded()) {
if (usingEmbedded() || usingDerbyNetClient() ) {
public void testSetBinaryStreamLengthLessOnBlobTooLong() { int length = 1*1024*1024+512; try { setBinaryStreamOnBlob(key, length, -1, 0, true); } catch (SQLException sqle) { if (usingEmbedded()) { assertSQLState("XSDA4", sqle); } else { ...
callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, Connection.XA_OPEN_IDLE, this,
callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, this,
public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, org.apache.derby.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = ...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public void commit(Xid xid, boolean onePhase) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "commit", xid, onePhase); } if ...
else { conn_.setXAState(Connection.XA_LOCAL); }
public void commit(Xid xid, boolean onePhase) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "commit", xid, onePhase); } if ...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public void end(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "end", xid, flags); } if (conn_.isClosed(...
} else { conn_.setXAState(Connection.XA_ENDED); }
}
public void end(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "end", xid, flags); } if (conn_.isClosed(...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public void forget(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "forget", xid); } if (conn_.isClosed()) { ...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public int getTransactionTimeout() throws XAException { if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "getTransactionTimeout"); } exceptionsOnXA = null; if (conn_.isClosed()) { connectionClosedFailure(); } if (conn_.agen...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public boolean isSameRM(XAResource xares) throws XAException { boolean isSame = false; // preset that the RMs are NOT the same exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "isSameRM", xares); } if (conn_.isClosed()...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public int prepare(Xid xid) throws XAException { // public interface for prepare // just call prepareX with the recursion flag set to true exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "prepare", xid); } if (conn_.i...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public Xid[] recover(int flag) throws XAException { int rc = XAResource.XA_OK; NetAgent netAgent = conn_.netAgent_; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "recover", flag); } exceptionsOnXA = null; if (conn_.isClosed()) { ...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public void rollback(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "rollback", xid); } if (conn_.isClosed()) { ...
else { conn_.setXAState(Connection.XA_LOCAL); }
public void rollback(Xid xid) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "rollback", xid); } if (conn_.isClosed()) { ...
if (conn_.isClosed()) {
if (conn_.isPhysicallyClosed()) {
public synchronized void start(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "start", xid, flags); } if...
conn_.setXAState(Connection.XA_ACTIVE);
conn_.setXAState(Connection.XA_GLOBAL);
public synchronized void start(Xid xid, int flags) throws XAException { NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, "start", xid, flags); } if...
public NetXACallInfo(Xid xid, int flags, int state, NetXAResource xares, NetXAConnection actualConn) { xid_ = xid; xaFlags_ = flags; xaState_ = state;
public NetXACallInfo() { xid_ = null; xaFlags_ = XAResource.TMNOFLAGS;
public NetXACallInfo(Xid xid, int flags, int state, NetXAResource xares, NetXAConnection actualConn) { xid_ = xid; xaFlags_ = flags; xaState_ = state; xaInProgress_ = false; currConnection_ = false; freeEntry_ = true; actualConn_ = actualConn;...
actualConn_ = actualConn;
convReleased_ = false; actualConn_ = null;
public NetXACallInfo(Xid xid, int flags, int state, NetXAResource xares, NetXAConnection actualConn) { xid_ = xid; xaFlags_ = flags; xaState_ = state; xaInProgress_ = false; currConnection_ = false; freeEntry_ = true; actualConn_ = actualConn;...
xaResource_ = xares;
xaResource_ = null;
public NetXACallInfo(Xid xid, int flags, int state, NetXAResource xares, NetXAConnection actualConn) { xid_ = xid; xaFlags_ = flags; xaState_ = state; xaInProgress_ = false; currConnection_ = false; freeEntry_ = true; actualConn_ = actualConn;...
EmbeddedDataSource40 ds = new EmbeddedDataSource40 (); ds.setDatabaseName ("embedquerydb"); ds.setCreateDatabase ("create");
DataSource ds; if ( usingEmbeddedClient() ) { EmbeddedDataSource40 eds = new EmbeddedDataSource40 (); eds = new EmbeddedDataSource40 (); eds.setDatabaseName ("embedquerydb"); eds.setCreateDatabase ("create"); ds = eds; } else { ClientDataSource40 clds = new ClientDataSource40 (); clds = new ClientDataSource40 (); cld...
public static void main (String [] args) { //this part needs to be removed while migrating //this test to junit EmbeddedDataSource40 ds = new EmbeddedDataSource40 (); ds.setDatabaseName ("embedquerydb"); ds.setCreateDatabase ("create"); doTest (ds); ClientDataSource...
ClientDataSource40 clds = new ClientDataSource40 (); clds.setDatabaseName ("netquerydb;create=true"); clds.setServerName ("localhost"); clds.setPortNumber (1527); doTest (clds);
public static void main (String [] args) { //this part needs to be removed while migrating //this test to junit EmbeddedDataSource40 ds = new EmbeddedDataSource40 (); ds.setDatabaseName ("embedquerydb"); ds.setCreateDatabase ("create"); doTest (ds); ClientDataSource...
byte[] b = {20, 20, 20};
char[] b = {(char)20, (char)20, (char)20};
public static void SQLCAMESSAGE(int sqlcode, short errmcLen, String sqlerrmc, String sqlerrp, int errd0, int errd1, int errd2, int errd3, int errd4, int errd5, String warn, String sqlState, String file, String localeStr, String[] msg, int[] rc) { int numMessages = 1; byte[] b = {2...
Iterator fileSetIterator, boolean iterateDirectories) { this.project = project; this.fileSetIterator = fileSetIterator; this.iterateDirectories = iterateDirectories;
Iterator fileSetIterator) { this( project, fileSetIterator, false);
public FileIterator(Project project, Iterator fileSetIterator, boolean iterateDirectories) { this.project = project; this.fileSetIterator = fileSetIterator; this.iterateDirectories = iterateDirectories; }
netConnection.completeSqlca(netSqlca);
if(netSqlca.getSqlErrmc() == null) netConnection.setConnectionNull(true); else netConnection.completeSqlca(netSqlca);
void parseRdbAccessFailed(NetConnection netConnection) throws DisconnectException { parseRDBAFLRM(); // an SQLCARD is returned if an RDBALFRM is returned. // this SQLCARD always follows the RDBALFRM. // TYPDEFNAM and TYPDEFOVR are MTLINC if (peekCodePoint() == CodePoint.TYPDEFNAM)...
public void setDatabaseEncrypted()
public void setDatabaseEncrypted(boolean flushLog)
public void setDatabaseEncrypted() { // nothing to do for a read-only database. }
abstract void testList(Connection conn) throws SQLException;
abstract public void testList(Connection conn) throws SQLException;
abstract void testList(Connection conn) throws SQLException;
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ throw Util.notImplemented(); }
public void setNClob(int index, NClob value) throws SQLException{
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
public void setNClob(int index, NClob value) throws SQLException{ throw Util.notImplemented(); }
parameterTypeList.add(null);
public void addBatch() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "addBatch"); } checkForClosedStatement(); checkThatAllParametersAr...
parameterTypeList = null;
private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu...
parameterTypeList = null;
private void initPreparedStatement() { materialPreparedStatement_ = null; sql_ = null; outputRegistered_ = false; parameters_ = null; parameterSet_ = null; parameterRegistered_ = null; parameterMetaData_ = null; isAutoCommittableStatement_ = true; isPre...
this.prevHdrLocation = -1; this.previousCorrId = DssConstants.CORRELATION_ID_UNKNOWN; this.previousChainByte = DssConstants.DSS_NOCHAIN; this.isContinuationDss = false;
DDMWriter (int minSize, CcsidManager ccsidManager, DRDAConnThread agent, DssTrace dssTrace) { this.bytes = new byte[minSize]; this.ccsidManager = ccsidManager; this.agent = agent; reset(dssTrace); }
private void beginDss (boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) { if (doesRequestContainData()) { if (simpleDssFinalize) { finalizeDssLength();
private void beginDss (boolean chainedToNextStructure, int dssType) { beginDss(dssType, false);
private void beginDss (boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) { if (doesRequestContainData()) { if (simpleDssFinalize) { finalizeDssLength(); } ...
} else finalizePreviousChainedDss (dssHasSameCorrelator); }
bytes[dssLengthLocation] = (byte) 0xFF; bytes[dssLengthLocation + 1] = (byte) 0xFF;
private void beginDss (boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) { if (doesRequestContainData()) { if (simpleDssFinalize) { finalizeDssLength(); } ...
ensureLength (6);
if (chainedToNextStructure) { dssType |= DssConstants.GDSCHAIN_SAME_ID; }
private void beginDss (boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) { if (doesRequestContainData()) { if (simpleDssFinalize) { finalizeDssLength(); } ...
dssLengthLocation = offset; bytes[offset] = (byte) 0xFF; bytes[offset + 1] = (byte) 0xFF; bytes[offset + 2] = (byte) 0xD0; if (chainedToNextStructure) { dssType |= DssConstants.GDSCHAIN; if (nextHasSameCorrelator) dssType |= DssConstants.GDSCHAIN_SAME_ID; } bytes[offset + 3] = (byte) (dssType & 0xff); bytes[off...
bytes[dssLengthLocation + 3] = (byte) (dssType & 0xff); }
private void beginDss (boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) { if (doesRequestContainData()) { if (simpleDssFinalize) { finalizeDssLength(); } ...
nextCorrelationID = 1;
protected void clearBuffer() { offset = 0; top = 0; dssLengthLocation = 0; correlationID = DssConstants.CORRELATION_ID_UNKNOWN; isDRDAProtocol = true; }
protected void createDssObject(boolean reuseCorrID)
protected void createDssObject()
protected void createDssObject(boolean reuseCorrID) { // finish off previous DSS - objects are always part of a previous // DSS reply - so correlation id should be the same if (offset != 0) finalizePreviousChainedDss (reuseCorrID); beginDss(DssConstants.DSSFMT_OBJDSS, (reuseCorrID ? correlationID : nextCor...
if (offset != 0) finalizePreviousChainedDss (reuseCorrID); beginDss(DssConstants.DSSFMT_OBJDSS, (reuseCorrID ? correlationID : nextCorrelationID++)); simpleDssFinalize = false;
beginDss(DssConstants.DSSFMT_OBJDSS, true);
protected void createDssObject(boolean reuseCorrID) { // finish off previous DSS - objects are always part of a previous // DSS reply - so correlation id should be the same if (offset != 0) finalizePreviousChainedDss (reuseCorrID); beginDss(DssConstants.DSSFMT_OBJDSS, (reuseCorrID ? correlationID : nextCor...
if (offset != 0) finalizePreviousChainedDss(false); beginDss(DssConstants.DSSFMT_RPYDSS, nextCorrelationID++); simpleDssFinalize = false;
beginDss(DssConstants.DSSFMT_RPYDSS, true);
protected void createDssReply() { // finish off previous DSS if (offset != 0) finalizePreviousChainedDss(false); beginDss(DssConstants.DSSFMT_RPYDSS, nextCorrelationID++); simpleDssFinalize = false; }
protected void createDssRequest(int corrID)
protected void createDssRequest()
protected void createDssRequest(int corrID) { // finish off previous DSS if (offset != 0) finalizePreviousChainedDss((correlationID == corrID)); beginDss(DssConstants.DSSFMT_RQSDSS, corrID); simpleDssFinalize = false; }
if (offset != 0) finalizePreviousChainedDss((correlationID == corrID)); beginDss(DssConstants.DSSFMT_RQSDSS, corrID); simpleDssFinalize = false;
beginDss(DssConstants.DSSFMT_RQSDSS, true);
protected void createDssRequest(int corrID) { // finish off previous DSS if (offset != 0) finalizePreviousChainedDss((correlationID == corrID)); beginDss(DssConstants.DSSFMT_RQSDSS, corrID); simpleDssFinalize = false; }
protected void endDss ()
protected void endDss(byte chainByte)
protected void endDss () { int val = offset - dssLengthLocation; bytes[dssLengthLocation] = (byte) ((val >>> 8) & 0xff); bytes[dssLengthLocation + 1] = (byte) (val & 0xff); }
int val = offset - dssLengthLocation; bytes[dssLengthLocation] = (byte) ((val >>> 8) & 0xff); bytes[dssLengthLocation + 1] = (byte) (val & 0xff);
endDss(true); bytes[dssLengthLocation + 3] &= 0x0F; bytes[dssLengthLocation + 3] |= chainByte; previousChainByte = chainByte;
protected void endDss () { int val = offset - dssLengthLocation; bytes[dssLengthLocation] = (byte) ((val >>> 8) & 0xff); bytes[dssLengthLocation + 1] = (byte) (val & 0xff); }
OutputStream socketOutputStream = agent.getOutputStream(); try { if (isDRDAProtocol) { finalizeDssLength(); } socketOutputStream.write (bytes, 0, offset); socketOutputStream.flush(); } finally { if ((dssTrace != null) && dssTrace.isComBufferTraceOn()) { dssTrace.writeComBufferData (bytes, 0, offset, DssTrace.TYPE_TRACE...
flush(agent.getOutputStream());
protected void flush () throws java.io.IOException { OutputStream socketOutputStream = agent.getOutputStream(); try { if (isDRDAProtocol) { finalizeDssLength(); } socketOutputStream.write (bytes, 0, offset); socketOutputStream.flush(); } finally { if ((dssTrace != null) && dssTrace.isComBufferTraceO...
if (leftToRead != 0) { if ((Math.min (2 + leftToRead, 32767)) > (bytes.length - offset)) { try { sendBytes (agent.getOutputStream()); } catch (java.io.IOException ioe) { agent.markCommunicationsFailure ("DDMWriter.flushScalarStreamSegment()",
if (leftToRead != 0) { if ((Math.min (2 + leftToRead, 32767)) > (bytes.length - offset)) { try { markDssAsContinued(true); sendBytes (agent.getOutputStream()); } catch (java.io.IOException ioe) { agent.markCommunicationsFailure ("DDMWriter.flushScalarStreamSegment()",
protected int flushScalarStreamSegment (int leftToRead, int bytesToRead) throws DRDAProtocolException { int newBytesToRead = bytesToRead; // either at end of data, end of dss segment, or both. if (leftToRead != 0) { // 32k segment filled and not at end of data. if ((Math.min (2 + leftToRead, 32...
} } dssLengthLocation = offset; bytes[offset++] = (byte) (0xff); bytes[offset++] = (byte) (0xff); newBytesToRead = Math.min (leftToRead,32765); }
} } else { endDss(false); }
protected int flushScalarStreamSegment (int leftToRead, int bytesToRead) throws DRDAProtocolException { int newBytesToRead = bytesToRead; // either at end of data, end of dss segment, or both. if (leftToRead != 0) { // 32k segment filled and not at end of data. if ((Math.min (2 + leftToRead, 32...
return newBytesToRead; }
dssLengthLocation = offset; bytes[offset++] = (byte) (0xff); bytes[offset++] = (byte) (0xff); newBytesToRead = Math.min (leftToRead,32765); isContinuationDss = true; } else { endDss(); } return newBytesToRead; }
protected int flushScalarStreamSegment (int leftToRead, int bytesToRead) throws DRDAProtocolException { int newBytesToRead = bytesToRead; // either at end of data, end of dss segment, or both. if (leftToRead != 0) { // 32k segment filled and not at end of data. if ((Math.min (2 + leftToRead, 32...
protected int prepScalarStream (boolean chained, boolean chainedWithSameCorrelator,
protected int prepScalarStream (boolean chainedWithSameCorrelator,
protected int prepScalarStream (boolean chained, boolean chainedWithSameCorrelator, int codePoint, boolean writeNullByte, int leftToRead) throws DRDAProtocolException { int exte...
if (simpleDssFinalize) finalizeDssLength(); else finalizePreviousChainedDss (true);
protected int prepScalarStream (boolean chained, boolean chainedWithSameCorrelator, int codePoint, boolean writeNullByte, int leftToRead) throws DRDAProtocolException { int exte...
beginDss (true, chained, chainedWithSameCorrelator, DssConstants.GDSFMT_OBJDSS, correlationID, true);
beginDss(chainedWithSameCorrelator, DssConstants.GDSFMT_OBJDSS);
protected int prepScalarStream (boolean chained, boolean chainedWithSameCorrelator, int codePoint, boolean writeNullByte, int leftToRead) throws DRDAProtocolException { int exte...
resetChainState();
private void sendBytes (java.io.OutputStream socketOutputStream) throws java.io.IOException { try { socketOutputStream.write (bytes, 0, offset); socketOutputStream.flush(); } finally { if ((dssTrace != null) && dssTrace.isComBufferTraceOn()) { dssTrace.writeComBufferData (bytes, ...
protected int writeScalarStream (boolean chained, boolean chainedWithSameCorrelator,
protected int writeScalarStream (boolean chainedWithSameCorrelator,
protected int writeScalarStream (boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte) throws DRDAProtocolException { int leftToRead = length; int bytesToRead = prepScalarStream (chained, ...
int bytesToRead = prepScalarStream (chained, chainedWithSameCorrelator,
int bytesToRead = prepScalarStream (chainedWithSameCorrelator,
protected int writeScalarStream (boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, java.io.InputStream in, boolean writeNullByte) throws DRDAProtocolException { int leftToRead = length; int bytesToRead = prepScalarStream (chained, ...
if (prop.containsKey(Attribute.CLIENT_SECURITY_MECHANISM)) { setSecurityMechanism(getSecurityMechanism(prop)); }
void updateDataSourceValues(Properties prop) { if (prop == null) { return; } if (prop.containsKey(Attribute.USERNAME_ATTR)) { setUser(getUser(prop)); } if (prop.containsKey(Attribute.CLIENT_SECURITY_MECHANISM)) { setSecurityMechanism(getSec...
boolean executeQuery, boolean executeUpdate,
ResultSet execute(Activation activation, boolean executeQuery, boolean executeUpdate, boolean rollbackParentContext, long timeoutMillis) throws StandardException;
final boolean haveParams = (stmt.getNumParams() > 0);
int codePoint; EmbedParameterSetMetaData pmeta = null; Vector paramDrdaTypes = new Vector(); Vector paramLens = new Vector(); ArrayList paramExtPositions = null; int numVars = 0; boolean rtnParam = false;
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
int codePoint = reader.getCodePoint();
codePoint = reader.getCodePoint();
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
final byte drdaType = reader.readByte();
paramDrdaTypes.addElement(new Byte(reader.readByte()));
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
Integer.toHexString(drdaType)); final int drdaLength = reader.readNetworkShort();
Integer.toHexString(((Byte ) paramDrdaTypes.lastElement()).byteValue())); int drdaLength = reader.readNetworkShort();
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
if (!haveParams) { stmt.addParam(drdaType, drdaLength); continue; } final DRDAStatement.CliParam cp = stmt.getCliParam(j); if (cp.drdaType != drdaType || cp.drdaLength != drdaLength) { if (SanityManager.DEBUG) { trace(ps+" param " +j+ " type: "+ drdaTypeName(cp.drdaType)+ "->"+drdaTypeName(drdaType)+ " length: "+ cp.dr...
paramLens.addElement(new Integer(drdaLength)); } } numVars = paramDrdaTypes.size(); if (SanityManager.DEBUG) trace("numVars = " + numVars);
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
final int numVars = stmt.getNumParams(); if (SanityManager.DEBUG) trace("numVars = " + numVars);
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
EmbedParameterSetMetaData pmeta = stmt.getParameterMetaData();
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
final int numVars = stmt.getNumParams();
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
final DRDAStatement.CliParam cp = stmt.getCliParam(i); if ((cp.drdaType & 0x1) == 0x1)
if ((((Byte)paramDrdaTypes.elementAt(i)).byteValue() & 0x1) == 0x1)
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
readAndSetParams(i, stmt, cp, pmeta);
paramExtPositions = readAndSetParams(i, stmt, ((Byte)paramDrdaTypes.elementAt(i)).byteValue(), pmeta, paramExtPositions, ((Integer)(paramLens.elementAt(i))).intValue());
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException { PreparedStatement ps = stmt.getPreparedStatement(); final boolean haveParams = (stmt.getNumParams() > 0); reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { ...
int extCount = 0; final int end = stmt.getNumParams(); for (int i = 0; i < end; i++) { final DRDAStatement.CliParam cp = stmt.getCliParam(i); if (cp.isExt == false) continue; if (extCount > 0) { correlationID = reader.readDssHeader(); reader.readLengthAndCodePoint(); } ++extCount; readAndSetExtParam(i, stmt, cp.drdaT...
int numExt = stmt.cliParamExtPositions.size(); for (int i = 0; i < stmt.cliParamExtPositions.size(); i++) { int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue(); readAndSetExtParam(paramPos, stmt, ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),((Integer)(stmt.cliParamLens.elementAt(pa...
private void readAndSetAllExtParams(DRDAStatement stmt) throws SQLException, DRDAProtocolException { int extCount = 0; final int end = stmt.getNumParams(); for (int i = 0; i < end; i++) { final DRDAStatement.CliParam cp = stmt.getCliParam(i); if (cp.isExt == false) continue...
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta)
private ArrayList readAndSetParams(int i, DRDAStatement stmt, int drdaType, EmbedParameterSetMetaData pmeta, ArrayList paramExtPositions, int paramLenNumBytes)
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
int drdaType = ((cp.drdaType | 0x01) & 0x000000ff);
drdaType = ((drdaType | 0x01) & 0x000000ff);
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
int precision = (cp.drdaLength >> 8) & 0xff; int scale = cp.drdaLength & 0xff;
int precision = (paramLenNumBytes >> 8) & 0xff; int scale = paramLenNumBytes & 0xff;
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
long length = readLobLength(cp.drdaLength);
long length = readLobLength(paramLenNumBytes);
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
cp.isExt = true;
if (paramExtPositions == null) paramExtPositions = new ArrayList(); paramExtPositions.add(new Integer(i));
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
return paramExtPositions;
private void readAndSetParams(int i, DRDAStatement stmt, DRDAStatement.CliParam cp, EmbedParameterSetMetaData pmeta) throws DRDAProtocolException, SQLException { PreparedStatement ps = stmt.getPreparedStatement(); // mask out null indicator ...
if (bcc!=null) bcc.onStatementClose(this);
void closeActions() throws SQLException { //we release the resource for preparedStatement preparedStatement = null; try{ setupContextStack(); } catch (SQLException se) { //we may have already committed the transaction in which case //setupContextStack will fail, the close should just return return; } try...
checkExecuteQueryPostConditions("java.sql.Statement");
private ResultSet executeQueryX(String sql) throws SqlException { flowExecute(executeQueryMethod__, sql); checkExecuteQueryPostConditions("java.sql.Statement"); return resultSet_; }
checkExecuteUpdatePostConditions("java.sql.Statement");
private int executeUpdateX(String sql) throws SqlException { flowExecute(executeUpdateMethod__, sql); checkExecuteUpdatePostConditions("java.sql.Statement"); return updateCount_; }
checkForStoredProcResultSetCount(executeType);
private void flowExecute(int executeType, String sql) throws SqlException { checkForClosedStatement(); // Per jdbc spec (see java.sql.Statement.close() javadoc) checkAutoGeneratedKeysParameters(); clearWarningsX(); // Per jdbc spec 0.7, and getWarnings() javadoc sql = escape(sql); ...
Transaction t = findUserTransaction(ContextService.getFactory().getCurrentContextManager(), AccessFactoryGlobals.USER_TRANS_NAME); backup(t, new File(backupDir));
Transaction t = findUserTransaction( ContextService.getFactory().getCurrentContextManager(), AccessFactoryGlobals.USER_TRANS_NAME); try { canStartOnlineBackup(t, true); backup(t, new File(backupDir)); }finally { xactFactory.backupFinished(); }
public void backup(String backupDir) throws StandardException { if (backupDir == null || backupDir.equals("")) { throw StandardException.newException( SQLState.RAWSTORE_CANNOT_CREATE_BACKUP_DIRECTORY, (File)null); } // in case this is an URL form String backupDirURL = null; try { U...
if (td.getTableType() != TableDescriptor.BASE_TABLE_TYPE)
if (td.getTableType() != TableDescriptor.BASE_TABLE_TYPE && td.getTableType() != TableDescriptor.VIEW_TYPE)
public QueryTreeNode bind( HashMap dependencies ) throws StandardException { Provider dependencyProvider = null; SchemaDescriptor sd = null; switch( objectType) { case TABLE_PRIVILEGES: TableName tableName = (TableName) objectOfPrivilege; sd = getSchemaD...
if (isBeforeFirstX() || isAfterLastX() || isOnInsertRow_ || resultSetContainsNoRows()) {
if (isOnInsertRow_) {
private boolean relativeX(int rows) throws SqlException { checkForClosedResultSet(); checkThatResultSetTypeIsScrollable(); clearWarningsX(); wasNull_ = ResultSet.WAS_NULL_UNSET; // discard all previous updates when moving the cursor. resetUpdatedColumns(); // this me...
if (rows == 0) { isValidCursorPosition_ = true;
if (resultSetContainsNoRows()) { isValidCursorPosition_ = false;
private boolean relativeX(int rows) throws SqlException { checkForClosedResultSet(); checkThatResultSetTypeIsScrollable(); clearWarningsX(); wasNull_ = ResultSet.WAS_NULL_UNSET; // discard all previous updates when moving the cursor. resetUpdatedColumns(); // this me...
if (rows == 0) { if (isBeforeFirstX() || isAfterLastX()) { isValidCursorPosition_ = false; } else { isValidCursorPosition_ = true; } return isValidCursorPosition_; } if (isBeforeFirstX()) { if (rows > 0) { nextX(); return relativeX(rows-1); } else { isValidCursorPosition_ = false; return isValidCursorPosition_; } }...
private boolean relativeX(int rows) throws SqlException { checkForClosedResultSet(); checkThatResultSetTypeIsScrollable(); clearWarningsX(); wasNull_ = ResultSet.WAS_NULL_UNSET; // discard all previous updates when moving the cursor. resetUpdatedColumns(); // this me...
String codebaseType = isJar[0] ? "csinfo.codejar" : "csinfo.codeclasses"; String unusedType = isJar[0] ? "csinfo.codeclasses" : "csinfo.codejar";
String codebaseType = isJar[0] ? "derbyTesting.codejar" : "derbyTesting.codeclasses"; String unusedType = isJar[0] ? "derbyTesting.codeclasses" : "derbyTesting.codejar";
static Vector getSecurityProps(Vector D) throws ClassNotFoundException, IOException { if (D == null) D = new Vector(); String userDir = System.getProperty("user.dir"); String policyFile = System.getProperty("serverPolicyFile"); if (policyFile == null) { File userDirHandle = new File(userDir); CopySuppFi...
D.addElement("csinfo.codedir=" + cb.getAbsolutePath());
D.addElement("derbyTesting.codedir=" + cb.getAbsolutePath());
static Vector getSecurityProps(Vector D) throws ClassNotFoundException, IOException { if (D == null) D = new Vector(); String userDir = System.getProperty("user.dir"); String policyFile = System.getProperty("serverPolicyFile"); if (policyFile == null) { File userDirHandle = new File(userDir); CopySuppFi...
D.addElement("csinfo.serverhost=" + hostName); D.addElement("csinfo.trustedhost=" + hostName);
D.addElement("derbyTesting.serverhost=" + hostName); D.addElement("derbyTesting.clienthost=" + hostName);
static Vector getSecurityProps(Vector D) throws ClassNotFoundException, IOException { if (D == null) D = new Vector(); String userDir = System.getProperty("user.dir"); String policyFile = System.getProperty("serverPolicyFile"); if (policyFile == null) { File userDirHandle = new File(userDir); CopySuppFi...
try { result = new java.io.ByteArrayInputStream (((String) agent_.crossConverters_.setObject(java.sql.Types.CHAR, updatedColumns_[column - 1])).getBytes("US-ASCII")); } catch (java.io.UnsupportedEncodingException e) { throw new SqlException(agent_.logWriter_, e, e.getMessage()); }
result = new java.io.ByteArrayInputStream (convertToAsciiByteArray((String) agent_.crossConverters_.setObject(java.sql.Types.CHAR, updatedColumns_[column - 1])));
public java.io.InputStream getAsciiStream(int column) throws SqlException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getAsciiStream", column); } checkGetterPreconditions(column); java.io.InputStream result = null; if (wasNonNullSensitiveUpdate(...
value = new BigDecimal(((Number)theValue).doubleValue());
value = new BigDecimal(Double.toString(((Number)theValue).doubleValue()));
public void setValue(Object theValue) throws StandardException { rawData = null; if ((theValue instanceof BigDecimal) || (theValue == null)) { setCoreValue((BigDecimal)theValue); } else if (theValue instanceof Number) { value = new BigDecimal(((Number)theValue).doubleValue()); } else { genericSetObje...
public void close() throws IOException
public void close()
public void close() throws IOException { synchronized (lock) { closeIn(); parent = null; noMoreReads = true; } }
private void closeIn() throws IOException {
private void closeIn() {
private void closeIn() throws IOException { if (in != null) { try { if(in instanceof Resetable){ ((Resetable) in).resetStream(); }else{ in.close(); } } catch (StandardException e) { e.printStackTrace(); throw new IOException(e.getMessage()); } finally...
if(in instanceof Resetable){ ((Resetable) in).resetStream(); }else{
private void closeIn() throws IOException { if (in != null) { try { if(in instanceof Resetable){ ((Resetable) in).resetStream(); }else{ in.close(); } } catch (StandardException e) { e.printStackTrace(); throw new IOException(e.getMessage()); } finally...