rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return null; | public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { if( recreateFrom != null) // restore from a file { Fil... | |
return null; | public Object run() throws IOException, StandardException, InstantiationException, IllegalAccessException { if( recreateFrom != null) // restore from a file { Fil... | |
closeMethodArgument(acb, mb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. ... | |
ClassName.NoPutResultSet, 5); | ClassName.NoPutResultSet, 4); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnList and ResultSet. ... |
boolean[] bArray = {false, true}; | boolean[] bArray = {false, false}; | public void updateSchemaAuth(String schemaName, String authorizationId, TransactionController tc) throws StandardException { ExecIndexRow keyRow; DataValueDescriptor schemaNameOrderable; TabInfo ti = coreInfo[SYSSCHEMAS_CORE_NUM]; /* Use schemaNameOrderable in both start * and stop po... |
SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX2_ID, | SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX1_ID, | public void updateSchemaAuth(String schemaName, String authorizationId, TransactionController tc) throws StandardException { ExecIndexRow keyRow; DataValueDescriptor schemaNameOrderable; TabInfo ti = coreInfo[SYSSCHEMAS_CORE_NUM]; /* Use schemaNameOrderable in both start * and stop po... |
case CodePoint.DIAGLVL: diagnosticLevel = reader.readByte(); break; | private int parseACCRDB() throws DRDAProtocolException { int codePoint; int svrcod = 0; copyToRequired(ACCRDB_REQUIRED); reader.markCollection(); codePoint = reader.getCodePoint(); while (codePoint != -1) { switch (codePoint) { //required case CodePoint.RDBACCCL: checkLength(CodePoint.RDBACCCL, 2... | |
SQLWarning w = new SQLWarning(null, SQLState.ROW_UPDATED, | SQLWarning w = new SQLWarning("", SQLState.ROW_UPDATED, | private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); ... |
SQLWarning w = new SQLWarning(null, SQLState.ROW_DELETED, | SQLWarning w = new SQLWarning("", SQLState.ROW_DELETED, | private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); ... |
protected LogScan openBackwardsScan(LogInstant stopAt) | protected LogScan openBackwardsScan(long startAt, LogInstant stopAt) | protected LogScan openBackwardsScan(LogInstant stopAt) throws IOException, StandardException { checkCorrupt(); // current instant log instant of the next log record to be // written out, which is at the end of the log // ensure any buffered data is written to the actual file long startAt; synchronized (this) ... |
if (startAt == LogCounter.INVALID_LOG_INSTANT) return openBackwardsScan(stopAt); | protected LogScan openBackwardsScan(LogInstant stopAt) throws IOException, StandardException { checkCorrupt(); // current instant log instant of the next log record to be // written out, which is at the end of the log // ensure any buffered data is written to the actual file long startAt; synchronized (this) ... | |
long startAt; synchronized (this) { logOut.flushLogAccessFile(); startAt = currentInstant(); } | flushBuffer(LogCounter.getLogFileNumber(startAt), LogCounter.getLogFilePosition(startAt)); | protected LogScan openBackwardsScan(LogInstant stopAt) throws IOException, StandardException { checkCorrupt(); // current instant log instant of the next log record to be // written out, which is at the end of the log // ensure any buffered data is written to the actual file long startAt; synchronized (this) ... |
return new Scan(this, startAt, stopAt, Scan.BACKWARD_FROM_LOG_END); | return new Scan(this, startAt, stopAt, Scan.BACKWARD); | protected LogScan openBackwardsScan(LogInstant stopAt) throws IOException, StandardException { checkCorrupt(); // current instant log instant of the next log record to be // written out, which is at the end of the log // ensure any buffered data is written to the actual file long startAt; synchronized (this) ... |
if (rs.getObject(colNum + 1) != null) { rowObjects[colNum]=rs.getString(colNum + 1); } | rowObjects[colNum]=rs.getString(colNum + 1); | public String[] getOneRowAtATime(ResultSet rs) throws Exception { int columnCount = exportResultSetForObject.getColumnCount(); ResultSetMetaData rsm=rs.getMetaData(); if (rs.next()){ String[] rowObjects = new String[columnCount]; for (int colNum = 0; colNum < columnCount; colNum++) { if (r... |
this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides; | public LastIndexKeyResultSet ( Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost, Gen... | |
supportsLayerBStreaming_ = productLevel_.greaterThanOrEqualTo(10, 3, 0); | protected void computeFeatureSet_() { // Support for QRYCLSIMP was added in 10.2.0 if (productLevel_.greaterThanOrEqualTo(10, 2, 0)) { supportsQryclsimp_ = true; } else { supportsQryclsimp_ = false; } } | |
public EmbedConnection40( InternalDriver driver, String url, Properties info) throws SQLException { super(driver, url, info); | public EmbedConnection40(EmbedConnection inputConnection) { super(inputConnection); | public EmbedConnection40( InternalDriver driver, String url, Properties info) throws SQLException { super(driver, url, info); } |
hostSed.exec(tmpFile, orgFile, sedIs, false, false); | hostSed.exec(tmpFile, orgFile, sedIs, false, false, false); | public static void massageSqlFile (String hostName, String fileName) throws Exception { // only called if hostName is *not* localhost. // Need to replace each occurrence of the string 'localhost' with // whatever is the hostName File tmpFile = new File("extin", "tmpFile.sql"); F... |
super (dd, grantor, grantee); | super (dd, grantee, grantor); | public RoutinePermsDescriptor( DataDictionary dd, String grantee, String grantor, UUID routineUUID, boolean hasExecutePermission) { super (dd, grantor, grantee); this.routineU... |
if (isJCC) | if (isJCC || isNetClient) | public void XADataSourceStatement(ij parser, Token dbname, Token shutdown, String create) throws SQLException { try { currentXADataSource = (XADataSource) getXADataSource(); databaseName = parser.stringValue(dbname.image); if (isJCC) { xaHelper.setDataSourceProperty(currentXADataSo... |
xaHelper.setDataSourceProperty(currentXADataSource, "driverType", 4); | public void XADataSourceStatement(ij parser, Token dbname, Token shutdown, String create) throws SQLException { try { currentXADataSource = (XADataSource) getXADataSource(); databaseName = parser.stringValue(dbname.image); if (isJCC) { xaHelper.setDataSourceProperty(currentXADataSo... | |
else if (isNetClient) return (XADataSource) (Class.forName("org.apache.derby.jdbc.ClientXADataSource").newInstance()); | private XADataSource getXADataSource() throws Exception { // We need to construct this object in this round about fashion because // if we new it directly, then it will the tools.jar file to bloat. try { if (isJCC) return (XADataSource) (Class.forName("com.ibm.db2.jcc.DB2XADataSource").newInstance()); ... | |
t.printStackTrace(System.out); | private void handleException(Throwable t) throws SQLException { if (t instanceof SQLException) { // let ij handle it throw (SQLException)t; } if (t instanceof XAException) { int errorCode = ((XAException)t).errorCode; String error = LocalizedResource.getMessage("IJ_IlleValu"); // XA_RBBASE 100 // XA_R... | |
framework = fm.toUpperCase(); | framework = fm.toUpperCase(Locale.ENGLISH); | public void setFramework(String fm) { framework = fm.toUpperCase(); if (framework.endsWith("NET") || framework.equals("DB2JCC")) isJCC = true; } |
else if (framework.equals("DERBYNETCLIENT")) isNetClient = true; | public void setFramework(String fm) { framework = fm.toUpperCase(); if (framework.endsWith("NET") || framework.equals("DB2JCC")) isJCC = true; } | |
if (ltf.truncPoints == null) { r.append(" truncPoints: null\n"); } else { for(Enumeration e=ltf.truncPoints.elements(); e.hasMoreElements();) { Object tp = e.nextElement(); r.append(" tp: "+ DiagnosticUtil.toDiagString(tp)); } } | public String diag() throws StandardException { LogToFile ltf = (LogToFile)diag_object; StringBuffer r = new StringBuffer(); r.append("LogToFile: \n"); r.append(" Directory: "+ltf.dataDirectory+"\n"); r.append(" endPosition: "+ltf.endPosition()+"\n"); r.append(" lastFlush(offset): "+ltf.lastFlu... | |
public boolean skipChildren(Visitable node) | public boolean skipChildren(Visitable node) throws StandardException | public boolean skipChildren(Visitable node) { return (node instanceof AggregateNode) || (node instanceof SubqueryNode); } |
return (node instanceof AggregateNode) || (node instanceof SubqueryNode); | return ((node instanceof AggregateNode) || (node instanceof SubqueryNode) || (node instanceof ValueNode && groupByList != null && groupByList.findGroupingColumn((ValueNode)node) != null)); | public boolean skipChildren(Visitable node) { return (node instanceof AggregateNode) || (node instanceof SubqueryNode); } |
if (groupByList.containsColumnReference(cr) == null) | if (groupByList.findGroupingColumn(cr) == null) | public Visitable visit(Visitable node) throws StandardException { if (node instanceof ColumnReference) { ColumnReference cr = (ColumnReference)node; if (groupByList == null) { throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST, cr.getSQLColumnName()); } if (gro... |
throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_GROUPED_SELECT_LIST, cr.getSQLColumnName()); | throw StandardException.newException(SQLState.LANG_INVALID_GROUPED_SELECT_LIST); | public Visitable visit(Visitable node) throws StandardException { if (node instanceof ColumnReference) { ColumnReference cr = (ColumnReference)node; if (groupByList == null) { throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST, cr.getSQLColumnName()); } if (gro... |
} else if (node instanceof JavaToSQLValueNode) { throw StandardException.newException( (groupByList == null) ? SQLState.LANG_INVALID_NON_GROUPED_SELECT_LIST : SQLState.LANG_INVALID_GROUPED_SELECT_LIST); | public Visitable visit(Visitable node) throws StandardException { if (node instanceof ColumnReference) { ColumnReference cr = (ColumnReference)node; if (groupByList == null) { throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST, cr.getSQLColumnName()); } if (gro... | |
} else if (((Blob) b).isBinaryStream()) { writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Blob) b).length(), ((Blob) b).getBinaryStream(), writeNullByte, index + 1); | } else if ( ( (Blob) b).isBinaryStream()) { if( ( (Blob) b).willBeLayerBStreamed() ){ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, ((Blob) b).getBinaryStream(), writeNullByte, index + 1); }else{ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Blob) b).leng... | private void buildEXTDTA(ColumnMetaData parameterMetaData, Object[] inputRow, boolean chained) throws SqlException { try { // build the EXTDTA data, if necessary if (extdtaPositions_ != null) { boolean chainFl... |
} else if (((Clob) c).isCharacterStream()) { writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) c).length(), ((Clob) c).getCharacterStream(), writeNullByte, index + 1); | } else if ( ( (Clob) c).isCharacterStream()) { if( ( (Clob) c).willBeLayerBStreamed() ) { writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, ((Clob) c).getCharacterStream(), writeNullByte, index + 1); }else{ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) ... | private void buildEXTDTA(ColumnMetaData parameterMetaData, Object[] inputRow, boolean chained) throws SqlException { try { // build the EXTDTA data, if necessary if (extdtaPositions_ != null) { boolean chainFl... |
writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) c).length(), ((Clob) c).getAsciiStream(), writeNullByte, index + 1); | if( ( (Clob) c).willBeLayerBStreamed() ){ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, ((Clob) c).getAsciiStream(), writeNullByte, index + 1); }else { writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) c).length(), ((Clob) c).getAsciiStream(), writeNullB... | private void buildEXTDTA(ColumnMetaData parameterMetaData, Object[] inputRow, boolean chained) throws SqlException { try { // build the EXTDTA data, if necessary if (extdtaPositions_ != null) { boolean chainFl... |
writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) c).length(), ((Clob) c).getUnicodeStream(), writeNullByte, index + 1); | if( ( (Clob) c).willBeLayerBStreamed() ){ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, ((Clob) c).getUnicodeStream(), writeNullByte, index + 1); }else{ writeScalarStream(chainFlag, chainedWithSameCorrelator, CodePoint.EXTDTA, (int) ((Clob) c).length(), ((Clob) c).getUnicodeStream(), writeNu... | private void buildEXTDTA(ColumnMetaData parameterMetaData, Object[] inputRow, boolean chained) throws SqlException { try { // build the EXTDTA data, if necessary if (extdtaPositions_ != null) { boolean chainFl... |
long dataLength = 0; | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... | |
Clob c = (Clob) o; dataLength = c.length(); setFDODTALobLength(protocolTypesAndLengths, i, dataLength); | setFDODTALob(netAgent_.netConnection_.getSecurityMechanism(), (Clob) o, protocolTypesAndLengths, i); | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
dataLength = ((Clob) o).length(); setFDODTALobLength(protocolTypesAndLengths, i, dataLength); | setFDODTALob(netAgent_.netConnection_.getSecurityMechanism(), (Clob) o, protocolTypesAndLengths, i); | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
Blob b = (Blob) o; dataLength = b.length(); setFDODTALobLength(protocolTypesAndLengths, i, dataLength); | setFDODTALob(netAgent_.netConnection_.getSecurityMechanism(), (Clob) o, protocolTypesAndLengths, i); | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
dataLength = ((java.sql.Clob) inputs[i]).length(); | java.sql.Clob c = (java.sql.Clob) inputs[i]; if( c instanceof Clob && ( (Clob) c ).willBeLayerBStreamed() ) { setFDODTALobLengthUnknown( i ); }else{ long dataLength = c.length(); setFDODTALobLength(protocolTypesAndLengths, i, dataLength); } | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
dataLength = ((Clob) o).length(); } setFDODTALobLength(protocolTypesAndLengths, i, dataLength); | setFDODTALob(netAgent_.netConnection_.getSecurityMechanism(), (Clob) o, protocolTypesAndLengths, i); } | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
dataLength = ((java.sql.Blob) inputs[i]).length(); | java.sql.Blob b = (java.sql.Blob) inputs[i]; if( b instanceof Blob && ( (Blob) b ).willBeLayerBStreamed() ) { setFDODTALobLengthUnknown( i ); }else{ long dataLength = b.length(); setFDODTALobLength(protocolTypesAndLengths, i, dataLength); } | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
dataLength = ((Blob) o).length(); } setFDODTALobLength(protocolTypesAndLengths, i, dataLength); | setFDODTALob(netAgent_.netConnection_.getSecurityMechanism(), (Blob) o, protocolTypesAndLengths, i); } | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
if (((Clob) inputs[i]).isString()) { dataLength = ((Clob) inputs[i]).getUTF8Length(); } else { dataLength = ((Clob) inputs[i]).length(); | final Clob c = (Clob) inputs[i]; if (c.isString()) { setFDODTALobLength(protocolTypesAndLengths, i, c.getUTF8Length() ); } else if ( ! c.willBeLayerBStreamed() ){ setFDODTALobLength(protocolTypesAndLengths, i, c.length() ); } else { setFDODTALobLengthUnknown( i ); | private void buildFDODTA(int numVars, int[][] protocolTypesAndLengths, Object[] inputs) throws SqlException { try { long dataLength = 0; Object o = null; markLengthBytes(CodePoint.FDODTA); write1Byte(Fd... |
lidAndLengths[i][0] = DRDAConstants.DRDA_TYPE_NLOBCMIXED; lidAndLengths[i][1] = buildPlaceholderLength(c.length()); | lidAndLengths[i][0] = DRDAConstants.DRDA_TYPE_NLOBCMIXED; if( c.willBeLayerBStreamed() ){ lidAndLengths[i][1] = 0x8002; }else { lidAndLengths[i][1] = buildPlaceholderLength(c.length()); } | private java.util.Hashtable computeProtocolTypesAndLengths(Object[] inputRow, ColumnMetaData parameterMetaData, int[][] lidAndLengths, ... |
lidAndLengths[i][1] = buildPlaceholderLength(b.length()); | if( b instanceof Blob && ( (Blob) b).willBeLayerBStreamed() ){ lidAndLengths[i][1] = 0x8002; }else { lidAndLengths[i][1] = buildPlaceholderLength(b.length()); } | private java.util.Hashtable computeProtocolTypesAndLengths(Object[] inputRow, ColumnMetaData parameterMetaData, int[][] lidAndLengths, ... |
lobLength = ((Clob) c).length(); } | if( ( (Clob) c ).willBeLayerBStreamed() ){ doesLayerBStreaming = true; }else{ lobLength = ((Clob) c).length(); } } | private java.util.Hashtable computeProtocolTypesAndLengths(Object[] inputRow, ColumnMetaData parameterMetaData, int[][] lidAndLengths, ... |
lidAndLengths[i][1] = buildPlaceholderLength(lobLength); | if( doesLayerBStreaming ) { lidAndLengths[i][1] = 0x8002; }else { lidAndLengths[i][1] = buildPlaceholderLength(lobLength); } | private java.util.Hashtable computeProtocolTypesAndLengths(Object[] inputRow, ColumnMetaData parameterMetaData, int[][] lidAndLengths, ... |
lidAndLengths[i][1] = buildPlaceholderLength(((Clob) c).getUTF8Length()); | if( doesLayerBStreaming ) { lidAndLengths[i][1] = 0x8002; }else { lidAndLengths[i][1] = buildPlaceholderLength(lobLength); } | private java.util.Hashtable computeProtocolTypesAndLengths(Object[] inputRow, ColumnMetaData parameterMetaData, int[][] lidAndLengths, ... |
if (stmt.withHoldCursor == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) | if (stmt.getCurrentDrdaResultSet().withHoldCursor == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) | private void writeOPNQRYRM(boolean isDssObject, DRDAStatement stmt) throws DRDAProtocolException, SQLException { if (SanityManager.DEBUG) trace("WriteOPNQRYRM"); if (isDssObject) writer.createDssObject(); else writer.createDssReply(); writer.startDdm(CodePoint.OPNQRYRM); writer.writeScalar2Bytes(CodePoint... |
return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { create(); } catch (SQLException sqle) { if (sqle.getSQLState().equals("X0Y32")) { drop(); create(); } else { throw sqle; } } } | return new CleanDatabaseTestSetup(suite) { | private static Test baseSuite(String name) { TestSuite suite = new TestSuite(name); suite.addTestSuite(PreparedStatementTest.class); return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { ... |
public void tearDown() throws java.lang.Exception { drop(); super.tearDown(); } private void create() throws SQLException { Statement stmt = getConnection().createStatement(); | protected void decorateSQL(Statement stmt) throws SQLException { | private static Test baseSuite(String name) { TestSuite suite = new TestSuite(name); suite.addTestSuite(PreparedStatementTest.class); return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { ... |
stmt.close(); } private void drop() throws SQLException { Statement stmt = getConnection().createStatement(); stmt.execute("drop table " + BLOBTBL); stmt.execute("drop table " + CLOBTBL); stmt.execute("drop table " + LONGVARCHAR); stmt.close(); } | } | private static Test baseSuite(String name) { TestSuite suite = new TestSuite(name); suite.addTestSuite(PreparedStatementTest.class); return new BaseJDBCTestSetup(suite) { public void setUp() throws java.lang.Exception { try { ... |
suite.addTest( TestConfiguration.clientServerDecorator( TestConfiguration.connectionXADecorator( baseSuite("PreparedStatementTest:client XXXXADataSource")))); | public static Test suite() { TestSuite suite = new TestSuite("PreparedStatementTest suite"); suite.addTest(baseSuite("PreparedStatementTest:embedded")); suite.addTest(TestConfiguration.clientServerDecorator( baseSuite("PreparedStatementTest:client"))); return suite; } | |
if (SanityManager.DEBUG) { SanityManager.ASSERT(xact != null); } | public final RawTransaction getTransaction() { if (SanityManager.DEBUG) { SanityManager.ASSERT(xact != null); } return xact; } | |
if (isPrivilegeCollectionRequired()) { getCompilerContext().addRequiredSchemaPriv(schemaName, lcc.getAuthorizationId(), Authorizer.DROP_SCHEMA_PRIV); } | public QueryTreeNode bind() throws StandardException { LanguageConnectionContext lcc = getLanguageConnectionContext(); /* ** Users are not permitted to drop ** the SYS or APP schemas. */ if (getDataDictionary().isSystemSchemaName(schemaName)) { throw(StandardException.newException( ... | |
throw Util.notImplemented(); | try { return getRealConnection().getTypeMap(); } catch (SQLException se) { notifyException(se); throw se; } | public java.util.Map<String,Class<?>> getTypeMap() throws SQLException { throw Util.notImplemented(); } |
checkIfClosed(); | public boolean isWrapperFor(Class<?> interfaces) throws SQLException { return interfaces.isInstance(this); } | |
double selectivity(Optimizable optTable); | double selectivity(Optimizable optTable) throws StandardException; | double selectivity(Optimizable optTable); |
** tableName, | ** tableName, ** optimizeroverride | private void generateDistinctScan ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : acb.addI... |
mb.push(cd.getConglomerateName()); | pushIndexName(cd, mb); | private void generateDistinctScan ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : acb.addI... |
** tableName, | ** tableName, ** optimizeroverride | private void generateMaxSpecialResultSet ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : a... |
mb.push(cd.getConglomerateName()); | pushIndexName(cd, mb); | private void generateMaxSpecialResultSet ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : a... |
private String bytes2String(byte[] bytes, int offset, int length) | protected String bytes2String(byte[] bytes, int offset, int length) | private String bytes2String(byte[] bytes, int offset, int length) throws java.io.UnsupportedEncodingException { // Network server uses utf8 encoding return new String(bytes, offset, length, Typdef.UTF8ENCODING); } |
if (sqlState_ != null) { return sqlState_; } if (sqlStateBytes_ == null) { return null; } try { sqlState_ = bytes2String(sqlStateBytes_, 0, sqlStateBytes_.length); return sqlState_; } catch (java.io.UnsupportedEncodingException e) { return null; } | return sqlState_; | synchronized public String getSqlState() { if (sqlState_ != null) { return sqlState_; } if (sqlStateBytes_ == null) { return null; } try { sqlState_ = bytes2String(sqlStateBytes_, 0, sqlStateBytes_.length); ... |
byte[] sqlStateBytes, byte[] sqlErrpBytes, int ccsid) { | String sqlState, byte[] sqlErrpBytes) { | public void resetRowsetSqlca(org.apache.derby.client.am.Connection connection, int sqlCode, byte[] sqlStateBytes, byte[] sqlErrpBytes, int ccsid) { connection_ = connection; ... |
sqlStateBytes_ = sqlStateBytes; | sqlState_ = sqlState; | public void resetRowsetSqlca(org.apache.derby.client.am.Connection connection, int sqlCode, byte[] sqlStateBytes, byte[] sqlErrpBytes, int ccsid) { connection_ = connection; ... |
ccsid_ = ccsid; | public void resetRowsetSqlca(org.apache.derby.client.am.Connection connection, int sqlCode, byte[] sqlStateBytes, byte[] sqlErrpBytes, int ccsid) { connection_ = connection; ... | |
suite.addTest( TestConfiguration.defaultSuite(XMLTypeAndOpsTest.class, false)); | public static Test suite() { TestSuite suite = new TestSuite("XML Type and Operators Suite\n"); if (!XML.classpathMeetsXMLReqs()) return suite; // First wrap the tests in a TestSetup that sets up / tears down // the "fixture", and run those wrapped tests in embedded mode. ... | |
TestSuite helperSuite = new TestSuite("XML Type And Ops -- Embedded\n"); helperSuite.addTestSuite(XMLTypeAndOpsTest.class); suite.addTest(new XMLTestSetup(helperSuite)); helperSuite = new TestSuite("XML Type And Ops -- Derby Client\n"); helperSuite.addTest(TestConfiguration.clientServerSuite( XMLTypeAndOpsTest.clas... | return (new XMLTestSetup(suite)); | public static Test suite() { TestSuite suite = new TestSuite("XML Type and Operators Suite\n"); if (!XML.classpathMeetsXMLReqs()) return suite; // First wrap the tests in a TestSetup that sets up / tears down // the "fixture", and run those wrapped tests in embedded mode. ... |
public DependentResultSet( | DependentResultSet( | public DependentResultSet( long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qual... |
GeneratedMethod closeCleanup, | public DependentResultSet( long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qual... | |
this.closeCleanup = closeCleanup; | public DependentResultSet( long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qual... | |
"alter table " + schema + "." + tablename + " compress" + (sequential != 0 ? " sequential" : ""); | "alter table " + "\"" + schema + "\"" + "." + "\"" + tablename + "\"" + " compress" + (sequential != 0 ? " sequential" : ""); | public static void SYSCS_COMPRESS_TABLE( String schema, String tablename, int sequential) throws SQLException { String query = "alter table " + schema + "." + tablename + " compress" + (sequential != 0 ? " sequential" : ""); Connection conn = getDefaultConn()... |
URLFile( URLFile dir, String name) | URLFile( URLStorageFactory storageFactory, String path) | URLFile( URLFile dir, String name) { super( dir,name); this.storageFactory = dir.storageFactory; } |
super( dir,name); this.storageFactory = dir.storageFactory; | super( storageFactory, path); this.storageFactory = storageFactory; | URLFile( URLFile dir, String name) { super( dir,name); this.storageFactory = dir.storageFactory; } |
try { DriverManager.registerDriver(this); | AutoloadedDriver.registerDriverModule( this ); | public void boot(boolean create, Properties properties) throws StandardException { super.boot(create, properties); // Register with the driver manager try { DriverManager.registerDriver(this); // hold onto the driver manager to avoid it being garbage collected. // make sure the class is loaded by using .cl... |
antiGCDriverManager = java.sql.DriverManager.class; } catch (SQLException e) { throw StandardException.newException(SQLState.JDBC_DRIVER_REGISTER, e); } | antiGCDriverManager = java.sql.DriverManager.class; | public void boot(boolean create, Properties properties) throws StandardException { super.boot(create, properties); // Register with the driver manager try { DriverManager.registerDriver(this); // hold onto the driver manager to avoid it being garbage collected. // make sure the class is loaded by using .cl... |
try { DriverManager.deregisterDriver(this); } catch (SQLException sqle) { } | AutoloadedDriver.unregisterDriverModule(); | public void stop() { super.stop(); try { DriverManager.deregisterDriver(this); } catch (SQLException sqle) { // just do nothing } } |
cstmt.setObject(1,bytearr,java.sql.Types.BLOB); System.out.println("execute the procedure with BLOB"); cstmt.executeUpdate(); | static void testLongBinary(Connection conn) { try { String createTabSql = "create table Longvarbinary_Tab (lvbc Long varchar for bit data)"; PreparedStatement ps = conn.prepareStatement(createTabSql); int updcount = ps.executeUpdate(); String insertTabSql = "insert into Longvarbinary_Tab values( X'010305')"; ps... | |
((UpdateServiceProperties)properties).saveServiceProperties(); | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... | |
restoreRemainingFromBackup(restoreFromBackup); | public void boot(boolean create, Properties properties) throws StandardException { dataDirectory = properties.getProperty(PersistentService.ROOT); DaemonFactory daemonFactory = (DaemonFactory)Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.DaemonFactory); rawStoreDaemon = daemonFactory.createNew... | |
File backuploc = new File(backupPath); String[] fromList = privList(backuploc); for(int i =0 ; i < fromList.length ; i++) | File backupJarDir = new File(backupPath, FileResource.JAR_DIRECTORY_NAME); StorageFile dbJarDir = storageFactory.newStorageFile(FileResource.JAR_DIRECTORY_NAME); if (!privExists(dbJarDir) && privExists(backupJarDir)) | private void restoreRemainingFromBackup(String backupPath) throws StandardException { /** *copy the files from the backup except the ones that we already *copied in the boot methods(like log directory and data segments) *AND Service.properties file which we create last to *indicate the end of copy from backu... |
StorageFile toFile = storageFactory.newStorageFile( fromList[i]); if(privExists(toFile) || fromList[i].equals(PersistentService.PROPERTIES_NAME)){ continue; } File fromFile = new File(backuploc, fromList[i]); if(privIsDirectory(fromFile)) { if (!privCopyDirectory(fromFile, toFile)){ throw StandardException.newExceptio... | if (!privCopyDirectory(backupJarDir, dbJarDir)) { throw StandardException.newException( | private void restoreRemainingFromBackup(String backupPath) throws StandardException { /** *copy the files from the backup except the ones that we already *copied in the boot methods(like log directory and data segments) *AND Service.properties file which we create last to *indicate the end of copy from backu... |
fromFile, toFile); } }else{ if (!privCopyFile(fromFile, toFile)){ throw StandardException.newException( SQLState.UNABLE_TO_COPY_FILE_FROM_BACKUP, fromFile, toFile); } | backupJarDir, dbJarDir); | private void restoreRemainingFromBackup(String backupPath) throws StandardException { /** *copy the files from the backup except the ones that we already *copied in the boot methods(like log directory and data segments) *AND Service.properties file which we create last to *indicate the end of copy from backu... |
StorageFile dbHistoryFile = storageFactory.newStorageFile(BACKUP_HISTORY); File backupHistoryFile = new File(backupPath, BACKUP_HISTORY); if (!privExists(dbHistoryFile)) if (!privCopyFile(backupHistoryFile, dbHistoryFile)) throw StandardException. newException(SQLState.RAWSTORE_ERROR_COPYING_FILE, backupHistoryFile... | private void restoreRemainingFromBackup(String backupPath) throws StandardException { /** *copy the files from the backup except the ones that we already *copied in the boot methods(like log directory and data segments) *AND Service.properties file which we create last to *indicate the end of copy from backu... | |
for (int i = holders.size() - 1; i >= 0 ; i--) { | int invalidItems = holders.size() - validItemCount; for (int i = holders.size() - 1; (invalidItems > 0) && (i >= 0) ; i--) { | protected CachedItem findFreeItem() throws StandardException { // Need to avoid thrashing the cache when we start out // so if the cache is smaller than its maximum size // then that's a good indication we should grow. long currentSize = getCurrentSize(); if (currentSize >= maximumSize) { // look at 20% Cache... |
if (item.isKept()) | if (item.isKept()) { if (!item.isValid()) invalidItems--; | protected CachedItem findFreeItem() throws StandardException { // Need to avoid thrashing the cache when we start out // so if the cache is smaller than its maximum size // then that's a good indication we should grow. long currentSize = getCurrentSize(); if (currentSize >= maximumSize) { // look at 20% Cache... |
} | protected CachedItem findFreeItem() throws StandardException { // Need to avoid thrashing the cache when we start out // so if the cache is smaller than its maximum size // then that's a good indication we should grow. long currentSize = getCurrentSize(); if (currentSize >= maximumSize) { // look at 20% Cache... | |
Statement statement = conn.createStatement(); | statement = conn.createStatement(); | public void doTag(XMLOutput output) throws Exception { try { conn = getConnection(); } catch (SQLException e) { throw new JellyException(sql + ": " + e.getMessage(), e); } /* * Use the SQL statement specified by the sql attribute, if any, * ot... |
if (statement != null) { try { statement.close(); } catch (SQLException e) { } } | public void doTag(XMLOutput output) throws Exception { try { conn = getConnection(); } catch (SQLException e) { throw new JellyException(sql + ": " + e.getMessage(), e); } /* * Use the SQL statement specified by the sql attribute, if any, * ot... | |
"Invalid attempt to set the return value parameter of a CALL statement." + "Return value parameter of {?=CALL foo(?,?)} statement is parameter 1."); | new MessageId(SQLState.LANG_RETURN_OUTPUT_PARAM_CANNOT_BE_SET)); | private int checkForEscapedCallWithResult(int parameterIndex) throws SqlException { if (escapedProcedureCallWithResult_) { if (parameterIndex == 1) { throw new SqlException(agent_.logWriter_, "Invalid attempt to set the return value parameter of a CALL stateme... |
throw new SqlException(agent_.logWriter_, "Invalid argument: parameter index " + parameterIndex + " is out of range."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_INVALID_PARAM_POSITION), new Integer(parameterIndex), new Integer(parameterMetaData_.columns_)); | void checkForValidParameterIndex(int parameterIndex) throws SqlException { if (parameterMetaData_ == null || parameterIndex < 1 || parameterIndex > parameterMetaData_.columns_) { throw new SqlException(agent_.logWriter_, "Invalid argument: parameter index " + parameterIndex + " ... |
throw new SqlException(agent_.logWriter_, "Invalid argument: scale must be greater than or equal to 0 and less than 32."); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.BAD_SCALE_VALUE), new Integer(scale)); | void checkForValidScale(int scale) throws SqlException { if (scale < 0 || scale > 31) { throw new SqlException(agent_.logWriter_, "Invalid argument: scale must be greater than or equal to 0 and less than 32."); } } |
throw new SqlException(agent_.logWriter_, "The scale supplied by the registerOutParameter method does " + "not match with the setter method. Possible loss of precision!"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER)); | void checkScaleForINOUTDecimal(int parameterIndex, int registerOutScale) throws SqlException { java.math.BigDecimal decimalInput = (java.math.BigDecimal) parameters_[parameterIndex - 1]; if (decimalInput == null) { return; } // if the register out scale is greater than input s... |
throw new SqlException(agent_.logWriter_, "At least one parameter to the current statement is uninitialized.", "07000"); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.LANG_MISSING_PARMS)); | private void checkThatAllParametersAreSet() throws SqlException { if (parameterMetaData_ != null) { for (int i = 0; i < parameterMetaData_.columns_; i++) { if (!parameterSet_[i] && !parameterRegistered_[i]) { throw new SqlException(agent_.logWriter_, "At least one... |
"The method java.sql.Statement.execute (String sql) cannot be called on a " + " prepared statement instance." + " Use java.sql.PreparedStatement.execute () with no sql string argument.").getSQLException(); | new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT), "execute(String)").getSQLException(); | public boolean execute(String sql) throws SQLException { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "execute", sql); } throw new SqlException(agent_.logWriter_, "The method java.sql.Statement.execute (String sql) cannot be called on a " + ... |
throw new BatchUpdateException(agent_.logWriter_, "No more than 65534 commands may be added to a single batch", updateCounts); | throw new BatchUpdateException(agent_.logWriter_, new MessageId(SQLState.TOO_MANY_COMMANDS_FOR_BATCH), new Integer(65534), updateCounts); | private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu... |
throw new BatchUpdateException(agent_.logWriter_, "Batching of queries not allowed by J2EE compliance", updateCounts); | throw new BatchUpdateException(agent_.logWriter_, new MessageId(SQLState.CANNOT_BATCH_QUERIES), updateCounts); | private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu... |
throw new BatchUpdateException(agent_.logWriter_, "Query batch requested on a non-query statement", updateCounts); | throw new BatchUpdateException(agent_.logWriter_, new MessageId(SQLState.QUERY_BATCH_ON_NON_QUERY_STATEMENT), updateCounts); | private int[] executeBatchRequestX(boolean supportsQueryBatchRequest) throws SqlException, BatchUpdateException { SqlException chainBreaker = null; int batchSize = batch_.size(); int[] updateCounts = new int[batchSize]; int numInputColumns; try { numInputColu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.