rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (currentBuffer.position != 0) | if (currentBuffer.position != checksumLogRecordSize) | public void close() throws IOException { if (SanityManager.DEBUG) { if (currentBuffer.position != 0) SanityManager.THROWASSERT( "Log file being closed with data still buffered " + currentBuffer.position + " " + currentBuffer.bytes_free); } flushLogAccessFile(); synchronized(log... |
public void flushLogAccessFile() throws IOException | public void flushLogAccessFile() throws IOException, StandardException | public void flushLogAccessFile() throws IOException { switchLogBuffer(); flushDirtyBuffers(); } |
public void switchLogBuffer() throws IOException | public void switchLogBuffer() throws IOException, StandardException | public void switchLogBuffer() throws IOException { synchronized(this) { //add the current buffer to the flush buffer list dirtyBuffers.addLast(currentBuffer); //if there is No free buffer, flush the buffers to get a free one if(freeBuffers.size() == 0) { flushDirtyBuffers(); //after the flush ... |
currentBuffer.init(); | currentBuffer.init(checksumLogRecordSize); | public void switchLogBuffer() throws IOException { synchronized(this) { //add the current buffer to the flush buffer list dirtyBuffers.addLast(currentBuffer); //if there is No free buffer, flush the buffers to get a free one if(freeBuffers.size() == 0) { flushDirtyBuffers(); //after the flush ... |
SanityManager.ASSERT(currentBuffer.position == 0); | SanityManager.ASSERT(currentBuffer.position == checksumLogRecordSize); | public void switchLogBuffer() throws IOException { synchronized(this) { //add the current buffer to the flush buffer list dirtyBuffers.addLast(currentBuffer); //if there is No free buffer, flush the buffers to get a free one if(freeBuffers.size() == 0) { flushDirtyBuffers(); //after the flush ... |
currentBuffer.bytes_free == currentBuffer.buffer.length); | currentBuffer.bytes_free == currentBuffer.length); | public void switchLogBuffer() throws IOException { synchronized(this) { //add the current buffer to the flush buffer list dirtyBuffers.addLast(currentBuffer); //if there is No free buffer, flush the buffers to get a free one if(freeBuffers.size() == 0) { flushDirtyBuffers(); //after the flush ... |
throws IOException | public void write(int b) throws IOException { if (currentBuffer.bytes_free == 0) switchLogBuffer(); currentBuffer.buffer[currentBuffer.position++] = (byte) b; currentBuffer.bytes_free--; } | |
if (currentBuffer.bytes_free == 0) switchLogBuffer(); | if (SanityManager.DEBUG) { SanityManager.ASSERT(currentBuffer.bytes_free > 0); } | public void write(int b) throws IOException { if (currentBuffer.bytes_free == 0) switchLogBuffer(); currentBuffer.buffer[currentBuffer.position++] = (byte) b; currentBuffer.bytes_free--; } |
public void writeInt(int i) throws IOException { if (currentBuffer.bytes_free < 4) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; | private final int writeInt(int i , byte b[], int p) { | public void writeInt(int i) throws IOException { if (currentBuffer.bytes_free < 4) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; b[p++] = (byte) ((i >>> 24) & 0xff); b[p++] = (byte) ((i >>> 16) & 0xff); b[p++] = (byte) ((i >>> 8) & 0xff); b[... |
b[p++] = (byte) (i & 0xff); currentBuffer.position = p; currentBuffer.bytes_free -= 4; | b[p++] = (byte) (i & 0xff); return p; | public void writeInt(int i) throws IOException { if (currentBuffer.bytes_free < 4) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; b[p++] = (byte) ((i >>> 24) & 0xff); b[p++] = (byte) ((i >>> 16) & 0xff); b[p++] = (byte) ((i >>> 8) & 0xff); b[... |
if (total_log_record_length > currentBuffer.bytes_free && total_log_record_length <= currentBuffer.buffer.length) { switchLogBuffer(); } | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... | |
b[p++] = (byte) ((length >>> 24) & 0xff); b[p++] = (byte) ((length >>> 16) & 0xff); b[p++] = (byte) ((length >>> 8) & 0xff); b[p++] = (byte) ((length ) & 0xff); | p = writeInt(length, b, p); | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
b[p++] = (byte) (((int)(instant >>> 56)) & 0xff); b[p++] = (byte) (((int)(instant >>> 48)) & 0xff); b[p++] = (byte) (((int)(instant >>> 40)) & 0xff); b[p++] = (byte) (((int)(instant >>> 32)) & 0xff); b[p++] = (byte) (((int)(instant >>> 24)) & 0xff); b[p++] = (byte) (((int)(instant >>> 16)) & 0xff); b[p++] = (byte) (((i... | p = writeLong(instant, b , p); | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
b[p++] = (byte) ((length >>> 24) & 0xff); b[p++] = (byte) ((length >>> 16) & 0xff); b[p++] = (byte) ((length >>> 8) & 0xff); b[p++] = (byte) ((length ) & 0xff); currentBuffer.position = p; | p = writeInt(length, b, p); currentBuffer.position = p; | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
writeInt(length); writeLong(instant); write(data, data_offset, length - optional_data_length); | directWrite = true; byte[] b = currentBuffer.buffer; int p = currentBuffer.position; p = writeInt(length , b, p); p = writeLong(instant, b, p); currentBuffer.position = p; currentBuffer.bytes_free -= LOG_RECORD_HEADER_SIZE; writeInt(length , db, 0); if(writeChecksum) { checksumLogOperation.reset()... | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
write( | writeToLog( | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
writeInt(length); | writeToLog(db,0, 4); directWrite = false; | public void writeLogRecord( int length, long instant, byte[] data, int data_offset, byte[] optional_data, int optional_data_offset, int optional_data_length) throws StandardException, IOException { int total_log_record_length = length + LOG_RECORD_FIXED_OV... |
public void writeLong(long l) throws IOException { if (currentBuffer.bytes_free < 8) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; b[p++] = (byte) (((int)(l >>> 56)) & 0xff); | private final int writeLong(long l , byte b[], int p) { b[p++] = (byte) (((int)(l >>> 56)) & 0xff); | public void writeLong(long l) throws IOException { if (currentBuffer.bytes_free < 8) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; b[p++] = (byte) (((int)(l >>> 56)) & 0xff); b[p++] = (byte) (((int)(l >>> 48)) & 0xff); b[p++] = (byte) (((in... |
currentBuffer.position = p; currentBuffer.bytes_free -= 8; } | return p; } | public void writeLong(long l) throws IOException { if (currentBuffer.bytes_free < 8) switchLogBuffer(); byte[] b = currentBuffer.buffer; int p = currentBuffer.position; b[p++] = (byte) (((int)(l >>> 56)) & 0xff); b[p++] = (byte) (((int)(l >>> 48)) & 0xff); b[p++] = (byte) (((in... |
int length) throws SQLException { | long length) throws SQLException { | public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntr... |
agent_.logWriter_.traceEntry(this, "setAsciiStream", parameterIndex, "<input stream>", length); | agent_.logWriter_.traceEntry(this, "setAsciiStream", parameterIndex, "<input stream>", new Long(length)); | public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntr... |
setInput(parameterIndex, new Clob(agent_, x, "US-ASCII", length)); | if(length > Integer.MAX_VALUE) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE), new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException(); } setInput(parameterIndex, new Clob(agent_, x, "US-ASCII", (int)length)); | public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntr... |
int length) throws SQLException { | long length) throws SQLException { | public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceE... |
agent_.logWriter_.traceEntry(this, "setBinaryStream", parameterIndex, "<input stream>", length); | agent_.logWriter_.traceEntry(this, "setBinaryStream", parameterIndex, "<input stream>", new Long(length)); | public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceE... |
setBinaryStreamX(parameterIndex, x, length); | if(length > Integer.MAX_VALUE) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE), new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException(); } setBinaryStreamX(parameterIndex, x, (int)length); | public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceE... |
int length) throws SQLException { | long length) throws SQLException { | public void setCharacterStream(int parameterIndex, java.io.Reader x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.tr... |
agent_.logWriter_.traceEntry(this, "setCharacterStream", parameterIndex, x, length); | agent_.logWriter_.traceEntry(this, "setCharacterStream", parameterIndex, x, new Long(length)); | public void setCharacterStream(int parameterIndex, java.io.Reader x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.tr... |
setInput(parameterIndex, new Clob(agent_, x, length)); | if(length > Integer.MAX_VALUE) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE), new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException(); } setInput(parameterIndex, new Clob(agent_, x, (int)length)); | public void setCharacterStream(int parameterIndex, java.io.Reader x, int length) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.tr... |
stmt = con.createStatement(); | stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); | public void setUp() throws SQLException { con = getConnection(); stmt = con.createStatement(); rs = stmt.executeQuery("SELECT * FROM SYS.SYSTABLES"); // Position on first result. rs.next(); } |
return new TestSuite(ResultSetTest.class, "ResultSetTest suite"); | TestSuite rsSuite = new TestSuite(ResultSetTest.class, "ResultSetTest suite"); if (usingDerbyNetClient()) { rsSuite.addTest( clientSuite("ResultSetTest client-only suite")); } if (usingEmbedded()) { rsSuite.addTest( embeddedSuite("ResultSetTest embedded-only suite")); } return rsSuite; | public static Test suite() { return new TestSuite(ResultSetTest.class, "ResultSetTest suite"); } |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Array getArray(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getArray", parameterIndex); } super.checkForClosedSt... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException, ArithmeticException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getBigDecimal", parameterInde... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = java.math.BigDecimal.valueOf(returnValueFromProcedure_).setScale(scale); this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedExit(this, "getBigDecimal", result); } return result; } | public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException, ArithmeticException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceDeprecatedEntry(this, "getBigDecimal", parameterInde... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Blob getBlob(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBlob", parameterIndex); } super.checkForClosedState... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public boolean getBoolean(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBoolean", parameterIndex); } super.checkForClosedState... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = agent_.crossConverters_.getBooleanFromInt(returnValueFromProcedure_); this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getBoolean", result); } return result; } | public boolean getBoolean(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBoolean", parameterIndex); } super.checkForClosedState... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public byte getByte(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getByte", parameterIndex); } super.checkForClosedStatement(); ... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = agent_.crossConverters_.getByteFromInt(returnValueFromProcedure_); this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getByte", result); } return result; } | public byte getByte(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getByte", parameterIndex); } super.checkForClosedStatement(); ... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public byte[] getBytes(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getBytes", parameterIndex); } super.checkForClosedStatement(... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public Reader getCharacterStream(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getCharacterStream", parameterIndex); } super.chec... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Clob getClob(int parameterIndex) throws SQLException { try { synchronized (connection_) { super.checkForClosedStatement(); parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedure... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Date getDate(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getDate", parameterIndex); } super.checkForClosedState... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public double getDouble(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getDouble", parameterIndex); } super.checkForClosedStatemen... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = (double) returnValueFromProcedure_; this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getDouble", result); } return result; } | public double getDouble(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getDouble", parameterIndex); } super.checkForClosedStatemen... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public float getFloat(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getFloat", parameterIndex); } super.checkForClosedStatement()... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = (float) returnValueFromProcedure_; this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getFloat", result); } return result; } | public float getFloat(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getFloat", parameterIndex); } super.checkForClosedStatement()... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { this.wasNull_ = this.WAS_NOT_NULL; return returnValueFromProcedure_; } | int getIntX(int parameterIndex) throws SqlException { super.checkForClosedStatement(); parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { this.wasNull_ = this.WAS_NOT_NULL; return returnValueFromPro... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public long getLong(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getLong", parameterIndex); } super.checkForClosedStatement(); ... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = (long) returnValueFromProcedure_; this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getLong", result); } return result; } | public long getLong(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getLong", parameterIndex); } super.checkForClosedStatement(); ... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public Object getObject(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getObject", parameterIndex); } super.checkForClosedStatemen... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = new Integer(returnValueFromProcedure_); this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getObject", result); } return result; } | public Object getObject(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getObject", parameterIndex); } super.checkForClosedStatemen... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Ref getRef(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getRef", parameterIndex); } super.checkForClosedStatemen... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public short getShort(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getShort", parameterIndex); } super.checkForClosedStatement()... | |
if (parameterIndex == 0 && escapedProcedureCallWithResult_) { result = agent_.crossConverters_.getShortFromInt(returnValueFromProcedure_); this.wasNull_ = this.WAS_NOT_NULL; if (agent_.loggingEnabled()) { agent_.logWriter_.traceExit(this, "getShort", result); } return result; } | public short getShort(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getShort", parameterIndex); } super.checkForClosedStatement()... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { this.wasNull_ = this.WAS_NOT_NULL; return Integer.toString(returnValueFromProcedure_); } | String getStringX(int parameterIndex) throws SqlException { super.checkForClosedStatement(); parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { this.wasNull_ = this.WAS_NOT_NULL; return Integer.toSt... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Time getTime(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getTime", parameterIndex); } super.checkForClosedState... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); if (parameterIndex == 0 && escapedProcedureCallWithResult_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.INVALID_PARAM_USE_GETINT)); } | public java.sql.Timestamp getTimestamp(int parameterIndex) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "getTimestamp", parameterIndex); } super.chec... | |
parameterIndex = checkForEscapedCallWithResult(parameterIndex); | private int guessScaleForDecimalOrNumeric(int parameterIndex) throws SqlException { parameterIndex = checkForEscapedCallWithResult(parameterIndex); // Types.DECIMAL with no supplied scale will use the scale supplied by the setter method if input BigDecimal is not null if (parameterMetaData_.typ... | |
((OptimizerImpl)optimizer).addPredicatesToList(predList); | ((OptimizerImpl)optimizer).addScopedPredicatesToList(predList); | public ResultSetNode modifyAccessPaths(PredicateList predList) throws StandardException { // Take the received list of predicates and propagate them to the // predicate list for this node's optimizer. Then, when we call // optimizer.modifyAccessPaths(), the optimizer will have the // predicates and can push them... |
if (pred.isScopedForPush()) | if (pred.isScopedToSourceResultSet()) | public ResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicateList, double outerRows) throws StandardException { Optimizer optimizer; /* Optimize any subquerys before optimizing the underlying result set */ /* selectSubquerys is always allocated at bind() time */ if (S... |
if (wherePredicates != null) { Predicate pred = null; for (int i = wherePredicates.size() - 1; i >= 0; i--) { pred = (Predicate)wherePredicates.getOptPredicate(i); if (pred.isScopedForPush()) { predicateList.addOptPredicate(pred); wherePredicates.removeOptPredicate(pred); } } } | public ResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicateList, double outerRows) throws StandardException { Optimizer optimizer; /* Optimize any subquerys before optimizing the underlying result set */ /* selectSubquerys is always allocated at bind() time */ if (S... | |
throw new SqlException(agent_.logWriter_, "cancel() not supported by server"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CANCEL_NOT_SUPPORTED_BY_SERVER)); | public void cancel() throws SQLException { try { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "cancel"); } checkForClosedStatement(); // Per jdbc spec (see java.sql.Statement.close() javadoc) throw new SqlException(agent_.... |
throw new SqlException(agent_.logWriter_, "Invalid argument: " + "Statement auto-generated keys value " + autoGeneratedKeys_ + " is invalid."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_API_PARAMETER), new Integer(autoGeneratedKeys_), "autoGeneratedKeys", "Statement.execute()/executeQuery()"); | void checkAutoGeneratedKeysParameters() throws SqlException { if (autoGeneratedKeys_ != java.sql.Statement.NO_GENERATED_KEYS && autoGeneratedKeys_ != java.sql.Statement.RETURN_GENERATED_KEYS) { throw new SqlException(agent_.logWriter_, "Invalid argument: " + "Stat... |
throw new SqlException(agent_.logWriter_, "Driver not capable"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NOT_IMPLEMENTED), "Connection.prepareStatement(String sql, String[] columnNames)"); | void checkAutoGeneratedKeysParameters() throws SqlException { if (autoGeneratedKeys_ != java.sql.Statement.NO_GENERATED_KEYS && autoGeneratedKeys_ != java.sql.Statement.RETURN_GENERATED_KEYS) { throw new SqlException(agent_.logWriter_, "Invalid argument: " + "Stat... |
throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeQuery() cannot be called " + "because multiple result sets were returned." + " Use " + jdbcStatementInterfaceName + ".execute() to obtain multiple results."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.MULTIPLE_RESULTS_ON_EXECUTE_QUERY), jdbcStatementInterfaceName, jdbcStatementInterfaceName); | void checkExecuteQueryPostConditions(String jdbcStatementInterfaceName) throws SqlException { // We'll just rely on finalizers to close the dangling result sets. if (resultSetList_ != null && resultSetList_.length != 1) { throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName ... |
throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeQuery() was called " + "but no result set was returned." + " Use " + jdbcStatementInterfaceName + ".executeUpdate() for non-queries."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.USE_EXECUTE_UPDATE_WITH_NO_RESULTS), jdbcStatementInterfaceName, jdbcStatementInterfaceName); | void checkExecuteQueryPostConditions(String jdbcStatementInterfaceName) throws SqlException { // We'll just rely on finalizers to close the dangling result sets. if (resultSetList_ != null && resultSetList_.length != 1) { throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName ... |
throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeUpdate() cannot be called " + "because multiple result sets returned." + " Use " + jdbcStatementInterfaceName + ".execute() to obtain multiple results."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.MULTIPLE_RESULTS_ON_EXECUTE_QUERY), jdbcStatementInterfaceName, jdbcStatementInterfaceName); | void checkExecuteUpdatePostConditions(String jdbcStatementInterfaceName) throws SqlException { // We'll just rely on finalizers to close the dangling result sets. if (resultSetList_ != null) { throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeUpdate() cannot be... |
throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeUpdate() was called " + "but a result set was returned." + " Use " + jdbcStatementInterfaceName + ".executeQuery() to obtain a result set."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_CALL_TO_EXECUTE_UPDATE)); | void checkExecuteUpdatePostConditions(String jdbcStatementInterfaceName) throws SqlException { // We'll just rely on finalizers to close the dangling result sets. if (resultSetList_ != null) { throw new SqlException(agent_.logWriter_, jdbcStatementInterfaceName + ".executeUpdate() cannot be... |
throw new SqlException(agent_.logWriter_, "executeQuery method cannot be used for update."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CANT_USE_EXEC_QUERY_FOR_UPDATE)); | void checkForAppropriateSqlMode(int executeType, int sqlMode) throws SqlException { if (executeType == executeQueryMethod__ && sqlMode == isUpdate__) { throw new SqlException(agent_.logWriter_, "executeQuery method cannot be used for update."); } if (executeType == executeUpdateMetho... |
throw new SqlException(agent_.logWriter_, "executeUpdate method cannot be used for query."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_CALL_TO_EXECUTE_UPDATE)); | void checkForAppropriateSqlMode(int executeType, int sqlMode) throws SqlException { if (executeType == executeQueryMethod__ && sqlMode == isUpdate__) { throw new SqlException(agent_.logWriter_, "executeQuery method cannot be used for update."); } if (executeType == executeUpdateMetho... |
throw new SqlException(agent_.logWriter_, "Invalid operation: statement closed"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_STATEMENT_CLOSED_NO_REASON)); | void checkForClosedStatement() throws SqlException { // For some odd reason, there was a JVM hotspot error with Sun's 1.4 JDK // when the code was written like this: // agent_checkForDeferredExceptions(); // if (!openOnClient_) // throw new SqlException (agent_.logWriter_, "Inva... |
throw new SqlException(agent_.logWriter_, "Null batched SQL string passed."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NULL_SQL_TEXT)); | void checkForInvalidBatchedSql(String sql) throws SqlException { if (sql == null) { throw new SqlException(agent_.logWriter_, "Null batched SQL string passed."); } if (sqlMode_ != isCall__ && !(sqlMode_ == isUpdate__ && (sqlUpdateMode_ == isInsertSql__ ... |
throw new SqlException(agent_.logWriter_, "Invalid SQL in Batch"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_SQL_IN_BATCH), sql); | void checkForInvalidBatchedSql(String sql) throws SqlException { if (sql == null) { throw new SqlException(agent_.logWriter_, "Null batched SQL string passed."); } if (sqlMode_ != isCall__ && !(sqlMode_ == isUpdate__ && (sqlUpdateMode_ == isInsertSql__ ... |
throw new SqlException(agent_.logWriter_, "Invalid cursor name \"" + cursorName + "\" in the Update/Delete statement."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CURSOR_INVALID_NAME), cursorName); | 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); ... |
throw new SqlException(agent_.logWriter_, "Unable to open resultSet with requested " + "holdability " + resultSetHoldability_ + "."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.UNABLE_TO_OPEN_RS_WITH_REQUESTED_HOLDABILITY), new Integer(resultSetHoldability_)); | 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); ... |
"Non-recoverable chain-breaking exception occurred during batch processing. " + "The batch is terminated non-atomically.")); | new MessageId(SQLState.BATCH_CHAIN_BREAKING_EXCEPTION))); | void flowExecuteBatch(int[] updateCounts) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; boolean isCallCataloguedBestGuess = true; agent_.beginBatchedWriteChain(this); for (int i = 0; i < batch_.size(); i++) { boolean flowSQL = true; S... |
throw new SqlException(agent_.logWriter_, "bugcheck"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_TOKENS_IN_SQL_TEXT), sql); | String getProcedureName(String sql) throws SqlException { java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(sql, "\t\n\r\f= (?"); if (!tokenizer.hasMoreTokens()) { throw new SqlException(agent_.logWriter_, "bugcheck"); } String firstToken = tokenizer.nextToke... |
throw new SqlException(agent_.logWriter_, "bugcheck"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_CALL_STATEMENT)); | String getProcedureName(String sql) throws SqlException { java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(sql, "\t\n\r\f= (?"); if (!tokenizer.hasMoreTokens()) { throw new SqlException(agent_.logWriter_, "bugcheck"); } String firstToken = tokenizer.nextToke... |
throw new SqlException(agent_.logWriter_, "Invalid CALL syntax"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_CALL_STATEMENT)); | String getProcedureName(String sql) throws SqlException { java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(sql, "\t\n\r\f= (?"); if (!tokenizer.hasMoreTokens()) { throw new SqlException(agent_.logWriter_, "bugcheck"); } String firstToken = tokenizer.nextToke... |
throw new SqlException(agent_.logWriter_, "JDBC 3 method called - not yet supported"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED)); | protected SQLException jdbc3FeatureNotSupported(boolean checkStatement) throws SQLException { try { if ( checkStatement ) checkForClosedStatement(); throw new SqlException(agent_.logWriter_, "JDBC 3 method called - not yet supported"); ... |
throw new SqlException(agent_.logWriter_, "SQL passed with no tokens"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_TOKENS_IN_SQL_TEXT), sql); | void parseSqlAndSetSqlModes(String sql) throws SqlException { String delims = "\t\n\r\f=? ("; java.util.StringTokenizer tokenizer = null; String firstToken = null; // See if the statement starts with a comment; if so, move // past the comment and get the first token of the actual ... |
throw new SqlException(agent_.logWriter_, "Invalid cursor name."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CURSOR_INVALID_NAME), name); | public void setCursorName(String name) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setCursorName", name); } checkForClosedStatement(); // Per jdbc ... |
throw new SqlException(agent_.logWriter_, "Invalid operation: setCursorName() " + "called when there are open ResultSet's on the Statement."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_CANT_INVALIDATE_OPEN_RESULT_SET), "setCursorName()", "Statement"); | public void setCursorName(String name) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setCursorName", name); } checkForClosedStatement(); // Per jdbc ... |
throw new SqlException(agent_.logWriter_, "Duplicate cursor names are not allowed."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.CURSOR_DUPLICATE_NAME), name); | public void setCursorName(String name) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setCursorName", name); } checkForClosedStatement(); // Per jdbc ... |
throw new SqlException(agent_.logWriter_, "Invalid fetch direction " + direction); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_FETCH_DIRECTION), new Integer(direction)); | public void setFetchDirection(int direction) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setFetchDirection", direction); } checkForClosedStatement(... |
throw new SqlException(agent_.logWriter_, "Invalid fetch size " + rows).getSQLException(); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_ST_FETCH_SIZE), new Integer(rows)).getSQLException(); | public void setFetchSize(int rows) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setFetchSize", rows); } checkForClosedStatement(); // Per jdbc spec ... |
throw new SqlException(agent_.logWriter_, "Invalid maxFieldSize value: " + max); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_MAXFIELD_SIZE), new Integer(max)); | public void setMaxFieldSize(int max) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setMaxFieldSize", max); } checkForClosedStatement(); ... |
throw new SqlException(agent_.logWriter_, "Invalid maxRows value: " + maxRows); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.INVALID_MAX_ROWS_VALUE), new Integer(maxRows)); | public void setMaxRows(int maxRows) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setMaxRows", maxRows); } checkForClosedStatement(); // Per jdbc spe... |
"Attempt to set a negative query timeout", "XJ074.S"); | new MessageId(SQLState.INVALID_QUERYTIMEOUT_VALUE), new Integer(seconds)); | public void setQueryTimeout(int seconds) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setQueryTimeout", seconds); } checkForClosedStatement(); // Pe... |
case DependencyManager.REVOKE_PRIVILEGE: | public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException { switch ( action ) { /* creating or dropping another publication won't affect * this view. so we allow these actions. * We don't care about creating or dropping indexes or * alter table on an underlying table. ... | |
break; | case DependencyManager.REVOKE_PRIVILEGE: break; | public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException { switch ( action ) { /* * We don't care about creating or dropping indexes or * alter table on an underlying table. */ case DependencyManager.CREATE_INDEX: case DependencyManage... |
ClassName.NoPutResultSet, 16); | ClassName.NoPutResultSet, 17); | private void generateDistinctScan ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : acb.addI... |
ClassName.NoPutResultSet, 13); | ClassName.NoPutResultSet, 14); | private void generateMaxSpecialResultSet ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : a... |
se = Util.getExceptionFactory().getArgumentFerry( se ); | private String buildSqlerrmc (SQLException se) { boolean severe = (se.getErrorCode() >= ExceptionSeverity.SESSION_SEVERITY); String sqlerrmc = null; if (se instanceof EmbedSQLException && ! severe) sqlerrmc = buildTokenizedSqlerrmc((EmbedSQLException) se); else { // If this is not an EmbedSQLException or i... | |
this.schemaName = (sName !=null ? sName.toUpperCase(java.util.Locale.ENGLISH):sName); this.tableName = (tName !=null ? tName.toUpperCase(java.util.Locale.ENGLISH):tName); | this.schemaName = sName; this.tableName = tName; | public ColumnInfo(Connection conn, String sName, String tName, String insertColumnList, String vtiColumnIndexes, String vtiColumnPrefix) throws SQLException { vtiColumnNames = new ArrayList(1); insertColumnNames = new ArrayList(1); columnTypes = new ArrayList(1); noOfColumns = 0; ... |
sb.append("\""); | public String getInsertColumnNames() { StringBuffer sb = new StringBuffer(); boolean first = true; for(int index = 0 ; index < noOfColumns; index++) { if(!first) sb.append(", "); else first = false; sb.append(insertColumnNames.get(index)); } //there is no column info available if(first) return nu... | |
(columnPattern !=null ? columnPattern.toUpperCase(java.util.Locale.ENGLISH):columnPattern)); | columnPattern); | private boolean initializeColumnInfo(String columnPattern) throws SQLException { DatabaseMetaData dmd = conn.getMetaData(); ResultSet rs = dmd.getColumns(null, schemaName, tableName, (columnPattern !=null ? columnPattern.toUpperCase(java.util.Locale.ENGLISH):columnPattern)); boolean ... |
" Unable to obtain message text from server." + " See chained exception." + " The stored procedure SYSIBM.SQLCAMESSAGE is not installed on server." + " Contact your DBA."); | new MessageId(SQLState.UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER)); | private void chainDeferredExceptionsToAgentOrAsConnectionWarnings(SqlException e) { SqlException current = e; while (current != null) { SqlException next = (SqlException) current.getNextException(); current = current.copyAsUnchainedSQLException(agent_.logWriter_); if (... |
" Unable to obtain message text from server." + " See chained exception." + " The stored procedure SYSIBM.SQLCAMESSAGE cannot be accessed on the server." + " Contact your DBA."); | new MessageId(SQLState.UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER)); | private void chainDeferredExceptionsToAgentOrAsConnectionWarnings(SqlException e) { SqlException current = e; while (current != null) { SqlException next = (SqlException) current.getNextException(); current = current.copyAsUnchainedSQLException(agent_.logWriter_); if (... |
int c = 0; for (;;) { c = reader.read(); if (c < 0) { break; } else if (c != SPACE) { throw new IOException( | truncate(); } int remainingBytes = reader.clearLimit(); if (remainingBytes > 0 && valueLength > 0) { throw new DerbyIOException( MessageService.getTextMessage( SQLState.SET_STREAM_INEXACT_LENGTH_DATA), SQLState.SET_STREAM_INEXACT_LENGTH_DATA); } if (remainingBytes == 0 && reader.read() >= 0) { if (valueLength >... | private void checkSufficientData() throws IOException { // now that we finished reading from the stream; the amount // of data that we can insert,start check for trailing spaces if (charsToTruncate > 0) { reader.setLimit(charsToTruncate); int c = 0; for (;;) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.