rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
checkForClosedStatement(); checkForSupportedDataType(jdbcType); | public void setNull(int parameterIndex, int jdbcType) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setNull", parameterIndex, jdbcType); } ... | |
checkForSupportedDataType(jdbcType); super.checkForClosedStatement(); parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | void setNullX(int parameterIndex, int jdbcType) throws SqlException { checkForSupportedDataType(jdbcType); super.checkForClosedStatement(); // investigate what can be pushed up to setNull parameterIndex = checkSetterPreconditions(parameterIndex); parameterMetaData_.clientParamtertype_[p... |
super.checkForClosedStatement(); | public void setObject(int parameterIndex, Object x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setObject", parameterIndex, x); } super.checkForClo... | |
checkSetterPreconditions(parameterIndex); | checkForClosedStatement(); checkForValidParameterIndex(parameterIndex); | public void setObject(int parameterIndex, Object x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setObject", parameterIndex, x); } super.checkForClo... |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | private void setObjectX(int parameterIndex, Object x, int targetJdbcType, int scale) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); checkForValidScale(scale); if (x == null) { ... |
checkForSupportedDataType(targetJdbcType); | private void setObjectX(int parameterIndex, Object x, int targetJdbcType, int scale) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); checkForValidScale(scale); if (x == null) { ... | |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public void setRef(int parameterIndex, java.sql.Ref x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setRef", parameterIndex, x); } parameterIndex = ... |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | void setShortX(int parameterIndex, short x) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.SMALLINT; setInput(parameterIndex, new Short(x)); } |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | void setStringX(int parameterIndex, String x) throws SqlException { parameterIndex = checkSetterPreconditions(parameterIndex); parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.LONGVARCHAR; if (x == null) { setNullX(parameterIndex, java.sql.Types.LONGVARCHAR... |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public void setTime(int parameterIndex, java.sql.Time x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setTime", parameterIndex, x); } ... |
parameterIndex = checkSetterPreconditions(parameterIndex); | parameterIndex = checkForEscapedCallWithResult(parameterIndex); | public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setTimestamp", parameterIndex, x); } ... |
System.out.print(tag + ": ru(" + rs.getCursorName() + ") contents"); | String cursorName = rs.getCursorName(); if (hasGetCursorNameBug && cursorName.startsWith("SQL_CUR")) { cursorName = cursorName.substring(0,13); } System.out.print(tag + ": ru(" + cursorName + ") contents"); | private static void resultSetQuery(String tag, ResultSet rs) throws SQLException { System.out.print(tag + ": ru(" + rs.getCursorName() + ") contents"); SecurityCheck.inspect(rs, "java.sql.ResultSet"); while (rs.next()) { System.out.print(" {" + rs.getInt(1) + "}"); } System.out.println(""); rs.close(); } |
printState("re-join X1", cs1); | if (isolationSetProperlyOnJoin) printState("re-join X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
printState("re-join with new handle X1", cs1); | if (isolationSetProperlyOnJoin) printState("re-join with new handle X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
printState("pre-X1 commit - X1", cs1); | if (isolationSetProperlyOnJoin) printState("pre-X1 commit - X1", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
if (isolationResetOnSecondGetConnection) printState("initial local", cs1); | printState("initial local", cs1); | protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate( "create procedure checkConn2(in d... |
return composeDefaultMessage(messageId, arguments); | return composeDefaultMessage("UNKNOWN MESSAGE, id " + messageId, arguments); | public static String formatMessage(ResourceBundle bundle, String messageId, Object[] arguments, boolean composeDefault) { String message = null; if (arguments == null) arguments = new Object[0]; if (bundle != null) { try { message = bundle.ge... |
if (SanityManager.DEBUG) { SanityManager.ASSERT(outerCost != null, "outerCost is not expected to be null"); } | public void costPermutation() throws StandardException { /* ** Get the cost of the outer plan so far. This gives us the current ** estimated rows, ordering, etc. */ CostEstimate outerCost; if (joinPosition == 0) { outerCost = outermostCostEstimate; } else { /* ** NOTE: This is somewhat problematic. W... | |
if (joinPosition > 0) | if (joinPosition >= 0) | public boolean getNextPermutation() throws StandardException { /* Don't get any permutations if there is nothing to optimize */ if (numOptimizables < 1) { if (optimizerTrace) { trace(NO_TABLES, 0, 0, 0.0, null); } endOfRoundCleanup(); return false; } /* Make sure that all Optimizables init their ac... |
throw Util.notImplemented(); | if( map == null) throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,map,"map", "java.sql.Connection.setTypeMap"); if(!(map.isEmpty())) throw Util.notImplemented(); | public void setTypeMap(java.util.Map map) throws SQLException { throw Util.notImplemented(); } |
PrintWriter shutdownLogWriter = null; try{ shutdownLogWriter = new PrintWriter( new FileWriter( new File("shutdown.log") ) ); networkServer.setLogWriter(shutdownLogWriter); | public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ... | |
}finally{ if( shutdownLogWriter != null ){ shutdownLogWriter.flush(); shutdownLogWriter.close(); } } | public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through ... | |
this.setThrowable(cause); | public SqlException(LogWriter logwriter, MessageId msgid, Object[] args, Throwable cause) { this( logwriter, msgutil_.getCompleteMessage( msgid.msgid, args), ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid), ExceptionUti... | |
while(firstLogFileToBackup <= lastLogFileToBackup) | while(logFileToBackup <= lastLogFileToBackup) | private void backupLogFiles(File toDir, long lastLogFileToBackup) throws StandardException { while(firstLogFileToBackup <= lastLogFileToBackup) { StorageFile fromFile = getLogFileName(firstLogFileToBackup); File toFile = new File(toDir, fromFile.getName()); if(!privCopyFile(fromFile, toFile)) { th... |
StorageFile fromFile = getLogFileName(firstLogFileToBackup); | StorageFile fromFile = getLogFileName(logFileToBackup); | private void backupLogFiles(File toDir, long lastLogFileToBackup) throws StandardException { while(firstLogFileToBackup <= lastLogFileToBackup) { StorageFile fromFile = getLogFileName(firstLogFileToBackup); File toFile = new File(toDir, fromFile.getName()); if(!privCopyFile(fromFile, toFile)) { th... |
firstLogFileToBackup++; | logFileToBackup++; | private void backupLogFiles(File toDir, long lastLogFileToBackup) throws StandardException { while(firstLogFileToBackup <= lastLogFileToBackup) { StorageFile fromFile = getLogFileName(firstLogFileToBackup); File toFile = new File(toDir, fromFile.getName()); if(!privCopyFile(fromFile, toFile)) { th... |
firstLogNeeded = (backupInProgress ? firstLogFileToBackup : firstLogNeeded); | private void deleteObsoleteLogfiles(){ StorageFile logDir; //find the first log file number that is useful long firstLogNeeded = getFirstLogNeeded(currentCheckpoint); // when backup is in progress, Any that are yet to be copied to the // backup should not be deleted, even if they are ... | |
if(backupInProgress) { long logFileNeededForBackup = logFileToBackup; if (logFileNeededForBackup < firstLogNeeded) firstLogNeeded = logFileNeededForBackup; } | private void deleteObsoleteLogfiles(){ StorageFile logDir; //find the first log file number that is useful long firstLogNeeded = getFirstLogNeeded(currentCheckpoint); // when backup is in progress, Any that are yet to be copied to the // backup should not be deleted, even if they are ... | |
firstLogFileToBackup = getFirstLogNeeded(currentCheckpoint); | logFileToBackup = getFirstLogNeeded(currentCheckpoint); | public void startLogBackup(File toDir) throws StandardException { // synchronization is necessary to make sure NO parallel // checkpoint happens when the current checkpoint information // is being copied to the backup. synchronized(this) { // wait until the thread that is doing the checkpoint completes it.... |
firstLogNeeded = (backupInProgress ? firstLogFileToBackup : firstLogNeeded); | if(backupInProgress) { long logFileNeededForBackup = logFileToBackup; if (logFileNeededForBackup < firstLogNeeded) firstLogNeeded = logFileNeededForBackup; } | private void truncateLog(CheckpointOperation checkpoint) { long oldFirstLog; long firstLogNeeded; if (keepAllLogs) return; if ((firstLogNeeded = getFirstLogNeeded(checkpoint))==-1) return; // when backup is in progress, Any that are yet to be copied to the // backup should not be deleted, even if they ar... |
return active && !url.startsWith(Attribute.JCC_PROTOCOL) && !url.startsWith(Attribute.DNC_PROTOCOL) && (url.startsWith(Attribute.PROTOCOL) || url.equals(Attribute.SQLJ_NESTED)); | return active && embeddedDriverAcceptsURL( url ); | public boolean acceptsURL(String url) { return active && // need to reject network driver's URL's !url.startsWith(Attribute.JCC_PROTOCOL) && !url.startsWith(Attribute.DNC_PROTOCOL) && (url.startsWith(Attribute.PROTOCOL) || url.equals(Attribute.SQLJ_NESTED)); } |
} finally { if (st != null) { st.close(); } if (rs != null) { rs.close(); } if (reader != null) { reader.close(); } | public void runGetReaderTwiceTest() throws SQLException, IOException { Reader reader = null; Statement st = createStatement(); ResultSet rs = st.executeQuery( "select * from testLob"); assertTrue("FAIL - row not found", rs.next()); println("get reader from testLob ... | |
rs.close(); st.close(); | public void runGetReaderTwiceTest() throws SQLException, IOException { Reader reader = null; Statement st = createStatement(); ResultSet rs = st.executeQuery( "select * from testLob"); assertTrue("FAIL - row not found", rs.next()); println("get reader from testLob ... | |
} finally { if (st != null) { st.close(); } if (rs != null) { rs.close(); } if (is != null) { is.close(); } | private void runGetStreamTwiceTest() throws SQLException, IOException { InputStream is = null; Statement st = createStatement(); ResultSet rs = st.executeQuery("select * from testLob"); assertTrue("FAIL - row not found", rs.next()); println("get stream from... | |
rs.close(); st.close(); | private void runGetStreamTwiceTest() throws SQLException, IOException { InputStream is = null; Statement st = createStatement(); ResultSet rs = st.executeQuery("select * from testLob"); assertTrue("FAIL - row not found", rs.next()); println("get stream from... | |
columnList[ SYSCOLPERMS_COLPERMSID - 1] = new SystemColumnImpl( convertIdCase( "COLPERMSID"), SYSCOLPERMS_COLPERMSID, 0, 0, false, "CHAR", true, 36); | public SystemColumn[] buildColumnList() { if (columnList == null) { columnList = new SystemColumn[ COLUMN_COUNT]; columnList[ GRANTEE_COL_NUM - 1] = new SystemColumnImpl( convertIdCase( "GRANTEE"), GRANTEE_COL_NUM, ... | |
row.setColumn( SYSCOLPERMS_COLPERMSID, dvf.getCharDataValue(colPermID)); | public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException { DataValueDescriptor grantee = null; DataValueDescriptor grantor = null; String tableID = null; String type = null; FormatableBitSet columns = null; if( td == null) { ... | |
public void addRequiredSchemaPriv(String schemaName, String aid, boolean privType) | public void addRequiredSchemaPriv(String schemaName, String aid, int privType) | public void addRequiredSchemaPriv(String schemaName, String aid, boolean privType) { if( requiredSchemaPrivileges == null || schemaName == null) return; StatementSchemaPermission key = new StatementSchemaPermission(schemaName, aid, privType); requiredSchemaPrivileges.put(key, key); } |
public StatementSchemaPermission(String schemaName, String aid, boolean privType) | public StatementSchemaPermission(String schemaName, String aid, int privType) | public StatementSchemaPermission(String schemaName, String aid, boolean privType) { this.schemaName = schemaName; this.aid = aid; this.privType = privType; } |
if (xaState_ == XA_T0_NOT_ASSOCIATED) { | if (getXAState() == XA_T0_NOT_ASSOCIATED) { | protected boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException { if (xaState_ == XA_T0_NOT_ASSOCIATED) { return true; } return false; } |
if (resultSetHoldability_ == 0) { ((org.apache.derby.client.net.NetDatabaseMetaData) databaseMetaData_).setDefaultResultSetHoldability(); } | public void resetNetConnection(org.apache.derby.client.am.LogWriter logWriter, String user, String password, org.apache.derby.jdbc.ClientDataSource ds, boolean recomputeFromDataSou... | |
char [] line = new char[1024]; | LineNumberReader reader = new LineNumberReader(new InputStreamReader(is, "ISO-8859-1")); | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
for (int count = readLine(is, line); count != -1; count = readLine(is, line)) | String line = null; for (line = reader.readLine(); line != null; line = reader.readLine()) | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
if (count == 0) | if (line.length() == 0) | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
else if (line[0] == '#') { | else if (line.charAt(0) == '#') { | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
odbcMetaFile.write(line, 0, count); | odbcMetaFile.write(line); | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
if (count >= line.length) { throw new IOException( "Encountered line longer than expected when reading metadata " + "file; either shorten the line, or increase the limit..."); | query.append(line); query.append("\n"); boolean done = true; for (int lastNonWS = line.length() - 1; lastNonWS >= 0; lastNonWS--) { char ch = line.charAt(lastNonWS); if (!Character.isWhitespace(ch)) { if (ch == '\\') { done = false; } break; } | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
query.append(line, 0, count+1); if (line[count-1] == '\\') | if (!done) | public void generateODBCQueries(InputStream is) throws IOException { // JDBC query that we read from metadata.properties. StringBuffer query = new StringBuffer(); // We assume no single line/query is greater than 1K in // length, and we'll fail if this isn't the case. The // limit of 1K was just picked arbitrar... |
InputStream blobInput = new ByteArrayInputStream(blobData, 0, blobData.length); | public static Blob getSampleBlob(Connection con) throws SQLException { PreparedStatement pStmt = con.prepareStatement("update BLOBCLOB set BLOBDATA = ? where ID = ?"); try { blobInput.reset(); } catch (IOException ioe) { fail("Failed to reset blob input... | |
Reader clobInput = new StringReader(clobData); | public static Clob getSampleClob(Connection con) throws SQLException { PreparedStatement pStmt = con.prepareStatement("update BLOBCLOB set CLOBDATA = ? where ID = ?"); try { clobInput.reset(); } catch (IOException ioe) { fail("Failed to reset clob input... | |
public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { getCallableStatement().setAsciiStream(parameterIndex,x,length); | public final void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { getCallableStatement().setAsciiStream(parameterIndex, x); | public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { getCallableStatement().setAsciiStream(parameterIndex,x,length); } |
public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { getCallableStatement().setBinaryStream(parameterIndex,x,length); | public final void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { getCallableStatement().setBinaryStream(parameterIndex, x); | public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { getCallableStatement().setBinaryStream(parameterIndex,x,length); } |
public final void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { getCallableStatement().setCharacterStream(parameterIndex,x,length); | public final void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { getCallableStatement().setCharacterStream(parameterIndex, reader); | public final void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { getCallableStatement().setCharacterStream(parameterIndex,x,length); } |
public void setNCharacterStream(String parameterName,Reader value,long length) throws SQLException{ getCallableStatement().setNCharacterStream(parameterName,value,length); | public final void setNCharacterStream(String parameterName, Reader value) throws SQLException { getCallableStatement().setNCharacterStream(parameterName, value); | public void setNCharacterStream(String parameterName,Reader value,long length) throws SQLException{ getCallableStatement().setNCharacterStream(parameterName,value,length); } |
new MessageId(SQLState.BLOB_NULL_PATTERN)); | new MessageId(SQLState.BLOB_NULL_PATTERN_OR_SEARCH_STR)); | public long position(byte[] pattern, long start) throws SQLException { try { synchronized (agent_.connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "position(byte[], long)", pattern, start); } if ... |
new MessageId(SQLState.INVALID_BLOB_OFFSET), | new MessageId(SQLState.BLOB_INVALID_OFFSET), | public int setBytesX(long pos, byte[] bytes, int offset, int len) throws SqlException { int length = 0; /* Check if position is less than 0 and if true raise an exception */ if (pos <= 0L) { throw new SqlException(agent_.logWriter_, ... |
MessageId mid = new MessageId(SQLState.JDBC_METHOD_NOT_SUPPORTED_BY_SERVER); throw new SqlException(agent_.logWriter_, mid, method); | throw new SqlException(agent_.logWriter_, new MessageId(SQLState.JDBC_METHOD_NOT_SUPPORTED_BY_SERVER), method); | protected void checkServerJdbcVersionX(String method, int major, int minor) throws SqlException { if (serverJdbcMajorVersion < major || (serverJdbcMajorVersion == major && serverJdbcMinorVersion < minor)) { MessageId mid = new MessageId(SQLState.JDBC... |
"The required stored procedure is not installed on the server."); | new MessageId(SQLState.STORED_PROC_NOT_INSTALLED)); | private ResultSet executeCatalogQuery(PreparedStatement cs) throws SqlException { try { return cs.executeQueryX(); } catch (SqlException e) { if (e.getErrorCode() == -440) { SqlException newException = new SqlException(agent_.logWriter_, ... |
"The load module name for the stored procedure on the server is not found. "); | new MessageId(SQLState.STORED_PROC_LOAD_MODULE_NOT_FOUND)); | private ResultSet executeCatalogQuery(PreparedStatement cs) throws SqlException { try { return cs.executeQueryX(); } catch (SqlException e) { if (e.getErrorCode() == -440) { SqlException newException = new SqlException(agent_.logWriter_, ... |
databaseName_ = dataSource.getDatabaseName() + ";" + dataSource.getConnectionAttributes(); | if (dataSource.getConnectionAttributes() != null) { databaseName_ = dataSource.getDatabaseName() + ";" + dataSource.getConnectionAttributes(); } else { databaseName_ = dataSource.getDatabaseName(); } | protected void initConnection(org.apache.derby.client.am.LogWriter logWriter, String user, org.apache.derby.jdbc.ClientDataSource dataSource) throws SqlException { if (logWriter != null) { logWriter.traceConnectEntry(dataSource); ... |
version2 ? "java.sql.PreparedStatement" : "java.sql.ResultSet", Modifier.PUBLIC); | vtiType, Modifier.PUBLIC); | private void generateConstructor(ActivationClassBuilder acb, MethodBuilder mb, boolean reuseablePs) throws StandardException { // this sets up the method and the static field. // generates: // java.sql.ResultSet userExprFun { } MethodBuilder userExprFun = acb.newGeneratedFun( version2 ? "java.sql.P... |
userExprFun.upCast(vtiType); | private void generateConstructor(ActivationClassBuilder acb, MethodBuilder mb, boolean reuseablePs) throws StandardException { // this sets up the method and the static field. // generates: // java.sql.ResultSet userExprFun { } MethodBuilder userExprFun = acb.newGeneratedFun( version2 ? "java.sql.P... | |
if (currentXid != null) | if (xaRes.getCurrentXid () != null) | public void checkHoldCursors(int holdability) throws SQLException { if (holdability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) { if (currentXid != null) throw Util.generateCsSQLException(SQLState.CANNOT_HOLD_CURSOR_XA); } super.checkHoldCursors(holdability); } |
closeMethodArgument(acb, mb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { int erdNumber; if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnL... | |
ClassName.NoPutResultSet, 7); | ClassName.NoPutResultSet, 6); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { int erdNumber; if (SanityManager.DEBUG) SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); /* Get the next ResultSet #, so that we can number this ResultSetNode, its * ResultColumnL... |
if (dd.addRemovePermissionsDescriptor( grant, routinePermsDesc, grantee, tc)) | if (dd.addRemovePermissionsDescriptor( grant, routinePermsDesc, grantee, tc)) { privileges_revoked = true; | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { // Check that the current user has permission to grant the privileges. LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary... |
} addWarningIfPrivilegeNotRevoked(activation, grant, privileges_revoked, grantee); | public void executeGrantRevoke( Activation activation, boolean grant, List grantees) throws StandardException { // Check that the current user has permission to grant the privileges. LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary... | |
testEncoding = p.getProperty("derbyTesting.encoding"); | static Properties getSuiteProperties(String suiteName, boolean isTop) throws ClassNotFoundException, IOException { // Locate the suite's config file and get the properties // The file should be in the harness dir or user.dir String suiteProps = "suites" + '/' + suiteName + ".propertie... | |
String cmlTestEncoding = sp.getProperty("derbyTesting.encoding"); if (cmlTestEncoding != null) suiteProperties.put("derbyTesting.encoding", cmlTestEncoding); | private static void getSystemProperties() { // Get any properties specified on the command line // which may not have been specified in the suite prop file Properties sp = System.getProperties(); String searchCP = sp.getProperty("ij.searchClassPath"); if (searchCP != null) ... | |
public Date getDate( Calendar cal) | public NumberDataValue getDate(NumberDataValue result) throws StandardException | public Date getDate( Calendar cal) { if (encodedDate != 0) return new Date( getTimeInMillis( cal)); return null; } |
if (encodedDate != 0) return new Date( getTimeInMillis( cal)); return null; | if (SanityManager.DEBUG) { SanityManager.ASSERT(!isNull(), "getDate called on a null"); } return SQLDate.setSource(getDay(encodedDate), result); | public Date getDate( Calendar cal) { if (encodedDate != 0) return new Date( getTimeInMillis( cal)); return null; } |
Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); con = DriverManager.getConnection("jdbc:derby:wombat"); | Properties prop = new Properties(); prop.setProperty("databaseName", "wombat"); con = TestUtil.getDataSourceConnection(prop); | public static void main(String[] args) { Connection con; Statement stmt; try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); con = DriverManager.getConnection("jdbc:derby:wombat"); stmt... |
public void setDatabaseEncrypted() | public void setDatabaseEncrypted(boolean flushLog) throws StandardException | public void setDatabaseEncrypted() { databaseEncrypted = true; } |
if (flushLog) flushAll(); | public void setDatabaseEncrypted() { databaseEncrypted = true; } | |
generateParameterHolders(acb); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { //If the DML is on the temporary table, generate the code to mark temporary table as modified in the current UOW generateCodeForTemporaryTable(acb, mb); /* generate the parameters */ generateParameterValueSet... | |
public DeleteConstantAction( long conglomId, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, ExecRow emptyHeapRow, boolean deferred, UUID targetUUID, int lockMode, FKInfo[] fkInfo, TriggerInfo triggerInfo, Formatabl... | public DeleteConstantAction() { super(); } | public DeleteConstantAction( long conglomId, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, ExecRow emptyHeapRow, boolean deferred, UUID targetUUID, int l... |
public UpdatableVTIConstantAction( int statementType, boolean deferred, int[] changedColumnIds) { super(0, null, null, null, null, null, deferred , null, null, 0, null, null, (ExecRow)null, null, null, null, false ); this.statementType = statementType; this.changedColumnIds = changedColumnIds; } | public UpdatableVTIConstantAction() { super(); } | public UpdatableVTIConstantAction( int statementType, boolean deferred, int[] changedColumnIds) { super(0, null, null, null, null, null, deferred , null, null, 0, null, null, (ExecRow)nu... |
public UpdateStatisticsConstantAction(boolean forTable, String objectName, UUID tableUUID, UUID[] objectUUID, long[] conglomerateNumber, ExecIndexRow[] indexRow) { this.forTable = forTable; this.objectName = objectName; this.tableUUID = tableUUID; this.objectUUID = objectUUID; this.conglomerateNumber = conglomerateNum... | public UpdateStatisticsConstantAction() {}; | public UpdateStatisticsConstantAction(boolean forTable, String objectName, UUID tableUUID, UUID[] objectUUID, long[] conglomerateNumber, ExecIndexRow[] indexRow) { this.forTable = forTable; this.objectName = objectName; this.tableUUID = tableUUID; this.objec... |
url[i] = new URL(urlProtocol + jarLoc + File.separator + jarFiles[i]); | url[i] = new File(jarLoc + File.separator + jarFiles[i]).toURL(); | private URLClassLoader createClassLoader(String jarLoc) throws MalformedURLException { URL[] url = new URL[jarFiles.length + 1]; for(int i=0; i < jarFiles.length; i++) { url[i] = new URL(urlProtocol + jarLoc + File.separator + jarFiles[i]); } // Add derbyTesting.jar. Added from newer release url[jarF... |
url[jarFiles.length] = new URL(urlProtocol + newJarLoc + File.separator + testJar); | url[jarFiles.length] = new File(newJarLoc + File.separator + testJar).toURL(); | private URLClassLoader createClassLoader(String jarLoc) throws MalformedURLException { URL[] url = new URL[jarFiles.length + 1]; for(int i=0; i < jarFiles.length; i++) { url[i] = new URL(urlProtocol + jarLoc + File.separator + jarFiles[i]); } // Add derbyTesting.jar. Added from newer release url[jarF... |
conn = getConnectionUsingReflection(classLoader, prop); | conn = getConnectionUsingDataSource(classLoader, prop); | private Connection getConnection(URLClassLoader classLoader, String dbName, int phase) throws Exception{ Connection conn = null; Properties prop = new Properties(); prop.setProperty("databaseName", dbName); switch(phase) { case PH_CREATE: prop.setProperty("connectionAttributes", "create=true"); b... |
getConnectionUsingReflection(classLoader, prop); | getConnectionUsingDataSource(classLoader, prop); | private void shutdown(URLClassLoader classLoader, String dbName) throws Exception { Properties prop = new Properties(); prop.setProperty("databaseName", dbName); prop.setProperty("connectionAttributes", "shutdown=true"); try { getConnectionUsingReflection(classLoader, prop); } catch (SQLException... |
** A ? on the left gets its type from the right. There are six | ** A ? on the left gets its type from the right. There are eight | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
** LONG VARCHAR, BIT, BIT VARYING, and LONG BIT VARYING. If the ** right type is one of the bit types, set the parameter type to | ** LONG VARCHAR, CLOB, BIT, BIT VARYING, LONG BIT VARYING, and BLOB. ** If the right type is BLOB, set the parameter type to BLOB with max length. ** If the right type is one of the other bit types, set the parameter type to | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
** clear to me what effect it would have to change it. ** ** - Jeff | ** clear to me what effect it would have to change it. - Jeff | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
leftType = TypeId.getBuiltInTypeId(Types.VARBINARY); | if (rightOperand.getTypeId().isBlobTypeId()) leftType = TypeId.getBuiltInTypeId(Types.BLOB); else leftType = TypeId.getBuiltInTypeId(Types.VARBINARY); | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
leftType = TypeId.getBuiltInTypeId(Types.VARCHAR); | if (rightOperand.getTypeId().isClobTypeId()) leftType = TypeId.getBuiltInTypeId(Types.CLOB); else leftType = TypeId.getBuiltInTypeId(Types.VARCHAR); | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
** A ? on the right gets its type from the left. There are six | ** A ? on the right gets its type from the left. There are eight | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
** LONG VARCHAR, BIT, BIT VARYING, and LONG BIT VARYING. If the ** left type is one of the bit types, set the parameter type to ** BIT VARYING with maximum length. If the left type is anything ** else, set it to VARCHAR with maximum length. We count on the ** resolveConcatOperation method to catch an illegal type. | ** LONG VARCHAR, CLOB, BIT, BIT VARYING, LONG BIT VARYING, and BLOB. ** If the left type is BLOB, set the parameter type to BLOB with max length. ** If the left type is one of the other bit types, set the parameter type to ** BIT VARYING with maximum length. ** ** If the left type is CLOB, set parameter type to CLOB wi... | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
rightType = TypeId.getBuiltInTypeId(Types.VARBINARY); | if (leftOperand.getTypeId().isBlobTypeId()) rightType = TypeId.getBuiltInTypeId(Types.BLOB); else rightType = TypeId.getBuiltInTypeId(Types.VARBINARY); | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
rightType = TypeId.getBuiltInTypeId(Types.VARCHAR); | if (leftOperand.getTypeId().isClobTypeId()) rightType = TypeId.getBuiltInTypeId(Types.CLOB); else rightType = TypeId.getBuiltInTypeId(Types.VARCHAR); | public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException { // deal with binding operands leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, ... |
sb.append(containerId.getContainerId()); | sb.append(Long.toHexString(containerId.getContainerId())); | public final Object run() throws Exception { switch( actionCode) { case BOOT_ACTION: readOnly = storageFactory.isReadOnlyDatabase(); supportsRandomAccess = storageFactory.supportsRandomAccess(); return null; case GET_TEMP_DIRECTORY_ACTION: ... |
TestOfRepeatedStream.executeTestOfRepeatedStream(con); | public static void main(String[] args) { Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Test resultsetStream starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); st... | |
Cacheable cacheEntry = getPermissionsCache().findCached( perm); if( cacheEntry != null) getPermissionsCache().remove( cacheEntry); | removePermEntryInCache(perm); | public boolean addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { i... |
ExecIndexRow newKey; | private void dropColumnPermDescriptor( TransactionController tc, ExecIndexRow keyRow) throws StandardException { ExecRow curRow; PermissionsDescriptor perm; ExecIndexRow newKey; TabInfoImpl ti = getNonCoreTI(SYSCOLPERMS_CATALOG_NUM); SYSCOLPERMSRowFactory rf = (SYSCOLPERMSRowFactory) ti.getCatalogRowFac... | |
ExecIndexRow newKey; | private void dropTablePermDescriptor( TransactionController tc, ExecIndexRow keyRow) throws StandardException { ExecRow curRow; PermissionsDescriptor perm; ExecIndexRow newKey; TabInfoImpl ti = getNonCoreTI(SYSTABLEPERMS_CATALOG_NUM); SYSTABLEPERMSRowFactory rf = (SYSTABLEPERMSRowFactory) ti.getCatalogR... | |
rs.close(); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... | |
if (TestUtil.isEmbeddedFramework()) { | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... | |
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE"); | rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE"); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
System.out.println("FAIL!!! updateRow should have failed because resultset is not on a row"); | if (TestUtil.isEmbeddedFramework()) System.out.println("FAIL!!! In embedded mode, this updateRow should have failed because resultset is not on a row"); else System.out.println("PASS!!! In Network Server mode, this updateRow is a no-op because no updateXXX were issued before the updateRow"); | public static void main(String[] args) { System.out.println("Start testing delete and update using JDBC2.0 updateable resultset apis"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); conn = ij.startJBMS(); setup(true); System.out.println... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.