id
stringlengths 22
25
| commit_message
stringlengths 137
6.96k
| diffs
listlengths 0
63
|
|---|---|---|
derby-DERBY-6000-20b2fd9c
|
DERBY-6000: Add JDBC 4.2 java.sql.PreparedStatement.executeLargeUpdate() to embedded and client drivers.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1441088 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6000-47a8183b
|
DERBY-6000: Add JDBC 4.2 large max rows methods to Derby's embedded and client implementations of java.sql.Statement.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1440656 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" /** For use in debugging setLargeMaxRows() method added by JDBC 4.2 */",
" public static long fetchedRowBase = 0L;",
" "
],
"header": "@@ -28,6 +28,9 @@ import org.apache.derby.shared.common.sanity.SanityManager;",
"removed": []
},
{
"added": [
" long maxRows_ = 0L;"
],
"header": "@@ -124,7 +127,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int maxRows_ = 0;"
]
},
{
"added": [
" maxRows_ = 0L; // setMaxRows"
],
"header": "@@ -261,7 +264,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" maxRows_ = 0; // setMaxRows"
]
},
{
"added": [
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"getMaxRows\", maxRows_);",
" }",
" return (int) getLargeMaxRows();",
" }",
"",
" public long getLargeMaxRows() throws SQLException {",
" agent_.logWriter_.traceExit(this, \"getLargeMaxRows\", maxRows_);"
],
"header": "@@ -722,11 +725,18 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" agent_.logWriter_.traceExit(this, \"getMaxRows\", maxRows_);"
]
},
{
"added": [
" synchronized (connection_) {",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"setMaxRows\", maxRows);",
" }",
" setLargeMaxRows( maxRows );",
" }",
" }",
"",
" // Added by JDBC 4.2",
" public void setLargeMaxRows(long maxRows) throws SQLException {",
" agent_.logWriter_.traceEntry(this, \"setLargeMaxRows\", maxRows);"
],
"header": "@@ -737,11 +747,21 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" agent_.logWriter_.traceEntry(this, \"setMaxRows\", maxRows);"
]
},
{
"added": [
" resultSet.cursor_.rowsRead_ = fetchedRowBase;"
],
"header": "@@ -1644,7 +1664,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" resultSet.cursor_.rowsRead_ = 0;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/Activation.java",
"hunks": [
{
"added": [
"\tpublic void setMaxRows(long maxRows);"
],
"header": "@@ -521,7 +521,7 @@ public interface Activation extends Dependent",
"removed": [
"\tpublic void setMaxRows(int maxRows);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [
" /** For use in debugging setLargeMaxRows() method added by JDBC 4.2 */",
" public static long fetchedRowBase = 0L;",
" "
],
"header": "@@ -95,6 +95,9 @@ import org.apache.derby.iapi.util.InterruptStatus;",
"removed": []
},
{
"added": [
" private long maxRows;"
],
"header": "@@ -150,7 +153,7 @@ public class EmbedResultSet extends ConnectionChild",
"removed": [
" private int maxRows;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java",
"hunks": [
{
"added": [
"\tlong maxRows;"
],
"header": "@@ -109,7 +109,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\tint maxRows;"
]
},
{
"added": [
"\t{",
" return (int) getLargeMaxRows();",
"\t}",
"",
" /**",
" * JDBC 4.2",
" *",
" * The maxRows limit is the maximum number of rows that a",
" * ResultSet can contain. If the limit is exceeded, the excess",
" * rows are silently dropped. For use with",
" * statements which may touch more than Integer.MAX_VALUE rows.",
" *",
" * @return the current max row limit; zero means unlimited",
"\t * @exception SQLException thrown on failure.",
" */",
"\tpublic long getLargeMaxRows() throws SQLException "
],
"header": "@@ -455,6 +455,22 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java",
"hunks": [
{
"added": [
"\tpublic void setMaxRows(long maxRows)"
],
"header": "@@ -568,7 +568,7 @@ final public class GenericActivationHolder implements Activation",
"removed": [
"\tpublic void setMaxRows(int maxRows)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java",
"hunks": [
{
"added": [
"\tprivate long maxRows = -1L;"
],
"header": "@@ -130,7 +130,7 @@ public abstract class BaseActivation implements CursorActivation, GeneratedByteC",
"removed": [
"\tprivate int maxRows = -1;"
]
},
{
"added": [
"\tpublic void setMaxRows(long maxRows)"
],
"header": "@@ -1134,7 +1134,7 @@ public abstract class BaseActivation implements CursorActivation, GeneratedByteC",
"removed": [
"\tpublic void setMaxRows(int maxRows)"
]
}
]
}
] |
derby-DERBY-6000-7cfb7e6f
|
DERBY-6000: Add new PreparedStatement.setObject() overloads introduced by JDBC 4.2.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1443697 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.ClientPooledConnection;",
"import org.apache.derby.client.am.Agent;",
"import org.apache.derby.client.am.LogicalPreparedStatement;",
"import org.apache.derby.client.am.LogicalPreparedStatement42;",
"import org.apache.derby.client.am.PreparedStatement;",
"import org.apache.derby.client.am.PreparedStatement42;",
"import org.apache.derby.client.am.Section;",
"import org.apache.derby.client.am.StatementCacheInteractor;",
"import org.apache.derby.client.am.SqlException;",
"import org.apache.derby.client.am.stmtcache.StatementKey;",
""
],
"header": "@@ -23,6 +23,17 @@ package org.apache.derby.client.net;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.reference.JDBC40Translation;",
"import org.apache.derby.iapi.reference.SQLState;",
"import java.sql.Types;"
],
"header": "@@ -22,9 +22,12 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java",
"hunks": [
{
"added": [],
"header": "@@ -38,7 +38,6 @@ import org.apache.derby.iapi.types.ReaderToUTF8Stream;",
"removed": [
"import org.apache.derby.iapi.reference.JDBC40Translation;"
]
}
]
}
] |
derby-DERBY-6000-7fb99569
|
DERBY-6000: Add new JDBC 4.2 Statement.executeLargeUpdate() methods to the embeddeded JDBC 3.0 implementation.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1438600 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java",
"hunks": [
{
"added": [
"\tlong updateCount = -1;"
],
"header": "@@ -75,7 +75,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\tint updateCount = -1;"
]
},
{
"added": [
"\t{",
"\t\treturn (int) executeLargeUpdate( sql );",
"\t}",
"",
" /**",
" * JDBC 4.2",
" *",
" * Execute a SQL INSERT, UPDATE or DELETE statement. For use with",
" * statements which may touch more than Integer.MAX_VALUE rows.",
" */",
"\tpublic long executeLargeUpdate(String sql) throws SQLException"
],
"header": "@@ -175,6 +175,17 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
},
{
"added": [
"\t\treturn (int) executeLargeUpdate( sql, autoGeneratedKeys );",
"\t}",
"",
" /**",
" * JDBC 4.2",
" *",
" * Execute the given SQL statement and signals the driver with the given flag",
" * about whether the auto-generated keys produced by this Statement object",
" * should be made available for retrieval. For use with",
" * statements which may touch more than Integer.MAX_VALUE rows.",
" */",
"\tpublic long executeLargeUpdate( String sql, int autoGeneratedKeys ) throws SQLException",
"\t{",
"\t\texecute( sql, false, true, autoGeneratedKeys, null, null );"
],
"header": "@@ -198,7 +209,20 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\texecute(sql, false, true, autoGeneratedKeys, null, null);"
]
},
{
"added": [
"\t{",
"\t\treturn (int) executeLargeUpdate( sql, columnIndexes );",
"\t}",
"",
" /**",
" * JDBC 4.2",
" *",
" * Executes the given SQL statement and signals the driver that the",
" * auto-generated keys indicated in the given array should be made",
" * available for retrieval. The driver will ignore the array if the SQL",
" * statement is not an INSERT statement. For use with",
" * statements which may touch more than Integer.MAX_VALUE rows.",
" */",
"\tpublic long executeLargeUpdate( String sql, int[] columnIndexes ) throws SQLException"
],
"header": "@@ -219,6 +243,20 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
},
{
"added": [
"\t{",
"\t\treturn (int) executeLargeUpdate( sql, columnNames );",
"\t}",
"",
" /**",
" * JDBC 4.2",
" *",
" * Executes the given SQL statement and signals the driver that the",
" * auto-generated keys indicated in the given array should be made",
" * available for retrieval. The driver will ignore the array if the SQL",
" * statement is not an INSERT statement. For use with",
" * statements which may touch more than Integer.MAX_VALUE rows.",
" */",
"\tpublic long executeLargeUpdate(String sql, String[] columnNames) throws SQLException"
],
"header": "@@ -246,6 +284,20 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
},
{
"added": [
"\t\treturn (int) updateCount;"
],
"header": "@@ -745,7 +797,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\treturn updateCount;"
]
},
{
"added": [
"\t\t\tupdateCount = -1L;"
],
"header": "@@ -1109,7 +1161,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\t\tupdateCount = -1;"
]
},
{
"added": [
"\t\t\t\t\tupdateCount = -1L;"
],
"header": "@@ -1264,7 +1316,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\t\t\t\tupdateCount = -1;"
]
},
{
"added": [
"\t\tupdateCount = -1L; // reset field"
],
"header": "@@ -1508,7 +1560,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\tupdateCount = -1; // reset field"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java",
"hunks": [
{
"added": [
"\tpublic long rowCount;"
],
"header": "@@ -55,7 +55,7 @@ abstract class DMLWriteResultSet extends NoRowsResultSetImpl",
"removed": [
"\tpublic int rowCount;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java",
"hunks": [
{
"added": [
"\t\trowCount = 0L;"
],
"header": "@@ -422,7 +422,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\trowCount = 0;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/RealResultSetStatisticsFactory.java",
"hunks": [
{
"added": [
" (int) irs.rowCount,"
],
"header": "@@ -243,7 +243,7 @@ public class RealResultSetStatisticsFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tirs.rowCount,"
]
},
{
"added": [
" (int) iVTIrs.rowCount,"
],
"header": "@@ -261,7 +261,7 @@ public class RealResultSetStatisticsFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tiVTIrs.rowCount,"
]
},
{
"added": [
" (int) urs.rowCount,"
],
"header": "@@ -274,7 +274,7 @@ public class RealResultSetStatisticsFactory",
"removed": [
"\t\t\t\t\t\t\t\t\turs.rowCount,"
]
},
{
"added": [
" (int) dcrs.rowCount,"
],
"header": "@@ -310,7 +310,7 @@ public class RealResultSetStatisticsFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tdcrs.rowCount,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\t(int) drs.rowCount,"
],
"header": "@@ -327,7 +327,7 @@ public class RealResultSetStatisticsFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tdrs.rowCount,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java",
"hunks": [
{
"added": [
"\t\trowCount = 0L;"
],
"header": "@@ -300,7 +300,7 @@ class UpdateResultSet extends DMLWriteResultSet",
"removed": [
"\t\trowCount = 0;"
]
}
]
}
] |
derby-DERBY-6000-90645152
|
DERBY-6000: Fix UnsupportedVetter failures when 10.9 jars run on Java 8.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464103 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
" private static final boolean HAVE_SQLTYPE;",
" static {",
" boolean ok = false;",
" try {",
" Class.forName(\"java.sql.SQLType\");",
" ok = true;",
" } catch (Throwable t) {",
" }",
" HAVE_SQLTYPE = ok;",
" }",
" "
],
"header": "@@ -139,6 +139,17 @@ public class JDBC {",
"removed": []
},
{
"added": [
" /**",
" * Return true if the virtual machine environment supports JDBC 4.2 or",
" * later.",
" */",
" public static boolean vmSupportsJDBC42() {",
" return vmSupportsJDBC41() && HAVE_SQLTYPE;",
" }",
""
],
"header": "@@ -161,6 +172,14 @@ public class JDBC {",
"removed": []
}
]
}
] |
derby-DERBY-6000-9206d5b2
|
DERBY-6000: Add new CallableStatement.registerOutParameter() overloads introduced by JDBC 4.2.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1444960 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.CallableStatement;",
"import org.apache.derby.client.am.CallableStatement42;",
"import org.apache.derby.client.am.LogicalCallableStatement;",
"import org.apache.derby.client.am.LogicalCallableStatement42;"
],
"header": "@@ -25,7 +25,11 @@ import org.apache.derby.client.am.SqlException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java",
"hunks": [
{
"added": [
"\t * Derby ignores the typeName argument because UDTs don't need it."
],
"header": "@@ -210,7 +210,7 @@ public class EmbedCallableStatement extends EmbedPreparedStatement",
"removed": [
"\t * Registers the designated output parameter"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/Driver42.java",
"hunks": [
{
"added": [
"import java.sql.CallableStatement;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedCallableStatement42;"
],
"header": "@@ -32,6 +33,7 @@ import org.apache.derby.iapi.sql.ResultSet;",
"removed": []
}
]
}
] |
derby-DERBY-6000-b54918e7
|
DERBY-6000: Add support for JDBC 4.2 changes to BatchUpdateException.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1442195 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Agent.java",
"hunks": [
{
"added": [
"import org.apache.derby.jdbc.ClientDriver;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
" public final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions)",
" throws java.sql.BatchUpdateException {"
],
"header": "@@ -252,7 +253,8 @@ public abstract class Agent {",
"removed": [
" public final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions) throws BatchUpdateException {"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/PreparedStatement.java",
"hunks": [
{
"added": [
" public int[] executeBatch() throws SQLException {"
],
"header": "@@ -1647,7 +1647,7 @@ public class PreparedStatement extends Statement",
"removed": [
" public int[] executeBatch() throws SQLException, BatchUpdateException {"
]
},
{
"added": [
" throws SqlException, SQLException {"
],
"header": "@@ -2192,7 +2192,7 @@ public class PreparedStatement extends Statement",
"removed": [
" throws SqlException, SQLException, BatchUpdateException {"
]
},
{
"added": [
" throws SqlException, java.sql.BatchUpdateException {"
],
"header": "@@ -2202,7 +2202,7 @@ public class PreparedStatement extends Statement",
"removed": [
" throws SqlException, BatchUpdateException {"
]
},
{
"added": [
" throw ClientDriver.getFactory().newBatchUpdateException(agent_.logWriter_, ",
" new Object[] { new Integer( 65534 ) }, updateCounts, null );"
],
"header": "@@ -2223,9 +2223,9 @@ public class PreparedStatement extends Statement",
"removed": [
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, ",
" 65534, updateCounts);"
]
},
{
"added": [
" throw ClientDriver.getFactory().newBatchUpdateException(agent_.logWriter_, ",
" new ClientMessageId(SQLState.CANNOT_BATCH_QUERIES), (Object [])null, updateCounts, null);",
" throw ClientDriver.getFactory().newBatchUpdateException(agent_.logWriter_, ",
" (Object [])null, updateCounts, null);"
],
"header": "@@ -2235,13 +2235,13 @@ public class PreparedStatement extends Statement",
"removed": [
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, ",
" new ClientMessageId(SQLState.CANNOT_BATCH_QUERIES), updateCounts);",
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, ",
" updateCounts);"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" public int[] executeBatch() throws SQLException {"
],
"header": "@@ -1175,7 +1175,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" public int[] executeBatch() throws SQLException, BatchUpdateException {"
]
},
{
"added": [
" public long[] executeLargeBatch() throws SQLException {"
],
"header": "@@ -1196,7 +1196,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" public long[] executeLargeBatch() throws SQLException, BatchUpdateException {"
]
},
{
"added": [
" private long[] executeBatchX() throws SqlException, java.sql.BatchUpdateException {"
],
"header": "@@ -1216,7 +1216,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" private long[] executeBatchX() throws SqlException, BatchUpdateException {"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.ClientMessageId;"
],
"header": "@@ -27,6 +27,7 @@ import org.apache.derby.client.ClientXAConnection;",
"removed": []
},
{
"added": [
"import org.apache.derby.client.am.Utils;",
"import org.apache.derby.shared.common.i18n.MessageUtil;",
"import org.apache.derby.shared.common.error.ExceptionUtil;"
],
"header": "@@ -43,6 +44,9 @@ import org.apache.derby.client.am.stmtcache.StatementKey;",
"removed": []
},
{
"added": [
" /** ",
" * The message utility instance we use to find messages",
" * It's primed with the name of the client message bundle so that",
" * it knows to look there if the message isn't found in the",
" * shared message bundle.",
" */",
" private static final MessageUtil msgutil_ =",
" SqlException.getMessageUtil();",
""
],
"header": "@@ -52,6 +56,15 @@ import org.apache.derby.client.am.StatementCacheInteractor;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDriver.java",
"hunks": [
{
"added": [
" if (Configuration.supportsJDBC42()) {",
" factoryObject = createJDBC42FactoryImpl();",
" } else if (Configuration.supportsJDBC40()) {"
],
"header": "@@ -399,7 +399,9 @@ public class ClientDriver implements java.sql.Driver {",
"removed": [
" if (Configuration.supportsJDBC40()) {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/Util.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.info.JVMInfo;"
],
"header": "@@ -24,6 +24,7 @@ package org.apache.derby.impl.jdbc;",
"removed": []
},
{
"added": [
"import java.lang.reflect.Constructor;",
"import java.sql.BatchUpdateException;"
],
"header": "@@ -39,6 +40,8 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": []
},
{
"added": [
" logError( \"\\nERROR \" + se.getSQLState() + \": \" + se.getMessage() + \"\\n\", se );",
" }",
" private static void logError( String errorMessage, Throwable t )",
" {",
" \t\tt.printStackTrace();",
" \terrorStringBuilder.append( errorMessage );",
" \terrorStringBuilder.stackTrace( t );"
],
"header": "@@ -114,18 +117,21 @@ public abstract class Util {",
"removed": [
" \t\tse.printStackTrace();",
" \terrorStringBuilder.append(\"\\nERROR \" + se.getSQLState() + \": \" + se.getMessage() + \"\\n\");",
" \terrorStringBuilder.stackTrace(se);",
""
]
}
]
}
] |
derby-DERBY-6000-c1ecc42c
|
DERBY-6000: Exclude deliberately unimplemented CallableStatement.registerOutParameter() overloads from the checks performed by the UnsupportedVetter test on Java 8.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1445235 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6000-ca48ab49
|
DERBY-6000: Fix javadoc build on Java 8.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1445393 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6000-cd1db933
|
DERBY-6000: Fix bug on contruction of BatchUpdateExceptions.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1443086 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.SqlException;",
""
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/Util.java",
"hunks": [
{
"added": [
" ( String message, String sqlState, int errorCode, long[] updateCounts, Throwable cause )"
],
"header": "@@ -342,7 +342,7 @@ public abstract class Util {",
"removed": [
" ( String message, String sqlState, int errorCode, long[] updateCounts )"
]
},
{
"added": [
" ( new Object[] { message, sqlState, new Integer( errorCode ), updateCounts, cause } );"
],
"header": "@@ -353,7 +353,7 @@ public abstract class Util {",
"removed": [
" ( new Object[] { message, sqlState, new Integer( errorCode ), updateCounts, (Throwable) null } );"
]
},
{
"added": [
" BatchUpdateException batch = new BatchUpdateException",
" ",
" if ( cause instanceof SQLException ) { batch.setNextException( (SQLException) cause ); }",
" batch.initCause( cause );",
"",
" return batch;"
],
"header": "@@ -364,8 +364,13 @@ public abstract class Util {",
"removed": [
" return new BatchUpdateException"
]
}
]
}
] |
derby-DERBY-6000-f26c60c7
|
DERBY-6000: Add the JDBC 4.2 large update methods to the client implementation of Statement.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1439883 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Agent.java",
"hunks": [
{
"added": [
" public final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions) throws BatchUpdateException {"
],
"header": "@@ -252,7 +252,7 @@ public abstract class Agent {",
"removed": [
" public final void endBatchedReadChain(int[] updateCounts, SqlException accumulatedExceptions) throws BatchUpdateException {"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/PreparedStatement.java",
"hunks": [
{
"added": [
" int updateValue = (int) executeUpdateX();"
],
"header": "@@ -399,7 +399,7 @@ public class PreparedStatement extends Statement",
"removed": [
" int updateValue = executeUpdateX();"
]
},
{
"added": [
" private long executeUpdateX() throws SqlException {"
],
"header": "@@ -412,7 +412,7 @@ public class PreparedStatement extends Statement",
"removed": [
" private int executeUpdateX() throws SqlException {"
]
},
{
"added": [
" long[] updateCounts = null;",
" return Utils.squashLongs( updateCounts );"
],
"header": "@@ -1654,13 +1654,13 @@ public class PreparedStatement extends Statement",
"removed": [
" int[] updateCounts = null;",
" return updateCounts;"
]
},
{
"added": [
" public long[] executeBatchX(boolean supportsQueryBatchRequest) "
],
"header": "@@ -2191,7 +2191,7 @@ public class PreparedStatement extends Statement",
"removed": [
" public int[] executeBatchX(boolean supportsQueryBatchRequest) "
]
},
{
"added": [
" private long[] executeBatchRequestX(boolean supportsQueryBatchRequest)",
" long[] updateCounts = new long[batchSize];"
],
"header": "@@ -2201,11 +2201,11 @@ public class PreparedStatement extends Statement",
"removed": [
" private int[] executeBatchRequestX(boolean supportsQueryBatchRequest)",
" int[] updateCounts = new int[batchSize];"
]
},
{
"added": [
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, "
],
"header": "@@ -2223,7 +2223,7 @@ public class PreparedStatement extends Statement",
"removed": [
" throw new BatchUpdateException(agent_.logWriter_, "
]
},
{
"added": [
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, ",
" throw BatchUpdateException.newBatchUpdateException(agent_.logWriter_, "
],
"header": "@@ -2235,11 +2235,11 @@ public class PreparedStatement extends Statement",
"removed": [
" throw new BatchUpdateException(agent_.logWriter_, ",
" throw new BatchUpdateException(agent_.logWriter_, "
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Sqlca.java",
"hunks": [
{
"added": [
"",
" // Indexes into sqlErrd_",
" public static final int HIGH_ORDER_ROW_COUNT = 0;",
" public static final int LOW_ORDER_ROW_COUNT = 1;",
" public static final int LOW_ORDER_UPDATE_COUNT = 2;",
" public static final int HIGH_ORDER_UPDATE_COUNT = 3;",
" public static final int SQL_ERR_LENGTH = 6;"
],
"header": "@@ -27,6 +27,13 @@ import org.apache.derby.shared.common.error.ExceptionSeverity;",
"removed": []
},
{
"added": [
" sqlErrd_ = new int[ SQL_ERR_LENGTH ]; // create an int array."
],
"header": "@@ -215,7 +222,7 @@ public abstract class Sqlca {",
"removed": [
" sqlErrd_ = new int[6]; // create an int array."
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" long updateCount_ = -1L;"
],
"header": "@@ -41,7 +41,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int updateCount_ = -1;"
]
},
{
"added": [
" updateCount_ = -1L;"
],
"header": "@@ -232,7 +232,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" updateCount_ = -1;"
]
},
{
"added": [
" int updateValue = (int) executeUpdateX(sql);"
],
"header": "@@ -482,7 +482,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int updateValue = executeUpdateX(sql);"
]
},
{
"added": [
" // Added by JDBC 4.2",
" public long executeLargeUpdate(String sql) throws SQLException {",
" try",
" {",
" synchronized (connection_) {",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"executeUpdate\", sql);",
" }",
" long updateValue = executeUpdateX(sql);",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"executeUpdate\", updateValue);",
" }",
" return updateValue;",
" }",
" }",
" catch ( SqlException se )",
" {",
" throw se.getSQLException();",
" }",
" }",
"",
" private long executeUpdateX(String sql) throws SqlException {"
],
"header": "@@ -495,7 +495,28 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" private int executeUpdateX(String sql) throws SqlException {"
]
},
{
"added": [
" return (int) updateCount_;"
],
"header": "@@ -937,7 +958,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" return updateCount_;"
]
},
{
"added": [
" // Added by JDBC 4.2",
" public long getLargeUpdateCount() throws SQLException {",
" try",
" {",
" synchronized (connection_) {",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"getUpdateCount\");",
" }",
" checkForClosedStatement(); // Per jdbc spec (see java.sql.Statement.close() javadoc)",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"getUpdateCount\", updateCount_);",
" }",
" return updateCount_;",
" }",
" }",
" catch ( SqlException se )",
" {",
" throw se.getSQLException();",
" }",
" }",
" "
],
"header": "@@ -946,6 +967,27 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": []
},
{
"added": [
" long[] updateCounts = executeBatchX();",
" return Utils.squashLongs( updateCounts );"
],
"header": "@@ -1120,11 +1162,11 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int[] updateCounts = executeBatchX();",
" return updateCounts;"
]
},
{
"added": [
" private long[] executeBatchX() throws SqlException, BatchUpdateException {",
" long[] updateCounts = new long[batch_.size()];"
],
"header": "@@ -1133,14 +1175,14 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" private int[] executeBatchX() throws SqlException, BatchUpdateException {",
" int[] updateCounts = new int[batch_.size()];"
]
},
{
"added": [
" updateCount_ = -1L;"
],
"header": "@@ -1186,7 +1228,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" updateCount_ = -1;"
]
},
{
"added": [
" int updateValue = (int) executeUpdateX(sql);",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"executeUpdate\", updateValue);",
" }",
" return updateValue;",
" }",
" }",
" catch ( SqlException se )",
" {",
" throw se.getSQLException();",
" }",
" }",
"",
" // Added by JDBC 4.2",
" public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException {",
" try",
" {",
" synchronized (connection_) {",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"executeUpdate\", sql, autoGeneratedKeys);",
" }",
" autoGeneratedKeys_ = autoGeneratedKeys;",
" long updateValue = executeUpdateX(sql);"
],
"header": "@@ -1247,7 +1289,29 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int updateValue = executeUpdateX(sql);"
]
},
{
"added": [
" int updateValue = (int) executeUpdateX(sql);",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"executeUpdate\", updateValue);",
" }",
" return updateValue;",
" }",
" }",
" catch ( SqlException se )",
" {",
" throw se.getSQLException();",
" }",
" }",
"",
" // Added by JDBC 4.2",
" public long executeLargeUpdate(String sql, int columnIndexes[]) throws SQLException {",
" try",
" {",
" synchronized (connection_) { ",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"executeUpdate\", sql, columnIndexes);",
" }",
" if (columnIndexes != null && columnIndexes.length > 0)",
" autoGeneratedKeys_ = Statement.RETURN_GENERATED_KEYS;",
" generatedKeysColumnIndexes_ = columnIndexes;",
" long updateValue = executeUpdateX(sql);"
],
"header": "@@ -1270,7 +1334,31 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int updateValue = executeUpdateX(sql);"
]
},
{
"added": [
" int updateValue = (int) executeUpdateX(sql);",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceExit(this, \"executeUpdate\", updateValue);",
" }",
" return updateValue;",
" }",
" }",
" catch ( SqlException se )",
" {",
" throw se.getSQLException();",
" }",
" }",
"",
" // Added by JDBC 4.2",
" public long executeLargeUpdate(String sql, String columnNames[]) throws SQLException {",
" try",
" {",
" synchronized (connection_) {",
" if (agent_.loggingEnabled()) {",
" agent_.logWriter_.traceEntry(this, \"executeUpdate\", sql, columnNames);",
" }",
" if (columnNames != null && columnNames.length > 0)",
" autoGeneratedKeys_ = Statement.RETURN_GENERATED_KEYS;",
" generatedKeysColumnNames_ = columnNames;",
" long updateValue = executeUpdateX(sql);"
],
"header": "@@ -1293,7 +1381,31 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" int updateValue = executeUpdateX(sql);"
]
},
{
"added": [
" updateCount_ = -1L;"
],
"header": "@@ -1612,7 +1724,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" updateCount_ = -1;"
]
},
{
"added": [
" public void setUpdateCount(long updateCount) {"
],
"header": "@@ -1628,7 +1740,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" public void setUpdateCount(int updateCount) {"
]
},
{
"added": [
" updateCount_ = 0L;",
" updateCount_ = -1L;"
],
"header": "@@ -1991,9 +2103,9 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" updateCount_ = 0;",
" updateCount_ = -1;"
]
},
{
"added": [
" if (executeType == executeUpdateMethod__ && updateCount_ < 0L) {",
" updateCount_ = 0L;",
" void flowExecuteBatch(long[] updateCounts) throws SqlException, BatchUpdateException {"
],
"header": "@@ -2191,12 +2303,12 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" if (executeType == executeUpdateMethod__ && updateCount_ < 0) {",
" updateCount_ = 0;",
" void flowExecuteBatch(int[] updateCounts) throws SqlException, BatchUpdateException {"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Utils.java",
"hunks": [
{
"added": [
" static public long getUpdateCountFromSqlcard(Sqlca sqlca) {"
],
"header": "@@ -258,7 +258,7 @@ public final class Utils {",
"removed": [
" static public int getUpdateCountFromSqlcard(Sqlca sqlca) {"
]
}
]
},
{
"file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.EngineStatement;"
],
"header": "@@ -53,6 +53,7 @@ import org.apache.derby.iapi.error.ExceptionSeverity;",
"removed": []
},
{
"added": [
" private static final byte[] errD5_D6 = { 0, 0, 0, 0, 0, 0, 0, 0 }; // 8x0 "
],
"header": "@@ -186,7 +187,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" private static final byte[] errD4_D6 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // 12x0 "
]
},
{
"added": [
" long updateCount = parseEXCSQLIMM();"
],
"header": "@@ -755,7 +756,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" int updateCount = parseEXCSQLIMM();"
]
},
{
"added": [
" EnginePreparedStatement ps = stmt.getPreparedStatement();"
],
"header": "@@ -4387,7 +4388,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" PreparedStatement ps = stmt.getPreparedStatement();"
]
},
{
"added": [
" long updateCount = ps.getLargeUpdateCount();"
],
"header": "@@ -4417,7 +4418,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" int updateCount = ps.getUpdateCount();"
]
},
{
"added": [
" EnginePreparedStatement ps = stmt.getPreparedStatement();"
],
"header": "@@ -4640,7 +4641,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" PreparedStatement ps = stmt.getPreparedStatement();"
]
},
{
"added": [
" ps = (EnginePreparedStatement) cs;"
],
"header": "@@ -4728,7 +4729,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" ps = cs;"
]
},
{
"added": [
" private long parseEXCSQLIMM() throws DRDAProtocolException,SQLException"
],
"header": "@@ -5348,7 +5349,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" private int parseEXCSQLIMM() throws DRDAProtocolException,SQLException"
]
},
{
"added": [
" EngineStatement statement = drdaStmt.getStatement();",
" long updCount = statement.executeLargeUpdate(sqlStmt);"
],
"header": "@@ -5383,13 +5384,13 @@ class DRDAConnThread extends Thread {",
"removed": [
" Statement statement = drdaStmt.getStatement();",
" int updCount = statement.executeUpdate(sqlStmt);"
]
},
{
"added": [
" private void writeSQLCARDs(SQLException e, long updateCount)",
" private void writeSQLCARDs(SQLException e, long updateCount, boolean sendSQLERRRM)"
],
"header": "@@ -6057,13 +6058,13 @@ class DRDAConnThread extends Thread {",
"removed": [
" private void writeSQLCARDs(SQLException e, int updateCount)",
" private void writeSQLCARDs(SQLException e, int updateCount, boolean sendSQLERRRM)"
]
},
{
"added": [
" long updateCount, long rowCount ) throws DRDAProtocolException"
],
"header": "@@ -6145,7 +6146,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" int updateCount, long rowCount ) throws DRDAProtocolException"
]
},
{
"added": [
" private void writeSQLCAGRP(SQLException e, long updateCount, long rowCount)"
],
"header": "@@ -6285,7 +6286,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" private void writeSQLCAGRP(SQLException e, int updateCount, long rowCount)"
]
},
{
"added": [
" long updateCount, long rowCount) throws DRDAProtocolException"
],
"header": "@@ -6360,7 +6361,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" int updateCount, long rowCount) throws DRDAProtocolException"
]
},
{
"added": [
" private void writeSQLCAXGRP(long updateCount, long rowCount, String sqlerrmc,"
],
"header": "@@ -6601,7 +6602,7 @@ class DRDAConnThread extends Thread {",
"removed": [
" private void writeSQLCAXGRP(int updateCount, long rowCount, String sqlerrmc,"
]
},
{
"added": [
" private void writeSQLCAERRWARN(long updateCount, long rowCount) ",
" // SQL ERRD1 = Sqlca.HIGH_ORDER_ROW_COUNT",
" writer.writeInt((int)((rowCount>>>32)));",
" // SQL ERRD2 = Sqlca.LOW_ORDER_ROW_COUNT",
" // SQL ERRD3 = Sqlca.LOW_ORDER_UPDATE_COUNT",
" writer.writeInt( (int)(updateCount & 0x0000000ffffffffL) );",
" // SQL ERRD4 = Sqlca.HIGH_ORDER_UPDATE_COUNT",
" writer.writeInt( (int)(updateCount>>>32) );",
" // SQL ERRD5 - D6 (8 bytes)",
" writer.writeBytes(errD5_D6); // byte[] constant"
],
"header": "@@ -6628,15 +6629,18 @@ class DRDAConnThread extends Thread {",
"removed": [
" private void writeSQLCAERRWARN(int updateCount, long rowCount) ",
" // SQL ERRD1 - ERRD2 - row Count",
" writer.writeInt((int)((rowCount>>>32))); ",
" // SQL ERRD3 - updateCount",
" writer.writeInt(updateCount);",
" // SQL ERRD4 - D6 (12 bytes)",
" writer.writeBytes(errD4_D6); // byte[] constant"
]
}
]
},
{
"file": "java/drda/org/apache/derby/impl/drda/DRDAStatement.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.EngineStatement;"
],
"header": "@@ -35,6 +35,7 @@ import java.sql.SQLException;",
"removed": []
},
{
"added": [
" protected EnginePreparedStatement ps; // Prepared statement"
],
"header": "@@ -75,7 +76,7 @@ class DRDAStatement",
"removed": [
" protected PreparedStatement ps; // Prepared statement"
]
},
{
"added": [
" private EngineStatement stmt; // SQL statement"
],
"header": "@@ -86,7 +87,7 @@ class DRDAStatement",
"removed": [
" private Statement stmt; // SQL statement"
]
},
{
"added": [
" stmt = (EngineStatement) conn.createStatement();"
],
"header": "@@ -339,7 +340,7 @@ class DRDAStatement",
"removed": [
" stmt = conn.createStatement();"
]
},
{
"added": [
" protected EngineStatement getStatement() "
],
"header": "@@ -350,7 +351,7 @@ class DRDAStatement",
"removed": [
" protected Statement getStatement() "
]
},
{
"added": [
" ps = (EnginePreparedStatement) database.getConnection().prepareCall(",
" ps = (EnginePreparedStatement) database.getConnection().prepareStatement("
],
"header": "@@ -659,13 +660,13 @@ class DRDAStatement",
"removed": [
" ps = database.getConnection().prepareCall(",
" ps = database.getConnection().prepareStatement("
]
}
]
}
] |
derby-DERBY-6000-fc9b418d
|
DERBY-6000: Add support for new JDBC 4.2 methods in ResultSet.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1444210 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.Cursor;"
],
"header": "@@ -25,6 +25,7 @@ import org.apache.derby.client.am.SqlException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [
" adjustScale( columnIndex, scale );",
"\t}",
"",
" /**",
" * <p>",
" * Adjust the scale of a type.",
" * </p>",
" */",
" protected void adjustScale( int columnIndex, int scale )",
" throws SQLException",
" {"
],
"header": "@@ -3056,6 +3056,17 @@ public class EmbedResultSet extends ConnectionChild",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/Driver42.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.impl.jdbc.EmbedResultSet;",
"import org.apache.derby.impl.jdbc.EmbedResultSet42;"
],
"header": "@@ -27,11 +27,14 @@ import java.sql.SQLException;",
"removed": []
}
]
}
] |
derby-DERBY-6001-083db506
|
DERBY-6001: ErrorMessageTest assert failure: Only one of the waiters should be aborted
Increase the wait timeout for the deadlock test. This prevents the
intermittent timeout errors that could happen on slow machines if the
deadlock detector hasn't picked and killed a victim before the other
waiting thread has timed out.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1412577 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6001-8467ac54
|
DERBY-6001: ErrorMessageTest assert failure: Only one of the waiters should be aborted
Improve diagnostics. Print stack traces to the log if both threads fail.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1412042 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6003-959fef25
|
DERBY-6003: Create row templates outside of the generated code
Create and store an ExecRowBuilder in the GenericPreparedStatement
instead of creating a generated method for allocating row templates.
This patch makes ScanResultSet and its sub-classes use the new approach.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1418297 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/JoinStrategy.java",
"hunks": [
{
"added": [
" * @param resultRowTemplate The saved object index of a result row template"
],
"header": "@@ -208,7 +208,7 @@ public interface JoinStrategy {",
"removed": [
"\t * @param resultRowAllocator\tA completed method to allocate the result row"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java",
"hunks": [
{
"added": [
" @param fullTemplate Saved item for a row template used by bulk insert,",
" or -1 if this is not a bulk insert",
" GeneratedMethod checkGM, int fullTemplate)"
],
"header": "@@ -113,11 +113,13 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\t GeneratedMethod checkGM)"
]
},
{
"added": [
" @param resultRowTemplate The saved item for result row template."
],
"header": "@@ -688,11 +690,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param resultRowAllocator a reference to a method in the activation",
"\t\t\tthat creates a holder for the rows from the scan.",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow rowAllocator() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -743,7 +741,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
" @param resultRowTemplate The saved item for result row template."
],
"header": "@@ -779,11 +777,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param resultRowAllocator a reference to a method in the activation",
"\t\t\tthat creates a holder for the rows from the scan.",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow rowAllocator() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -809,7 +803,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
" @param resultRowTemplate The saved item for result row template."
],
"header": "@@ -838,12 +832,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param resultRowAllocator a reference to a method in the activation",
"\t\t\tthat creates a holder for the result row of the scan. May",
"\t\t\tbe a partial row.",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow rowAllocator() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -891,7 +880,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
" @param resultRowTemplate The saved item for result row template."
],
"header": "@@ -928,12 +917,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param resultRowAllocator a reference to a method in the activation",
"\t\t\tthat creates a holder for the result row of the scan. May",
"\t\t\tbe a partial row.",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow rowAllocator() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -984,7 +968,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -1028,7 +1012,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
" * @param resultRowTemplate The saved item for result row template"
],
"header": "@@ -1487,10 +1471,7 @@ public interface ResultSetFactory {",
"removed": [
"\t * @param resultRowAllocator a reference to a method in the activation",
"\t * \t\t\t\t\t\tthat creates a holder for the result row of the scan. May",
"\t *\t\t\t\t\t\tbe a partial row. <verbatim>",
"\t *\t\tExecRow rowAllocator() throws StandardException; </verbatim>"
]
},
{
"added": [
" int resultRowTemplate,"
],
"header": "@@ -1516,7 +1497,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod \tresultRowAllocator,"
]
},
{
"added": [
"\t\tof a dependent table for the rows that got materialized"
],
"header": "@@ -1532,7 +1513,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tof a dependent table for the rows that got materilized "
]
},
{
"added": [
" @param resultRowTemplate The saved item for result row template."
],
"header": "@@ -1540,12 +1521,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param resultRowAllocator a reference to a method in the activation",
"\t\t\tthat creates a holder for the result row of the scan. May",
"\t\t\tbe a partial row.",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow rowAllocator() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\t\t@param parentResultSetId Id to access the materialized temporary result",
" \t set from the reference stored in the activation."
],
"header": "@@ -1584,8 +1560,8 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param parentResultSetId Id to access the materlized temporary result",
" \t set from the refence stored in the activation."
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.types.UserDefinedTypeIdImpl;"
],
"header": "@@ -28,9 +28,9 @@ import java.sql.Types;",
"removed": [
"import org.apache.derby.catalog.types.BaseTypeIdImpl;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BaseJoinStrategy.java",
"hunks": [
{
"added": [],
"header": "@@ -79,7 +79,6 @@ abstract class BaseJoinStrategy implements JoinStrategy {",
"removed": [
"\t * @param resultRowAllocator"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tint resultRowTemplate"
],
"header": "@@ -88,7 +87,7 @@ abstract class BaseJoinStrategy implements JoinStrategy {",
"removed": [
"\t\t\t\t\t\t\t\tMethodBuilder resultRowAllocator"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,36 +21,23 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;",
"",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"",
"import org.apache.derby.iapi.sql.execute.CursorResultSet;",
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.sql.Activation;"
]
},
{
"added": [],
"header": "@@ -64,8 +51,6 @@ import org.apache.derby.vti.DeferModification;",
"removed": [
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
""
]
},
{
"added": [],
"header": "@@ -78,7 +63,6 @@ import java.util.Iterator;",
"removed": [
"import org.apache.derby.iapi.sql.depend.Dependent;"
]
},
{
"added": [],
"header": "@@ -100,7 +84,6 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\tprotected ExecRow\t\t\t\temptyHeapRow;"
]
},
{
"added": [],
"header": "@@ -270,11 +253,6 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\t\t\t/*",
"\t\t\t\t** Construct an empty heap row for use in our constant action.",
"\t\t\t\t*/",
"\t\t\t\temptyHeapRow = targetTableDescriptor.getEmptyExecRow();",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" mb.push(acb.addItem(resultColumns.buildRowTemplate(referencedCols)));"
],
"header": "@@ -3403,7 +3403,7 @@ public class FromBaseTable extends FromTable",
"removed": [
"\t\tresultColumns.generateHolder(acb, mb, referencedCols, (FormatableBitSet) null);"
]
},
{
"added": [
" mb.push(acb.addItem(resultColumns.buildRowTemplate(referencedCols)));"
],
"header": "@@ -3496,7 +3496,7 @@ public class FromBaseTable extends FromTable",
"removed": [
" \t\tresultColumns.generateHolder(acb, mb, referencedCols, (FormatableBitSet) null);"
]
},
{
"added": [
" // Put the result row template in the saved objects.",
" int resultRowTemplate =",
" acb.addItem(resultColumns.buildRowTemplate(referencedCols));"
],
"header": "@@ -3568,11 +3568,9 @@ public class FromBaseTable extends FromTable",
"removed": [
" // get a function to allocate scan rows of the right shape and size",
" \t MethodBuilder resultRowAllocator =",
"\t\t\t\t\t\tresultColumns.generateHolderMethod(acb,",
"\t\t\t\t\t\t\t\t\t\t\t\t\treferencedCols,",
"\t\t\t\t\t\t\t\t\t\t\t\t\t(FormatableBitSet) null);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java",
"hunks": [
{
"added": [],
"header": "@@ -37,10 +37,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ProjectRestrictNode;",
"import org.apache.derby.impl.sql.compile.Predicate;",
""
]
},
{
"added": [
"\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -327,7 +323,7 @@ public class HashJoinStrategy extends BaseJoinStrategy {",
"removed": [
"\t\t\t\t\t\t\tMethodBuilder resultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/InsertNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,12 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
"import org.apache.derby.iapi.services.compiler.JavaFactory;",
"import org.apache.derby.iapi.services.compiler.MethodBuilder;"
]
},
{
"added": [
"import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;"
],
"header": "@@ -35,23 +29,17 @@ import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;",
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.iapi.sql.Activation;"
]
},
{
"added": [],
"header": "@@ -60,7 +48,6 @@ import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;",
"removed": [
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;"
]
},
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -77,6 +64,7 @@ import org.apache.derby.impl.sql.execute.FKInfo;",
"removed": []
},
{
"added": [
"",
" bulkInsert = true;"
],
"header": "@@ -889,6 +877,8 @@ public final class InsertNode extends DMLModStatementNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java",
"hunks": [
{
"added": [],
"header": "@@ -37,8 +37,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
""
]
},
{
"added": [
"\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -203,7 +201,7 @@ public class NestedLoopJoinStrategy extends BaseJoinStrategy {",
"removed": [
"\t\t\t\t\t\t\tMethodBuilder resultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [],
"header": "@@ -42,8 +42,6 @@ import org.apache.derby.iapi.services.loader.ClassFactory;",
"removed": [
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.compile.Parser;"
]
},
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -53,6 +51,7 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": []
},
{
"added": [
" /**",
" * Build an {@code ExecRowBuilder} instance that produces a row of the",
" * same shape as this result column list.",
" *",
" * @param referencedCols a bit map that tells which columns in the",
" * source result set that are used, or {@code null} if all are used",
" * @return an instance that produces rows of the same shape as this",
" * result column list",
" */",
" ExecRowBuilder buildRowTemplate(FormatableBitSet referencedCols)",
" throws StandardException",
" {",
" int columns = (referencedCols == null) ?",
" size() : referencedCols.getNumBitsSet();",
"",
" ExecRowBuilder builder = new ExecRowBuilder(columns, indexRow);",
"",
" int colNum = (referencedCols == null) ? 0 : referencedCols.anySetBit();",
"",
" for (int i = 0; i < size(); i++) {",
" ResultColumn rc = (ResultColumn) elementAt(i);",
"",
" if (rc.getExpression() instanceof CurrentRowLocationNode) {",
" builder.setColumn(colNum + 1, newRowLocationTemplate());",
" } else {",
" builder.setColumn(colNum + 1, rc.getType());",
" }",
"",
" if (referencedCols == null) {",
" colNum++;",
" } else {",
" colNum = referencedCols.anySetBit(colNum);",
" }",
" }",
"",
" return builder;",
" }"
],
"header": "@@ -1511,6 +1510,43 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": []
},
{
"added": [
" int savedItem = acb.addItem(newRowLocationTemplate());"
],
"header": "@@ -1630,37 +1666,8 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tConglomerateController cc = null;",
"\t\t\t\tint savedItem;",
"\t\t\t\tRowLocation rl;",
"\t\t\t\t",
"\t\t\t\tLanguageConnectionContext lcc = getLanguageConnectionContext();",
"\t\t\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\t\t\t",
"\t\t\t\tint isolationLevel = (dd.getCacheMode() == DataDictionary.DDL_MODE) ? ",
"\t\t\t\t\t\tTransactionController.ISOLATION_READ_COMMITTED : TransactionController.ISOLATION_NOLOCK;",
"",
"\t\t\t\tcc = lcc.getTransactionCompile().openConglomerate(",
"\t\t\t\t\t\tconglomerateId,",
" false,",
"\t\t\t\t\t\t0,",
"\t\t\t\t\t\tTransactionController.MODE_RECORD,",
"\t\t\t\t\t\tisolationLevel);",
"",
"\t\t\t\ttry",
"\t\t\t\t{",
"\t\t\t\t\trl = cc.newRowLocationTemplate();",
"\t\t\t\t}",
"\t\t\t\tfinally",
"\t\t\t\t{",
"\t\t\t\t\tif (cc != null)",
"\t\t\t\t\t{",
"\t\t\t\t\t\tcc.close();",
"\t\t\t\t\t}",
"\t\t\t\t}",
"\t\t\t\tsavedItem = acb.addItem(rl);",
"\t\t\t\t\t\t\t\t"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java",
"hunks": [
{
"added": [],
"header": "@@ -84,7 +84,6 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\tpublic ExecRow\t\t\t\temptyHeapRow;"
]
},
{
"added": [],
"header": "@@ -486,11 +485,6 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\t\t/*",
"\t\t\t** Construct an empty heap row for use in our constant action.",
"\t\t\t*/",
"\t\t\temptyHeapRow = targetTableDescriptor.getEmptyExecRow();",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java",
"hunks": [
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -85,7 +85,7 @@ class BulkTableScanResultSet extends TableScanResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java",
"hunks": [
{
"added": [],
"header": "@@ -23,14 +23,10 @@ package org.apache.derby.impl.sql.execute;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.error.StandardException;"
]
},
{
"added": [],
"header": "@@ -84,7 +80,6 @@ public class DeleteConstantAction extends WriteCursorConstantAction",
"removed": [
"\t * @param emptyHeapRow\tTemplate for heap row."
]
},
{
"added": [],
"header": "@@ -102,7 +97,6 @@ public class DeleteConstantAction extends WriteCursorConstantAction",
"removed": [
"\t\t\t\t\t\t\t\tExecRow\t\t\t\temptyHeapRow,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java",
"hunks": [
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -117,7 +117,7 @@ class DependentResultSet extends ScanResultSet implements CursorResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
},
{
"added": [
"\t\tsuper(activation, resultSetNumber, resultRowTemplate,"
],
"header": "@@ -142,7 +142,7 @@ class DependentResultSet extends ScanResultSet implements CursorResultSet",
"removed": [
"\t\tsuper(activation, resultSetNumber, resultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java",
"hunks": [
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -51,7 +51,7 @@ class DistinctScanResultSet extends HashScanResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -31,21 +31,15 @@ import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"removed": [
"import org.apache.derby.iapi.sql.execute.ExecIndexRow;",
"import org.apache.derby.iapi.sql.dictionary.GenericDescriptorList;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
""
]
},
{
"added": [],
"header": "@@ -449,7 +443,6 @@ public class GenericConstantActionFactory",
"removed": [
"\t * @param emptyHeapRow\t\t\tTemplate for heap row."
]
},
{
"added": [],
"header": "@@ -485,7 +478,6 @@ public class GenericConstantActionFactory",
"removed": [
"\t\t\t\t\t\t\t\tExecRow\t\t\t\temptyHeapRow,"
]
},
{
"added": [],
"header": "@@ -516,7 +508,6 @@ public class GenericConstantActionFactory",
"removed": [
"\t\t\t\t\t\t\t\t\t\temptyHeapRow,"
]
},
{
"added": [],
"header": "@@ -864,7 +855,6 @@ public class GenericConstantActionFactory",
"removed": [
"\t * @param emptyHeapRow\t\t\tTemplate for heap row."
]
},
{
"added": [],
"header": "@@ -893,7 +883,6 @@ public class GenericConstantActionFactory",
"removed": [
"\t\t\t\t\t\t\t\tExecRow\t\t\t\temptyHeapRow,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.catalog.TypeDescriptor;"
]
},
{
"added": [
" GeneratedMethod checkGM, int fullTemplate)",
" return new InsertResultSet(",
" source, generationClauses, checkGM, fullTemplate, activation);"
],
"header": "@@ -68,12 +67,13 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\t\tGeneratedMethod checkGM)",
"\t\treturn new InsertResultSet(source, generationClauses, checkGM, activation );"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -483,7 +483,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -517,7 +517,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -553,7 +553,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -574,7 +574,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -598,7 +598,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -627,7 +627,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -660,7 +660,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -698,7 +698,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -739,7 +739,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -771,7 +771,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
" * @param resultRowTemplate The saved item for result row template"
],
"header": "@@ -1145,10 +1145,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t * @param resultRowAllocator a reference to a method in the activation",
"\t * \t\t\t\t\t\tthat creates a holder for the result row of the scan. May",
"\t *\t\t\t\t\t\tbe a partial row. <verbatim>",
"\t *\t\tExecRow rowAllocator() throws StandardException; </verbatim>"
]
},
{
"added": [
" int resultRowTemplate,"
],
"header": "@@ -1174,7 +1171,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod \tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\tresultRowTemplate,"
],
"header": "@@ -1190,7 +1187,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\tresultRowAllocator,"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tint resultRowTemplate,"
],
"header": "@@ -1214,7 +1211,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\t\t\t\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java",
"hunks": [
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -112,7 +112,7 @@ public class HashScanResultSet extends ScanResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
},
{
"added": [
"\t\t\t\tresultRowTemplate,"
],
"header": "@@ -139,7 +139,7 @@ public class HashScanResultSet extends ScanResultSet",
"removed": [
"\t\t\t\tresultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -55,6 +55,7 @@ import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;",
"removed": []
},
{
"added": [
" private final int fullTemplateId;"
],
"header": "@@ -128,7 +129,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\tprivate ExecRow\t\t\t\t\tfullTemplate;"
]
},
{
"added": [
" int fullTemplate,"
],
"header": "@@ -319,6 +320,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": []
},
{
"added": [
" this.fullTemplateId = fullTemplate;"
],
"header": "@@ -327,6 +329,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": []
},
{
"added": [
"",
" ExecRow fullTemplate =",
" ((ExecRowBuilder) activation.getPreparedStatement().",
" getSavedObject(fullTemplateId)).build(",
" activation.getExecutionFactory());",
"",
" long baseTableConglom =",
" bulkInsertCore(lcc, fullTemplate, heapConglom);"
],
"header": "@@ -452,7 +455,14 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\tlong baseTableConglom = bulkInsertCore(lcc, heapConglom);"
]
},
{
"added": [
" bulkValidateForeignKeys(tc, lcc.getContextManager(), fullTemplate);"
],
"header": "@@ -488,7 +498,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\tbulkValidateForeignKeys(tc, lcc.getContextManager());"
]
},
{
"added": [
" ExecRow fullTemplate,"
],
"header": "@@ -1252,10 +1262,10 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\tfullTemplate = constants.getEmptyHeapRow(lcc);"
]
},
{
"added": [
" private void bulkValidateForeignKeys(",
" TransactionController tc, ContextManager cm, ExecRow fullTemplate)"
],
"header": "@@ -1407,7 +1417,8 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\tprivate void bulkValidateForeignKeys(TransactionController tc, ContextManager cm)"
]
},
{
"added": [
"\t\t\t\t\t\t\tfkInfo.fkConstraintNames[index], fullTemplate);"
],
"header": "@@ -1505,7 +1516,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\t\t\t\tfkInfo.fkConstraintNames[index]);"
]
},
{
"added": [
"\t\t\t\t\t\tfkInfo.refConglomNumber, fkInfo.fkConstraintNames[0],",
" fullTemplate);"
],
"header": "@@ -1525,7 +1536,8 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\t\t\tfkInfo.refConglomNumber, fkInfo.fkConstraintNames[0]);"
]
},
{
"added": [
" String fkConstraintName, ExecRow fullTemplate)"
],
"header": "@@ -1533,7 +1545,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\t\t\tString fkConstraintName)"
]
},
{
"added": [
" fullTemplateId,"
],
"header": "@@ -2429,7 +2441,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
" new MyRowAllocator(fullTemplate),\t// result row allocator"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.CursorResultSet;"
],
"header": "@@ -22,9 +22,9 @@",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [
" * @param resultRowTemplate The saved item for result row template"
],
"header": "@@ -60,10 +60,7 @@ class LastIndexKeyResultSet extends ScanResultSet",
"removed": [
"\t * @param resultRowAllocator a reference to a method in the activation",
"\t * \t\t\t\t\t\tthat creates a holder for the result row of the scan. May",
"\t *\t\t\t\t\t\tbe a partial row. <verbatim>",
"\t *\t\tExecRow rowAllocator() throws StandardException; </verbatim>"
]
},
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -87,7 +84,7 @@ class LastIndexKeyResultSet extends ScanResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
},
{
"added": [
"\t\t\t\tresultRowTemplate,"
],
"header": "@@ -102,7 +99,7 @@ class LastIndexKeyResultSet extends ScanResultSet",
"removed": [
"\t\t\t\tresultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/MultiProbeTableScanResultSet.java",
"hunks": [
{
"added": [
" int resultRowTemplate,"
],
"header": "@@ -105,7 +105,7 @@ class MultiProbeTableScanResultSet extends TableScanResultSet",
"removed": [
" GeneratedMethod resultRowAllocator, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -21,10 +21,11 @@ package org.apache.derby.impl.sql.execute;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [
" /** Object used to create and reset the candidate row. */",
" final ExecRowBuilder resultRowBuilder;",
""
],
"header": "@@ -71,6 +72,9 @@ abstract class ScanResultSet extends NoPutResultSetImpl {",
"removed": []
},
{
"added": [
" * @param resultRowTemplate identifier of saved object for row template"
],
"header": "@@ -88,7 +92,7 @@ abstract class ScanResultSet extends NoPutResultSetImpl {",
"removed": [
" * @param resultRowAllocator method which generates rows"
]
},
{
"added": [
" int resultRowTemplate,"
],
"header": "@@ -98,7 +102,7 @@ abstract class ScanResultSet extends NoPutResultSetImpl {",
"removed": [
" GeneratedMethod resultRowAllocator,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -67,7 +67,6 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\tprotected GeneratedMethod resultRowAllocator;"
]
},
{
"added": [
"\t\tint resultRowTemplate,"
],
"header": "@@ -126,7 +125,7 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\t\tGeneratedMethod resultRowAllocator, "
]
},
{
"added": [
"\t\t\t\tresultRowTemplate,"
],
"header": "@@ -150,7 +149,7 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\t\t\t\tresultRowAllocator,"
]
},
{
"added": [],
"header": "@@ -167,7 +166,6 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\t\t\tSanityManager.ASSERT( resultRowAllocator!= null, \"table scan must get row allocator\");"
]
},
{
"added": [],
"header": "@@ -175,8 +173,6 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
" this.resultRowAllocator = resultRowAllocator;",
""
]
},
{
"added": [],
"header": "@@ -734,8 +730,6 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\t ExecRow result = null;",
""
]
},
{
"added": [
" resultRowBuilder.reset(candidate);",
" currentRow = getCompactRow(candidate, accessedCols, isKeyed);",
" scanController.fetchWithoutQualify(candidate.getRowArray());"
],
"header": "@@ -766,13 +760,12 @@ class TableScanResultSet extends ScanResultSet",
"removed": [
"\t\tresult = (ExecRow) resultRowAllocator.invoke(activation);",
"\t\tcurrentRow = ",
" getCompactRow(result, accessedCols, isKeyed);",
" scanController.fetchWithoutQualify(result.getRowArray());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java",
"hunks": [
{
"added": [],
"header": "@@ -21,35 +21,7 @@",
"removed": [
"import org.apache.derby.iapi.services.stream.HeaderPrintWriter;",
"",
"",
"import org.apache.derby.iapi.services.io.ArrayUtil;",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"",
"import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;",
"",
"import org.apache.derby.iapi.sql.execute.ConstantAction;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"",
"import org.apache.derby.iapi.error.StandardException;",
"",
"import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;",
"",
"import org.apache.derby.catalog.UUID;",
"",
"import java.io.ObjectOutput;",
"import java.io.ObjectInput;",
"import java.io.IOException;",
"import java.io.Serializable;",
"",
"import java.sql.PreparedStatement;",
"import java.sql.SQLException;",
"",
"import java.util.Properties;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.java",
"hunks": [
{
"added": [],
"header": "@@ -21,21 +21,11 @@",
"removed": [
"import org.apache.derby.iapi.services.stream.HeaderPrintWriter;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.sql.execute.ConstantAction;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"",
"import org.apache.derby.iapi.error.StandardException;",
""
]
},
{
"added": [],
"header": "@@ -92,7 +82,6 @@ public class UpdateConstantAction extends WriteCursorConstantAction",
"removed": [
"\t * @param emptyHeapRow\tTemplate for heap row."
]
},
{
"added": [],
"header": "@@ -116,7 +105,6 @@ public class UpdateConstantAction extends WriteCursorConstantAction",
"removed": [
"\t\t\t\t\t\t\t\tExecRow\t\t\t\temptyHeapRow,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java",
"hunks": [
{
"added": [],
"header": "@@ -33,12 +33,8 @@ import org.apache.derby.iapi.services.io.Formatable;",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"import org.apache.derby.iapi.sql.execute.ExecRow;"
]
},
{
"added": [],
"header": "@@ -82,7 +78,6 @@ abstract\tclass WriteCursorConstantAction implements ConstantAction, Formatable",
"removed": [
"\tprivate ExecRow\t\t\t\t\t\temptyHeapRow;"
]
},
{
"added": [],
"header": "@@ -112,7 +107,6 @@ abstract\tclass WriteCursorConstantAction implements ConstantAction, Formatable",
"removed": [
"\t * @param emptyHeapRow\tan empty heap row"
]
},
{
"added": [],
"header": "@@ -130,7 +124,6 @@ abstract\tclass WriteCursorConstantAction implements ConstantAction, Formatable",
"removed": [
"\t\t\t\t\t\t\t\tExecRow\t\t\t\temptyHeapRow,"
]
},
{
"added": [],
"header": "@@ -147,7 +140,6 @@ abstract\tclass WriteCursorConstantAction implements ConstantAction, Formatable",
"removed": [
"\t\tthis.emptyHeapRow = emptyHeapRow;"
]
},
{
"added": [],
"header": "@@ -299,33 +291,6 @@ abstract\tclass WriteCursorConstantAction implements ConstantAction, Formatable",
"removed": [
"\t\t",
"\t/**",
"\t *\tGet emptyHeapRow",
"\t *",
"\t * @param lcc\tThe LanguageConnectionContext to use.",
"\t *",
"\t * @return\tan empty base table row for the table being updated.",
"\t *",
"\t * @exception StandardException on error",
"\t */",
"\tpublic ExecRow getEmptyHeapRow(LanguageConnectionContext lcc) throws StandardException",
"\t{",
"\t\tDataDictionary dd;",
"\t\tTableDescriptor td;",
"",
"\t\tif (emptyHeapRow == null)",
"\t\t{",
"",
"\t\t\tdd = lcc.getDataDictionary();",
"\t",
"\t\t\ttd = dd.getTableDescriptor(targetUUID);",
"\t",
"\t\t\temptyHeapRow = td.getEmptyExecRow();",
"\t\t}",
"",
"\t\treturn emptyHeapRow.getClone();",
"\t}"
]
}
]
}
] |
derby-DERBY-6003-a280bebe
|
DERBY-6003: Create row templates outside of the generated code
Initial cleanup: Remove unused fields in ResultSet classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1412763 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -91,10 +91,7 @@ class DependentResultSet extends ScanResultSet implements CursorResultSet",
"removed": [
"\tprotected GeneratedMethod resultRowAllocator;",
"\tprotected GeneratedMethod startKeyGetter;",
"\tprotected GeneratedMethod stopKeyGetter;"
]
},
{
"added": [],
"header": "@@ -103,7 +100,6 @@ class DependentResultSet extends ScanResultSet implements CursorResultSet",
"removed": [
"\tprivate boolean sameStartStopPosition;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -28,9 +28,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatableBitSet;",
"import org.apache.derby.iapi.services.io.Storable;"
]
},
{
"added": [],
"header": "@@ -75,7 +73,6 @@ public class HashScanResultSet extends ScanResultSet",
"removed": [
"\tprivate GeneratedMethod resultRowAllocator;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.execute.CursorResultSet;"
]
},
{
"added": [],
"header": "@@ -41,10 +40,7 @@ class LastIndexKeyResultSet extends ScanResultSet",
"removed": [
"\tprotected GeneratedMethod resultRowAllocator;",
"\tprotected GeneratedMethod startKeyGetter;",
"\tprotected GeneratedMethod stopKeyGetter;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -23,11 +23,9 @@ package org.apache.derby.impl.sql.execute;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"import org.apache.derby.iapi.sql.ResultDescription;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -21,13 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.services.monitor.Monitor;",
"import org.apache.derby.iapi.services.stream.HeaderPrintWriter;",
"import org.apache.derby.iapi.services.stream.InfoStreams;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -22,22 +22,14 @@",
"removed": [
"import org.apache.derby.iapi.services.loader.ClassFactory;",
"import org.apache.derby.iapi.services.loader.ClassInspector;",
"",
"import org.apache.derby.iapi.services.monitor.Monitor;",
"import org.apache.derby.iapi.services.stream.HeaderPrintWriter;",
"import org.apache.derby.iapi.services.stream.InfoStreams;",
"",
"import org.apache.derby.iapi.sql.ResultDescription;"
]
},
{
"added": [],
"header": "@@ -78,8 +70,6 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
" private boolean next;",
"\tprivate ClassInspector classInspector;"
]
},
{
"added": [],
"header": "@@ -470,7 +460,6 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
"\t \tnext = false;"
]
}
]
}
] |
derby-DERBY-6003-ae72a308
|
DERBY-6003: Create row templates outside of the generated code
Upgrade test fix in preparation for the actual fix for this issue.
Improve SYSCS_INVALIDATE_STORED_STATEMENTS by making it null out the
plans in SYS.SYSSTATEMENTS. Previously, it only marked them as invalid.
Use the improved SYSCS_INVALIDATE_STORED_STATEMENTS to work around
problems in the upgrade tests when downgrading to a version that suffers
from DERBY-4835 or DERBY-5289. Remove the old workarounds for DERBY-4835,
DERBY-5105, DERBY-5263 and DERBY-5289, as they are now handled by the
centralized workaround that uses SYSCS_INVALIDATE_STORED_STATEMENTS.
This change is needed because later patches for this issue will change
the format of many stored plans, so more of the test cases need to work
around the downgrade bugs in some old versions.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1418296 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
" * @param recompile Whether to recompile or invalidate"
],
"header": "@@ -4429,6 +4429,7 @@ public final class\tDataDictionaryImpl",
"removed": []
}
]
}
] |
derby-DERBY-6003-bbd82de4
|
DERBY-6003: Create row templates outside of the generated code
Initial cleanup: Remove unused field from TypeId, and remove the
corresponding parameter from the constructor.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1414718 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/types/TypeId.java",
"hunks": [
{
"added": [
" public static TypeId getUserDefinedTypeId(String className)",
" throws StandardException",
" {",
" return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,",
" new UserDefinedTypeIdImpl(className));",
" }"
],
"header": "@@ -417,13 +417,12 @@ public final class TypeId",
"removed": [
" public static TypeId getUserDefinedTypeId(String className, boolean delimitedIdentifier)",
" throws StandardException",
" {",
" return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,",
" new UserDefinedTypeIdImpl(className), delimitedIdentifier",
" );",
" }"
]
},
{
"added": [
" return TypeId.getUserDefinedTypeId(javaTypeName);"
],
"header": "@@ -546,7 +545,7 @@ public final class TypeId",
"removed": [
" return TypeId.getUserDefinedTypeId(javaTypeName, false);"
]
},
{
"added": [],
"header": "@@ -666,7 +665,6 @@ public final class TypeId",
"removed": [
" private boolean classNameWasDelimitedIdentifier;"
]
},
{
"added": [],
"header": "@@ -698,22 +696,6 @@ public final class TypeId",
"removed": [
" /**",
" * Constructor for a TypeId for user defined types",
" *",
" * @param formatId Format id of specific type id.",
" * @param baseTypeId The Base type id",
" * @param classNameWasDelimitedIdentifier Whether or not the class name",
" * was a delimited identifier",
" */",
" public TypeId(int formatId, BaseTypeIdImpl baseTypeId,",
" boolean classNameWasDelimitedIdentifier)",
" {",
" this.formatId = formatId;",
" this.baseTypeId = baseTypeId;",
" this.classNameWasDelimitedIdentifier = classNameWasDelimitedIdentifier;",
" setTypeIdSpecificInstanceVariables();",
" }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
"\t\t\t\t\ttypeId = TypeId.getUserDefinedTypeId(arrayType);"
],
"header": "@@ -505,7 +505,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\t\t\ttypeId = TypeId.getUserDefinedTypeId(arrayType, false);"
]
},
{
"added": [
"\t\t\t\t\t\tTypeId.getUserDefinedTypeId(\"java.sql.ResultSet[]\"),"
],
"header": "@@ -665,10 +665,8 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\t\tTypeId typeId = TypeId.getUserDefinedTypeId(\"java.sql.ResultSet[]\", false);",
"",
"\t\t\t\t\t\ttypeId,"
]
}
]
}
] |
derby-DERBY-6003-bda7291d
|
DERBY-6003: Create row templates outside of the generated code
Make IndexRowToBaseRowResultSet use an ExecRowBuilder instead of a
generated method to produce row templates.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1426151 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" mb.push(acb.addItem(",
" resultColumns.buildRowTemplate(referencedCols, false)));"
],
"header": "@@ -3403,7 +3403,8 @@ public class FromBaseTable extends FromTable",
"removed": [
" mb.push(acb.addItem(resultColumns.buildRowTemplate(referencedCols)));"
]
},
{
"added": [
" mb.push(acb.addItem(",
" resultColumns.buildRowTemplate(referencedCols, false)));"
],
"header": "@@ -3496,7 +3497,8 @@ public class FromBaseTable extends FromTable",
"removed": [
" mb.push(acb.addItem(resultColumns.buildRowTemplate(referencedCols)));"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" * @param skipPropagatedCols whether to skip virtual columns whose",
" * source is the immediate child result set",
" ExecRowBuilder buildRowTemplate(FormatableBitSet referencedCols,",
" boolean skipPropagatedCols)"
],
"header": "@@ -1516,10 +1516,13 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
" ExecRowBuilder buildRowTemplate(FormatableBitSet referencedCols)"
]
},
{
"added": [
" // Get the index of the first column to set in the row template.",
" ValueNode sourceExpr = rc.getExpression();",
"",
" if (sourceExpr instanceof CurrentRowLocationNode) {",
" } else if (skipPropagatedCols &&",
" sourceExpr instanceof VirtualColumnNode) {",
" // Skip over those columns whose source is the immediate",
" // child result set. (No need to generate a wrapper",
" // for a SQL NULL when we are smart enough not to pass",
" // that wrapper to the store.)",
" continue;",
" // Get the index of the next column to set in the row template."
],
"header": "@@ -1527,17 +1530,28 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
" if (rc.getExpression() instanceof CurrentRowLocationNode) {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -30,6 +30,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": []
},
{
"added": [],
"header": "@@ -64,7 +65,6 @@ class IndexRowToBaseRowResultSet extends NoPutResultSetImpl",
"removed": [
"\tprivate ExecRow\t\t\t\t\tresultRow;"
]
},
{
"added": [
"\t\t\t\t\tint resultRowAllocator,"
],
"header": "@@ -87,7 +87,7 @@ class IndexRowToBaseRowResultSet extends NoPutResultSetImpl",
"removed": [
"\t\t\t\t\tGeneratedMethod resultRowAllocator,"
]
},
{
"added": [
" ExecRow resultRow = ((ExecRowBuilder) saved[resultRowAllocator])",
" .build(a.getExecutionFactory());"
],
"header": "@@ -132,7 +132,8 @@ class IndexRowToBaseRowResultSet extends NoPutResultSetImpl",
"removed": [
"\t\tresultRow = (ExecRow) resultRowAllocator.invoke(activation);"
]
}
]
}
] |
derby-DERBY-6003-d868eed0
|
DERBY-6003: Create row templates outside of the generated code
Make SortResultSet, VTIResultSet, aggregates and WindowResultSet use an
ExecRowBuilder instead of a generated method to allocate row templates.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1420579 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java",
"hunks": [
{
"added": [
"\t\t@param rowAllocator a reference to a saved object"
],
"header": "@@ -382,7 +382,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param rowAllocator a reference to a method in the activation"
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -399,7 +399,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\t@param rowAllocator a reference to a saved object"
],
"header": "@@ -415,7 +415,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param rowAllocator a reference to a method in the activation"
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -431,7 +431,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\t@param rowAllocator a reference to a saved object"
],
"header": "@@ -449,7 +449,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param rowAllocator a reference to a method in the activation"
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -467,7 +467,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\t@param rowAllocator a reference to a saved object"
],
"header": "@@ -484,7 +484,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param rowAllocator a reference to a method in the activation"
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -500,7 +500,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\t@param rowAllocator a reference to a saved object"
],
"header": "@@ -518,7 +518,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param rowAllocator a reference to a method in the activation"
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -536,7 +536,7 @@ public interface ResultSetFactory {",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\t@param row a reference to a saved object"
],
"header": "@@ -640,11 +640,8 @@ public interface ResultSetFactory {",
"removed": [
"\t\t@param row a reference to a method in the activation",
"\t\t\t<verbatim>",
"\t\t\t\tExecRow row() throws StandardException;",
"\t\t\t</verbatim>"
]
},
{
"added": [
"\tpublic NoPutResultSet getVTIResultSet(Activation activation, int row,"
],
"header": "@@ -661,7 +658,7 @@ public interface ResultSetFactory {",
"removed": [
"\tpublic NoPutResultSet getVTIResultSet(Activation activation, GeneratedMethod row,"
]
},
{
"added": [
"\t @param rowAllocator A reference to a saved object"
],
"header": "@@ -1101,7 +1098,7 @@ public interface ResultSetFactory {",
"removed": [
"\t @param rowAllocator A reference to a method in the activation"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java",
"hunks": [
{
"added": [
"\t * @param\tra\t\t\t\tsaved object that builds an empty output row"
],
"header": "@@ -52,8 +52,7 @@ class DistinctGroupedAggregateResultSet extends GroupedAggregateResultSet",
"removed": [
"\t * @param\tra\t\t\t\tgenerated method to build an empty",
"\t *\t \toutput row "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -35,9 +35,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
""
]
},
{
"added": [
"\t * @param\tra\t\t\t\tsaved object that builds an empty output row"
],
"header": "@@ -77,8 +74,7 @@ class DistinctScalarAggregateResultSet extends ScalarAggregateResultSet",
"removed": [
"\t * @param\tra\t\t\t\tgenerated method to build an empty",
"\t *\t \toutput row "
]
},
{
"added": [
"\t\t\t\t\tint ra,"
],
"header": "@@ -88,7 +84,7 @@ class DistinctScalarAggregateResultSet extends ScalarAggregateResultSet",
"removed": [
"\t\t\t\t\tGeneratedMethod ra,"
]
},
{
"added": [
" sortResultRow = (ExecIndexRow) getRowTemplate().getClone();",
" sourceExecIndexRow = (ExecIndexRow) getRowTemplate().getClone();"
],
"header": "@@ -133,8 +129,8 @@ class DistinctScalarAggregateResultSet extends ScalarAggregateResultSet",
"removed": [
"\t\tsortResultRow = getExecutionFactory().getIndexableRow(sortTemplateRow.getClone());",
"\t\tsourceExecIndexRow = getExecutionFactory().getIndexableRow(sortTemplateRow.getClone());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;",
"import org.apache.derby.iapi.sql.execute.ExecutionFactory;"
],
"header": "@@ -27,11 +27,13 @@ import org.apache.derby.iapi.error.SQLWarningFactory;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [
" private final ExecIndexRow rowTemplate;",
"\t * @param ra reference to a saved row allocator instance"
],
"header": "@@ -41,16 +43,16 @@ import org.apache.derby.iapi.sql.execute.NoPutResultSet;",
"removed": [
"\tprotected GeneratedMethod\t\t\trowAllocator;",
"\t * @param ra row allocator generated method"
]
},
{
"added": [
"\t\tint ra,"
],
"header": "@@ -62,7 +64,7 @@ abstract class GenericAggregateResultSet extends NoPutResultSetImpl",
"removed": [
"\t\tGeneratedMethod\tra,"
]
},
{
"added": [
" ExecPreparedStatement ps = a.getPreparedStatement();",
" ExecutionFactory ef = a.getExecutionFactory();",
" rowTemplate = ef.getIndexableRow(",
" ((ExecRowBuilder) ps.getSavedObject(ra)).build(ef));",
"\t\taggInfoList = (AggregatorInfoList) ps.getSavedObject(aggregateItem);",
" /**",
" * Get a template row of the right shape for sorting or returning results.",
" * The template is cached, so it may need to be cloned if callers use it",
" * for multiple purposes at the same time.",
" *",
" * @return a row template of the right shape for this result set",
" */",
" ExecIndexRow getRowTemplate() {",
" return rowTemplate;",
" }",
""
],
"header": "@@ -73,14 +75,28 @@ abstract class GenericAggregateResultSet extends NoPutResultSetImpl",
"removed": [
"\t\trowAllocator = ra;",
"\t\taggInfoList = (AggregatorInfoList) (a.getPreparedStatement().getSavedObject(aggregateItem));"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java",
"hunks": [
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -270,7 +270,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -297,7 +297,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -320,7 +320,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -343,7 +343,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\t\tint rowAllocator,"
],
"header": "@@ -365,7 +365,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\t\tGeneratedMethod rowAllocator, "
]
},
{
"added": [
"\tpublic NoPutResultSet getVTIResultSet(Activation activation, int row,"
],
"header": "@@ -436,7 +436,7 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
"\tpublic NoPutResultSet getVTIResultSet(Activation activation, GeneratedMethod row,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -28,7 +28,6 @@ import java.util.HashSet;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [],
"header": "@@ -85,7 +84,6 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\tprivate ExecIndexRow sortTemplateRow;"
]
},
{
"added": [
"\t * @param\tra\t\t\t\tsaved object that builds an empty output row"
],
"header": "@@ -145,8 +143,7 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t * @param\tra\t\t\t\tgenerated method to build an empty",
"\t *\t \toutput row "
]
},
{
"added": [
"\t\t\t\t\tint ra,"
],
"header": "@@ -157,7 +154,7 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t\t\t\t\tGeneratedMethod ra,"
]
},
{
"added": [],
"header": "@@ -168,7 +165,6 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t\tsortTemplateRow = getExecutionFactory().getIndexableRow((ExecRow) rowAllocator.invoke(activation));"
]
},
{
"added": [
" sortResultRow = (ExecIndexRow) getRowTemplate().getClone();",
" sourceExecIndexRow = (ExecIndexRow) getRowTemplate().getClone();"
],
"header": "@@ -213,8 +209,8 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t\tsortResultRow = getExecutionFactory().getIndexableRow(sortTemplateRow.getClone());",
"\t\tsourceExecIndexRow = getExecutionFactory().getIndexableRow(sortTemplateRow.getClone());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [],
"header": "@@ -48,7 +47,6 @@ class ScalarAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\tprotected \tExecIndexRow \t\tsortTemplateRow;"
]
},
{
"added": [
"\t * @param\tra\t\t\t\tsaved object that builds an empty output row"
],
"header": "@@ -66,8 +64,7 @@ class ScalarAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t * @param\tra\t\t\t\tgenerated method to build an empty",
"\t *\t \toutput row "
]
},
{
"added": [
"\t\t\t\t\tint ra,"
],
"header": "@@ -76,7 +73,7 @@ class ScalarAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t\t\t\t\tGeneratedMethod ra,"
]
},
{
"added": [],
"header": "@@ -91,7 +88,6 @@ class ScalarAggregateResultSet extends GenericAggregateResultSet",
"removed": [
"\t\tsortTemplateRow = getExecutionFactory().getIndexableRow((ExecRow) rowAllocator.invoke(activation));"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;"
],
"header": "@@ -21,17 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.services.monitor.Monitor;",
"",
"import org.apache.derby.iapi.services.stream.HeaderPrintWriter;",
"import org.apache.derby.iapi.services.stream.InfoStreams;",
"",
"import org.apache.derby.iapi.services.io.Formatable;",
"",
"import org.apache.derby.iapi.sql.ResultSet;"
]
},
{
"added": [],
"header": "@@ -44,10 +37,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
""
]
},
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -55,8 +44,7 @@ import org.apache.derby.iapi.types.RowLocation;",
"removed": [
"import java.util.Vector;",
"import java.util.Enumeration;"
]
},
{
"added": [],
"header": "@@ -122,7 +110,6 @@ class SortResultSet extends NoPutResultSetImpl",
"removed": [
"\tprivate GeneratedMethod rowAllocator;"
]
},
{
"added": [
" * @param ra saved object that generates an empty row"
],
"header": "@@ -164,8 +151,7 @@ class SortResultSet extends NoPutResultSetImpl",
"removed": [
"\t * @param\tra\t\t\t\tgenerated method to build an empty",
"\t *\t \toutput row "
]
},
{
"added": [
"\t\t\t\t\tint ra,"
],
"header": "@@ -176,7 +162,7 @@ class SortResultSet extends NoPutResultSetImpl",
"removed": [
"\t\t\t\t\tGeneratedMethod ra,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -26,7 +26,9 @@ import org.apache.derby.catalog.TypeDescriptor;",
"removed": []
},
{
"added": [
"\tprivate final ExecRow allocatedRow;"
],
"header": "@@ -70,11 +72,10 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
" private GeneratedMethod row;",
"\tprivate ExecRow allocatedRow;"
]
},
{
"added": [
" VTIResultSet(Activation activation, int row, int resultSetNumber,"
],
"header": "@@ -107,7 +108,7 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
" VTIResultSet(Activation activation, GeneratedMethod row, int resultSetNumber,"
]
},
{
"added": [],
"header": "@@ -127,7 +128,6 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
" this.row = row;"
]
},
{
"added": [
" ExecPreparedStatement ps = activation.getPreparedStatement();",
"",
" this.allocatedRow = ((ExecRowBuilder) ps.getSavedObject(row))",
" .build(activation.getExecutionFactory());",
""
],
"header": "@@ -137,6 +137,11 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/WindowResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"import org.apache.derby.iapi.sql.execute.ExecRowBuilder;"
],
"header": "@@ -32,6 +32,8 @@ import org.apache.derby.iapi.types.DataValueDescriptor;",
"removed": []
},
{
"added": [],
"header": "@@ -46,8 +48,6 @@ import org.apache.derby.iapi.services.io.FormatableBitSet;",
"removed": [
" private GeneratedMethod row;",
""
]
},
{
"added": [
" * Cumulative time needed to evaluate any restriction on this result set."
],
"header": "@@ -56,7 +56,7 @@ class WindowResultSet extends NoPutResultSetImpl",
"removed": [
" * Cumulative time needed to evalute any restriction on this result set."
]
},
{
"added": [
" int rowAllocator,",
" throws StandardException"
],
"header": "@@ -81,12 +81,13 @@ class WindowResultSet extends NoPutResultSetImpl",
"removed": [
" GeneratedMethod rowAllocator,"
]
},
{
"added": [
" ExecPreparedStatement ps = activation.getPreparedStatement();",
"",
" this.allocatedRow = ((ExecRowBuilder) ps.getSavedObject(rowAllocator))",
" .build(activation.getExecutionFactory());",
"",
" (FormatableBitSet) ps.getSavedObject(erdNumber);"
],
"header": "@@ -103,14 +104,16 @@ class WindowResultSet extends NoPutResultSetImpl",
"removed": [
" this.row = rowAllocator;",
" this.allocatedRow = null;",
" (FormatableBitSet)(activation.getPreparedStatement().",
" getSavedObject(erdNumber));"
]
},
{
"added": [
" private ExecRow getAllocatedRow() throws StandardException {"
],
"header": "@@ -316,13 +319,7 @@ class WindowResultSet extends NoPutResultSetImpl",
"removed": [
" private ExecRow getAllocatedRow()",
" throws StandardException {",
"",
" if (allocatedRow == null) {",
" allocatedRow = (ExecRow) row.invoke(activation);",
" }",
""
]
}
]
}
] |
derby-DERBY-6006-576d3b75
|
DERBY-6006: NullPointerException in INSERT INTO ... SELECT FROM ... ORDER BY
A NormalizeResultSet should not expose generated ORDER BY columns to
its parent.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1417991 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6009-49300a73
|
DERBY-6009 Need stricter checking of ORDER BY clause in VALUES expressions
This patch, derby-6009c, improves on the restriction that ORDER BY for
VALUES be limited to column numbers (SQL-92 style) only. It should now
give an understandable error message if anything else is tried. It
adds a new error message, "4287B" and test cases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1428160 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrderByList.java",
"hunks": [
{
"added": [
" /**",
" * {@code true} if this instance orders a",
" * {@literal <table value constructor>}.",
" * See {@link #isTableValueCtorOrdering}.",
" */",
" private boolean isTableValueCtorOrdering;",
"",
" /**",
" * Initialize with the type of the result set this {@code OrderByList} is",
" * attached to, e.g. {@code SELECT}, {@code VALUES} or a set operation.",
" * @param rs The result set this {@code OrderByList} is ordering.",
" */",
" public void init(Object rs) {",
" this.isTableValueCtorOrdering =",
" (rs instanceof UnionNode &&",
" ((UnionNode)rs).tableConstructor()) ||",
" rs instanceof RowResultSetNode;",
" }",
""
],
"header": "@@ -78,6 +78,25 @@ public class OrderByList extends OrderedColumnList",
"removed": []
}
]
}
] |
derby-DERBY-6011-af2d9d28
|
DERBY-6011: Prefer unique index when accessing a small number of rows
If there is a choice between accessing a table with a unique index scan
that is guaranteed to return at most one row, and some other non-covering
index scan that might return multiple rows, adjust the cost of the other
scan so that it includes the cost of fetching at least one row from the
base table.
This change makes it more likely that the unique index is chosen if both
of the index scans are believed to return no more than one row on average.
The unique index is the safer choice since it is guaranteed to return at
most one row. The other index may in the worst case return many rows,
which requires more locking and increases the likelihood of deadlocks.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1442554 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" * <p>",
" * Estimate the cost of scanning this {@code FromBaseTable} using the",
" * given predicate list with the given conglomerate.",
" * </p>",
" *",
" * <p>",
" * If the table contains little data, the cost estimate might be adjusted",
" * to make it more likely that an index scan will be preferred to a table",
" * scan, and a unique index will be preferred to a non-unique index. Even",
" * though such a plan may be slightly suboptimal when seen in isolation,",
" * using indexes, unique indexes in particular, needs fewer locks and",
" * allows more concurrency.",
" * </p>",
" *"
],
"header": "@@ -896,6 +896,20 @@ public class FromBaseTable extends FromTable",
"removed": []
},
{
"added": [
"",
" // The estimated row count is always 1 here, although the",
" // index scan may actually return 0 rows, depending on whether",
" // or not the predicates match a key. It is assumed that a",
" // match is more likely than a miss, hence the row count is 1.",
"",
" // Note (DERBY-6011): Alternative (non-unique) indexes may come",
" // up with row counts lower than 1 because they multiply with",
" // the selectivity, especially if the table is almost empty.",
" // This makes the optimizer prefer non-unique indexes if there",
" // are not so many rows in the table. We still want to use the",
" // unique index in that case, as the performance difference",
" // between the different scans on a small table is small, and",
" // the unique index is likely to lock fewer rows and reduce",
" // the chance of deadlocks. Therefore, we compensate by",
" // making the row count at least 1 for the non-unique index.",
" // See reference to DERBY-6011 further down in this method.",
""
],
"header": "@@ -1060,6 +1074,24 @@ public class FromBaseTable extends FromTable",
"removed": []
}
]
}
] |
derby-DERBY-6012-cf2526ea
|
DERBY-6012: Print thread dump and dump javacore if NetworkServerTestSetup has to kill off the Network Server start up process due to timeout
Incremental improvement for error reporting in the case of timeouts.
Patch file: derby-6012-1a-error_reporting.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448941 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java",
"hunks": [
{
"added": [
" String msg = getTimeoutErrorMsg(\"network server to start\");"
],
"header": "@@ -211,7 +211,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" String msg = \"Timed out waiting for network server to start\";"
]
},
{
"added": [
" fail(msg + Utilities.NL + ExceptionUtil.dumpThreads());"
],
"header": "@@ -219,10 +219,9 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" fail(msg);",
" fail(ExceptionUtil.dumpThreads());"
]
},
{
"added": [
" getTimeoutErrorMsg(\"server port to become available\"),"
],
"header": "@@ -255,8 +254,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" \"Timed out waiting for server port \" + port +",
" \" to become available on host \" + conf.getHostName(),"
]
},
{
"added": [
" fail(getTimeoutErrorMsg(\"network server to start\"));"
],
"header": "@@ -564,7 +562,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" fail(\"Timed out waiting for network server to start\");"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/Utilities.java",
"hunks": [
{
"added": [
" /** The newline character(s). */",
" public static final String NL;",
" static {",
" NL = BaseTestCase.getSystemProperty(\"line.separator\");",
" }",
""
],
"header": "@@ -40,6 +40,12 @@ import junit.framework.Assert;",
"removed": []
}
]
}
] |
derby-DERBY-6017-39001146
|
DERBY-6017: IN lists with mixed types may return wrong results
Make the test check numeric values rather than the string
representation of the values. This should make the test less likely
to fail if the string representation of floating point numbers is
different on a platform.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1450695 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6017-4d09732d
|
DERBY-6017: IN lists with mixed types may return wrong results
Cast the left operand to the dominant type if it isn't already of
that type. This ensures the dominant type is always used in all the
comparison operations when evaluating an IN predicate.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448025 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/InListOperatorNode.java",
"hunks": [
{
"added": [
"",
" // DERBY-6017: All comparisons have to be performed using the dominant",
" // type of *all* the values in the left operand and the right operand.",
" // If either the left operand is of the dominant type, or all of the",
" // values in the right operand are of the dominant type, we know that",
" // each comparison will be performed using the dominant type.",
" // Otherwise, cast the left operand to the dominant type to ensure",
" // that each comparison operation will use the dominant type.",
" DataTypeDescriptor targetType = getDominantType();",
" int targetTypePrecedence = targetType.getTypeId().typePrecedence();",
" if ((leftOperand.getTypeServices().getTypeId().typePrecedence() !=",
" targetTypePrecedence) &&",
" !rightOperandList.allSamePrecendence(targetTypePrecedence)) {",
" CastNode cn = (CastNode) getNodeFactory().getNode(",
" C_NodeTypes.CAST_NODE,",
" leftOperand,",
" targetType,",
" getContextManager());",
" cn.bindCastNodeOnly();",
" leftOperand = cn;",
" }",
"",
" if ((leftOperand instanceof ColumnReference) &&"
],
"header": "@@ -150,7 +150,29 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": [
"\t\telse if ((leftOperand instanceof ColumnReference) &&"
]
},
{
"added": [
"\t\t\t\t/* Now sort the list in ascending order using the dominant"
],
"header": "@@ -235,27 +257,8 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": [
"\t\t\t\tDataTypeDescriptor targetType = leftOperand.getTypeServices();",
"\t\t\t\tTypeId judgeTypeId = targetType.getTypeId();",
"",
"\t\t\t\tif (!rightOperandList.allSamePrecendence(",
"\t\t\t\t\tjudgeTypeId.typePrecedence()))",
"\t\t\t\t{",
"\t\t\t\t\t/* Iterate through the entire list of values to find out",
"\t\t\t\t\t * what the dominant type is.",
"\t\t\t\t\t */",
"\t\t\t\t\tClassFactory cf = getClassFactory();",
"\t\t\t\t\tint sz = rightOperandList.size();",
"\t\t\t\t\tfor (int i = 0; i < sz; i++)",
"\t\t\t\t\t{",
"\t\t\t\t\t\tValueNode vn = (ValueNode)rightOperandList.elementAt(i);",
"\t\t\t\t\t\ttargetType =",
"\t\t\t\t\t\t\ttargetType.getDominantType(",
"\t\t\t\t\t\t\t\tvn.getTypeServices(), cf);",
"\t\t\t\t\t}",
"\t\t\t\t}",
"\t\t\t\t/* Now wort the list in ascending order using the dominant"
]
},
{
"added": [],
"header": "@@ -279,27 +282,6 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": [
" int judgePrecedence = judgeODV.typePrecedence();",
" int leftPrecedence = leftOperand.getTypeServices()",
" .getTypeId().typePrecedence();",
" if (leftPrecedence != judgePrecedence &&",
" minODV.typePrecedence() != judgePrecedence) {",
" // DERBY-6017: If neither the minimum value nor the",
" // left operand is of the dominant type, cast the",
" // minimum value to the dominant type. Otherwise, the",
" // equals operation will be performed using a different",
" // type, which may not have the same ordering as the",
" // type used to sort the list, and it could produce",
" // unexpected results.",
" CastNode cn = (CastNode) getNodeFactory().getNode(",
" C_NodeTypes.CAST_NODE,",
" minValue,",
" targetType,",
" getContextManager());",
" cn.bindCastNodeOnly();",
" minValue = cn;",
" }",
""
]
}
]
}
] |
derby-DERBY-6022-092cf8b2
|
DERBY-6022: Add a system procedure for (un)registering optional packages of tools.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1427859 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
" TypeDescriptor varchar32672Type = DataTypeDescriptor.getCatalogType( Types.VARCHAR, 32672 );"
],
"header": "@@ -13392,6 +13392,7 @@ public final class\tDataDictionaryImpl",
"removed": []
}
]
}
] |
derby-DERBY-6022-25959e32
|
DERBY-6022: Add ability to load/unload custom tool packages via syscs_util.syscs_register_tool().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1431526 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/catalog/Java5SystemProcedures.java",
"hunks": [
{
"added": [
" /** Generic name for all user-supplied tools: the first optional arg is the tool class name */",
" private static final String CUSTOM_TOOL_CLASS_NAME = \"customTool\";",
""
],
"header": "@@ -50,6 +50,9 @@ public class Java5SystemProcedures",
"removed": []
},
{
"added": [
" { \"databaseMetaData\", \"org.apache.derby.impl.tools.optional.DBMDWrapper\" },",
" { \"foreignViews\", \"org.apache.derby.impl.tools.optional.ForeignDBViews\" },"
],
"header": "@@ -59,8 +62,8 @@ public class Java5SystemProcedures",
"removed": [
" { \"dbmd\", \"org.apache.derby.impl.tools.optional.DBMDWrapper\" },",
" { \"fdbv\", \"org.apache.derby.impl.tools.optional.ForeignDBViews\" },"
]
},
{
"added": [
" * Load or unload an optional tool package. If the tool name is the special",
" * CUSTOM_TOOL_CLASS_NAME tool, then the first optionalArg is the name",
" * of a user-supplied class which implements OptionalTool."
],
"header": "@@ -71,7 +74,9 @@ public class Java5SystemProcedures",
"removed": [
" * Load or unload an optional tool package."
]
},
{
"added": [
" String toolClassName = findToolClassName( toolName, optionalArgs ); "
],
"header": "@@ -90,7 +95,7 @@ public class Java5SystemProcedures",
"removed": [
" String toolClassName = findToolClassName( toolName ); "
]
}
]
}
] |
derby-DERBY-6022-e081c856
|
DERBY-6022: Add optional tool for bulk-importing data from foreign databases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1431041 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6022-f96fbeb2
|
DERBY-6022: Add filename argument to the optional tool which turns off optimizer tracing, so that the trace can be dumped to a file.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1456579 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/db/OptimizerTrace.java",
"hunks": [
{
"added": [
"import java.sql.SQLException;",
""
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java",
"hunks": [
{
"added": [
"import java.io.FileWriter;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
" * Dump the optimizer trace and turn off tracing. Takes optional parameters:",
" *",
" * <ul>",
" * <li><b>fileName</b> - Where to write the optimizer trace. If omitted, the trace is written to System.out.</li>",
" * </ul>",
" String trace = OptimizerTrace.getOptimizerTraceOutput();",
" if ( trace == null ) { trace = \"\"; }",
"",
" OptimizerTrace.nullifyTrace();",
" ",
" if (",
" (configurationParameters != null) &&",
" (configurationParameters.length > 0)",
" )",
" {",
" try {",
" FileWriter writer = new FileWriter( configurationParameters[ 0 ] );",
"",
" writer.write( trace );",
" writer.flush();",
" writer.close();",
" } catch (Exception e) { throw wrap( e ); }",
" }",
" else",
" {",
" System.out.println( trace );",
" }",
" ////////////////////////////////////////////////////////////////////////",
" //",
" //\tMINIONS",
" //",
" ////////////////////////////////////////////////////////////////////////",
"",
" /** Wrap an exception in a SQLException */",
" private SQLException wrap( Throwable t )",
" {",
" return new SQLException( t.getMessage(), t );",
" }"
],
"header": "@@ -74,16 +75,52 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": [
" * Dump the optimizer trace and turn off tracing.",
" System.out.println( OptimizerTrace.getOptimizerTraceOutput() );"
]
}
]
}
] |
derby-DERBY-6022-fbf52ee4
|
DERBY-6022: Fix NPE when resolving a function/aggregate name in a schema which hasn't been created yet.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1434363 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6025-0d23c0d8
|
DERBY-6025(Wrong results with IN lists and indexes in territory based collation)
Basically, when all the elements in the inlist are not all constants, then we can not figure out at compile time the minimum and maximum values in the list. Mimimum and maximum values in the in list are required to be passed as start and stop keys if compiler decides to use an index for the inlist predicate. Since these can not be determined at compile time for non constant elements, InListOperatorNoce.generateStartStopKey ends up generating code which will run at execution time of the query and at that time, we will compare the values of the individual elements in the in list to determine the minimum and maximum values. The porblem is that currently, Derby does not pass the collation information of the left operand of the inlist to execution time and because of that, we end up doing English comparison of the values rather than terriroty based comparison in case of territory based database. The fix is to have InListOperatorNoce.generateStartStopKey generate code to pass collation information also. This way, we will do collation based comparison of in list elements in case of territory based database. I have run the reproducible case from jira against my changes and the query now returns correct row. I have run derbyall against the changes and it finished with no errors. The junit suite is running into following 3 failures but I have verified that those 3 failures happen without my changes too. So I will assume that these failures are not caused by my changes. The failures are copied below.
There were 3 failures:
1) testStartNetworkServerLogMessageOnDualStart(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest)junit.framework.AssertionFailedError: did not find the expected string: An exception was thrown during network server startup within the maximum wait time 240000
at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest.testStartNetworkServerLogMessageOnDualStart(DerbyNetAutoStartTest.java:272)
2) test_5391(org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest)junit.framework.AssertionFailedError
at org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest.vetTimestamp(SysDiagVTIMappingTest.java:933)
3) test_5391(org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest)junit.framework.AssertionFailedError
at org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest.vetTimestamp(SysDiagVTIMappingTest.java:933)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1574565 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/InListOperatorNode.java",
"hunks": [
{
"added": [
"\t\t * We found in DERBY-6025(Wrong results with IN lists and indexes in ",
"\t\t * territory based collation) that we need to make sure that we also",
"\t\t * left operand's collation information with Judge object. The reason",
"\t\t * we are sending precision/scale etc along with type id and collation",
"\t\t * information is that DataTypeDescriptor constructor requires all",
"\t\t * those properties too along with the collation information.",
"\t\tint leftPrecision = leftOperand.getTypeServices().getPrecision();",
"\t\tint leftScale = leftOperand.getTypeServices().getScale();",
"\t\tboolean leftIsNullable = leftOperand.getTypeServices().isNullable();",
"\t\tint leftMaximumWidth = leftOperand.getTypeServices().getMaximumWidth();",
"\t\tint leftCollationType = leftOperand.getTypeServices().getCollationType();",
"\t\tint leftCollationDerivation = leftOperand.getTypeServices().getCollationDerivation();"
],
"header": "@@ -677,8 +677,20 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\tmb.push(leftPrecision);",
"\t\t\tmb.push(leftScale);",
"\t\t\tmb.push(leftIsNullable);",
"\t\t\tmb.push(leftMaximumWidth);",
"\t\t\tmb.push(leftCollationType);",
"\t\t\tmb.push(leftCollationDerivation);"
],
"header": "@@ -728,6 +740,12 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/BaseExpressionActivation.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.types.DataTypeDescriptor;"
],
"header": "@@ -23,6 +23,7 @@ package org.apache.derby.impl.sql.execute;",
"removed": []
},
{
"added": [
"\t * @param judgePrecision\t\tprecision of the judge",
"\t * @param judgeScale\t\t scale of the judge",
"\t * @param judgeIsNullable\t\tnullability of the judge",
"\t * @param judgeMaximumWidth\t\tmaximum width of the judge",
"\t * @param judgeCollationType\tcollation type of the judge",
"\t * @param judgeCollationDerivation\t\tcollation derivation of the judge",
"\t * @return\tThe minimum value of the 4. ",
"\t\t\t\t\t\t\t\t\t\t\t int judgeUserJDBCTypeId,",
"\t\t\t\t\t\t\t\t\t\t\t int judgePrecision,",
"\t\t\t\t\t\t\t\t\t\t\t int judgeScale,",
"\t\t\t\t\t\t\t\t\t\t\t boolean judgeIsNullable,",
"\t\t\t\t\t\t\t\t\t\t\t int judgeMaximumWidth,",
"\t\t\t\t\t\t\t\t\t\t\t int judgeCollationType,",
"\t\t\t\t\t\t\t\t\t\t\t int judgeCollationDerivation)",
" \tjudge = new DataTypeDescriptor(",
" \t\t\tnew TypeId(judgeTypeFormatId, null),",
" \t\t\tjudgePrecision,judgeScale,judgeIsNullable,",
" \t\t\tjudgeMaximumWidth,judgeCollationType,",
" \t\t\tjudgeCollationDerivation).getNull();"
],
"header": "@@ -67,21 +68,37 @@ public abstract class BaseExpressionActivation",
"removed": [
"\t * @return\tThe minimum value of the 4.",
"\t\t\t\t\t\t\t\t\t\t\t int judgeUserJDBCTypeId)",
" judge = new TypeId(judgeTypeFormatId, null).getNull();"
]
}
]
}
] |
derby-DERBY-6030-35d6658f
|
DERBY-6030: Length of escape string in LIKE ... ESCAPE not properly checked with territory based collation
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1431259 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6033-99d9d5c2
|
DERBY-6033: Lift the arbitrary limit on the number of routine parameters
Test that stored procedures can have as many parameters as the Java
specification allows.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1428775 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6033-c87505f3
|
DERBY-6033: Remove the arbitrary limit on the number of parameters allowed for a Derby routine.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1428567 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6036-431cbeb5
|
DERBY-6036: Add a test case to verify that restrictions are pushed through views even though projections aren't.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1430957 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6038-ac5abd96
|
DERBY-6038: Intermittent failure in LangProcedureTest: cannot drop table because of open ResultSet
Explicitly close the non-dynamic result set in the regression test case
for DERBY-3304. Also update the comments to reflect that DERBY-3304 only
affected the internal CallStatementResultSet and its dynamic result sets.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1431945 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6039-1381e706
|
DERBY-6039: Intermittent failure in LangProcedureTest.testDynamicResultSets: Table/View 'T1' does not exist.
Let testDynamicResultSets() create its own test table, rather than
relying on one created by another test case. Removes dependency on
test case ordering.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1431948 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6040-a8dfc0a0
|
DERBY-6040: Fix sort order bug when selecting a partial column list from a table function.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1433031 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromVTI.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.DefaultInfo;"
],
"header": "@@ -34,6 +34,7 @@ import java.util.Enumeration;",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.types.DataValueDescriptor;"
],
"header": "@@ -62,6 +63,7 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" * Return the just-added column.",
" public ResultColumn addColumn( TableName tableName, String columnName, DataTypeDescriptor dts )"
],
"header": "@@ -3466,9 +3466,10 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
" public void addColumn( TableName tableName, String columnName, DataTypeDescriptor dts )"
]
}
]
}
] |
derby-DERBY-6041-f6fea403
|
DERBY-6041: Remove unused parameters from the BTreeLockingPolicy interface
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1433331 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java",
"hunks": [
{
"added": [
" leaf, slot, lock_fetch_desc, template,"
],
"header": "@@ -593,7 +593,7 @@ public class BTreeController extends OpenBTree implements ConglomerateController",
"removed": [
" this.getConglomerate(), leaf, slot, lock_fetch_desc,template, "
]
},
{
"added": [],
"header": "@@ -737,7 +737,6 @@ public class BTreeController extends OpenBTree implements ConglomerateController",
"removed": [
" this.getConglomerate(),"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeForwardScan.java",
"hunks": [
{
"added": [
" this, pos,"
],
"header": "@@ -304,7 +304,7 @@ public class BTreeForwardScan extends BTreeScan",
"removed": [
" this, this.getConglomerate(), pos, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeLockingPolicy.java",
"hunks": [
{
"added": [],
"header": "@@ -114,7 +114,6 @@ public interface BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
},
{
"added": [],
"header": "@@ -131,7 +130,6 @@ public interface BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -202,7 +200,6 @@ public interface BTreeLockingPolicy",
"removed": [
" * @param btree The conglomerate we are locking."
]
},
{
"added": [],
"header": "@@ -226,7 +223,6 @@ public interface BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -291,7 +287,6 @@ public interface BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeMaxScan.java",
"hunks": [
{
"added": [
" this, pos,"
],
"header": "@@ -229,7 +229,7 @@ public class BTreeMaxScan extends BTreeScan",
"removed": [
" this, this.getConglomerate(), pos,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java",
"hunks": [
{
"added": [
" this, pos,"
],
"header": "@@ -432,7 +432,7 @@ public abstract class BTreeScan extends OpenBTree implements ScanManager",
"removed": [
" this, this.getConglomerate(), pos,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2INoLocking.java",
"hunks": [
{
"added": [],
"header": "@@ -132,7 +132,6 @@ public class B2INoLocking implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -177,7 +176,6 @@ public class B2INoLocking implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2IRowLocking1.java",
"hunks": [
{
"added": [],
"header": "@@ -104,7 +104,6 @@ class B2IRowLocking1 extends B2IRowLocking2 implements BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
},
{
"added": [],
"header": "@@ -114,7 +113,6 @@ class B2IRowLocking1 extends B2IRowLocking2 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2IRowLocking3.java",
"hunks": [
{
"added": [],
"header": "@@ -201,7 +201,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" * @param btree The conglomerate we are locking."
]
},
{
"added": [],
"header": "@@ -222,7 +221,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -247,14 +245,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
"",
" if (!(btree instanceof B2I))",
" {",
" SanityManager.THROWASSERT(",
" \"btree not instance of B2I, it is \" +",
" btree.getClass().getName());",
" }",
""
]
},
{
"added": [],
"header": "@@ -351,9 +341,7 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" B2I b2i,",
" int current_slot,"
]
},
{
"added": [],
"header": "@@ -406,7 +394,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" b2i,"
]
},
{
"added": [],
"header": "@@ -520,7 +507,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
},
{
"added": [],
"header": "@@ -534,7 +520,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -546,7 +531,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" B2I b2i = (B2I) btree;"
]
},
{
"added": [],
"header": "@@ -568,7 +552,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" btree,"
]
},
{
"added": [],
"header": "@@ -598,7 +581,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" btree,"
]
},
{
"added": [],
"header": "@@ -697,7 +679,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
},
{
"added": [],
"header": "@@ -707,7 +688,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -720,7 +700,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" btree,"
]
},
{
"added": [],
"header": "@@ -762,7 +741,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -775,11 +753,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" if (SanityManager.DEBUG)",
" {",
" SanityManager.ASSERT(btree instanceof B2I);",
" }",
""
]
},
{
"added": [],
"header": "@@ -788,7 +761,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" btree,"
]
},
{
"added": [
" current_leaf,"
],
"header": "@@ -824,8 +796,7 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" (B2I) btree,",
" current_leaf, current_slot,"
]
},
{
"added": [],
"header": "@@ -889,7 +860,6 @@ class B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2IRowLockingRR.java",
"hunks": [
{
"added": [],
"header": "@@ -80,7 +80,6 @@ class B2IRowLockingRR extends B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" * @param btree the conglomerate info."
]
},
{
"added": [],
"header": "@@ -90,7 +89,6 @@ class B2IRowLockingRR extends B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" BTree btree,"
]
},
{
"added": [],
"header": "@@ -105,7 +103,6 @@ class B2IRowLockingRR extends B2IRowLocking3 implements BTreeLockingPolicy",
"removed": [
" btree,"
]
}
]
}
] |
derby-DERBY-6044-086e8176
|
DERBY-6044: Fix poor word breaking in table on download page(s)
Some browsers break up DERBY-XXXX at the hyphen even though they shouldn't.
Work around this by using a div-element to size the first column of the table.
Patch file: derby-6044-1a-stop_breaking_up_jira_id.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1437872 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/build/org/apache/derbyBuild/GeneratorBase.java",
"hunks": [
{
"added": [
" private static final String COLUMN_HEADER = \"th\";"
],
"header": "@@ -54,6 +54,7 @@ public class GeneratorBase extends Task {",
"removed": []
},
{
"added": [
" /**",
" * Wraps the text content of the given node inside a div tag.",
" *",
" * @param node node currently containing the text",
" * @return The new div-element which has been appended to {@code node}.",
" * @throws DOMException ",
" */",
" private static Element wrapTextContentInDiv(Element node)",
" throws DOMException {",
" Document doc = node.getOwnerDocument();",
" Element div = doc.createElement(DIVISION);",
" div.setTextContent(node.getTextContent());",
" node.setTextContent(\"\");",
" node.appendChild(div);",
" return div;",
" }",
"",
" /**",
" * Sets/overwrites the specified attribute.",
" *",
" * @param node target node",
" * @param name attribute name",
" * @param value attribute value",
" * @throws DOMException ",
" */",
" private static void setAttribute(Element node, String name, String value)",
" throws DOMException {",
" Node attr = node.getOwnerDocument().createAttribute(name);",
" attr.setNodeValue(value);",
"",
" node.getAttributes().setNamedItem(attr);",
" }",
" "
],
"header": "@@ -298,6 +299,39 @@ public class GeneratorBase extends Task {",
"removed": []
},
{
"added": [
" for (String headerText : columnHeadings) {",
" Element headingColumn = insertColumnHeader(headingRow);",
" headingColumn.setTextContent(headerText);",
" /**",
" * Sets the width of the first column in the given table.",
" *",
" * @param table target table",
" * @throws DOMException",
" */",
" protected void fixWidthOfFirstColumn(Element table)",
" throws DOMException {",
" NodeList headers = table.getElementsByTagName(COLUMN_HEADER);",
" // Just fail if someone removes the th-elements.",
" Element th = (Element)headers.item(0);",
" Element div = wrapTextContentInDiv(th);",
" setAttribute(div, \"style\", \"width:110px;\");",
" th.appendChild(div);",
" }",
" "
],
"header": "@@ -517,21 +551,34 @@ public class GeneratorBase extends Task {",
"removed": [
" int count = columnHeadings.length;",
" for (int i = 0; i < count; i++) {",
" Element headingColumn = insertColumn(headingRow);",
" Element boldText = boldText(doc, columnHeadings[i]);",
"",
" headingColumn.appendChild(boldText);"
]
},
{
"added": [
" return insertTableElement(table, ROW);"
],
"header": "@@ -540,12 +587,7 @@ public class GeneratorBase extends Task {",
"removed": [
" Document doc = table.getOwnerDocument();",
" Element row = doc.createElement(ROW);",
"",
" table.appendChild(row);",
"",
" return row;"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java",
"hunks": [
{
"added": [
" // If we don't fix the width of the first column, the string",
" // \"DERBY-XXXX\" is often broken up at the hyphen by some browsers.",
" fixWidthOfFirstColumn(table);"
],
"header": "@@ -332,6 +332,9 @@ public class ReleaseNotesGenerator extends GeneratorBase {",
"removed": []
}
]
}
] |
derby-DERBY-6045-2c5ca3b1
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
These tests are similar to the ones added by revision 1465830 except that here we use parameters in the WHERE clause to pass the constants and check that we are still using index scan
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466097 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-394efd98
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Adding a junit test but it will not run since the the fixture name is not starting with "test"... We should remove the x in front of test fixture's name once DERBY-6045 has been fixed
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1445030 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-4c0bf643
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Adding tow more test fixtures(testDerby6045WithUpdateStatistics and testDerby6045WithoutUpdateStatistics).
Difference between the two fixtures is testDerby6045WithUpdateStatistics issues an update statistics after inserting the required number of rows in the table, where as testDerby6045WithoutUpdateStatistics does not issue an update statisitcs.
The code for them looks as follows
1)Create a brand new table with a primary key
2)Add 10 rows/24 rows/10,000 rows.
3)One of the test fixture(testDerby6045WithUpdateStatistics) will issue an update statistics at this time
4)Run following 3 queries and make sure they all use index scan
SELECT * FROM newTable WHERE TERM_ID = 11
SELECT * FROM newTable WHERE (TERM_ID = 11) OR (TERM_ID =21) OR (TERM_ID = 31)
SELECT * FROM newTable WHERE (TERM_ID IN (11, 21, 31))
5)Drop the table
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465830 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-89166547
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Splitting a junit fixture into two so that we have different tests for table with just primary key and table with primary and unique key. Additionally, got rid of the extra column in the table which is not part of any index to keep things simple and is not impacting the behavior of the queries in question.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1451683 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-aa474ad0
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Adding another junit test which has following 2 test cases(the test is named such that it won't get run for now until we understand the impact of the 2nd unique index on the selection of table scan vs index scan for 10K rows)
// 1)If we insert 10K rows to an empty table with primary key on column
// being used in the where clause, we use index scan for the queries
// being tested
// 2)To the table above, if we add another unique index on 2 columns
// which are being used in the select clause, we stop using index scan
// for SELECT queries with IN and OR clause on the primary key
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1450363 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-ce5c7630
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Commiting a test showing that we use index scan for DELETE statement on a table with appropriate indexes. This happens with or without update statistics and with or without parameterized statement.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479607 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6045-d89ca1f7
|
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)
Added a new test scenario where we add about 10K rows into a table with primary key and check if we are still using index scan for the queries being tested
Additionally, cleaned up the test a little bit.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1446048 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6047-615cb37c
|
DERBY-6047: Fix NPE in routine resolution introduced by work on DERBY-3069.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1435267 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
"\t\t\tRoutineAliasInfo rai = (RoutineAliasInfo) proc.getAliasInfo();",
"\t\t\tint parameterCount = rai.getParameterCount();",
" boolean hasVarargs = rai.hasVarargs();"
],
"header": "@@ -512,9 +512,9 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\tRoutineAliasInfo routineInfo = (RoutineAliasInfo) proc.getAliasInfo();",
"\t\t\tint parameterCount = routineInfo.getParameterCount();",
" boolean hasVarargs = routineInfo.hasVarargs();"
]
},
{
"added": [
"\t\t\tTypeDescriptor[] parameterTypes = rai.getParameterTypes();",
"\t\t\tif (rai.getMaxDynamicResultSets() > 0)"
],
"header": "@@ -528,10 +528,10 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\tTypeDescriptor[] parameterTypes = routineInfo.getParameterTypes();",
"\t\t\tif (routineInfo.getMaxDynamicResultSets() > 0)"
]
},
{
"added": [
"\t\t\t\tint parameterMode = rai.getParameterModes()[ getRoutineArgIdx( rai, p ) ];"
],
"header": "@@ -547,7 +547,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\t\tint parameterMode = routineInfo.getParameterModes()[ getRoutineArgIdx( routineInfo, p ) ];"
]
},
{
"added": [
" rai,"
],
"header": "@@ -609,6 +609,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": []
},
{
"added": [
" rai,"
],
"header": "@@ -620,6 +621,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": []
},
{
"added": [
"\t\t\tthis.routineInfo = rai;"
],
"header": "@@ -641,7 +643,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\tthis.routineInfo = routineInfo;"
]
},
{
"added": [
" Vector aggregateVector,",
" RoutineAliasInfo rai,"
],
"header": "@@ -675,7 +677,8 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" Vector aggregateVector, "
]
}
]
}
] |
derby-DERBY-6053-0b963b2b
|
DERBY-6053(Client should use a prepared statement rather than regular statement for Connection.setTransactionIsolation)
Use prepared statements rather than regular statement to change the isolation level in client server mode. This will be better for performance and will also avoid possible garbage collection issues.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1442474 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
" //prepared statements associated with isolation level change are stored ",
" // in isolationLevelPreparedStmts",
" private Hashtable isolationLevelPreparedStmts = new Hashtable();"
],
"header": "@@ -91,8 +91,9 @@ public abstract class Connection",
"removed": [
" // used to set transaction isolation level",
" private Statement setTransactionIsolationStmt = null;"
]
},
{
"added": [
"",
" //Close prepared statements associated with isolation level change",
" if (isolationLevelPreparedStmts != null) {",
" PreparedStatement ps;",
" for (Iterator<PreparedStatement> it = isolationLevelPreparedStmts.keySet().iterator();",
" it.hasNext(); ) {",
" try {",
" Object key = it.next();",
" ps = (PreparedStatement)isolationLevelPreparedStmts.get(key);",
" ps.close();",
" ps = null;",
" } catch (SQLException se) {",
" accumulatedExceptions = Utils.accumulateSQLException(",
" se, accumulatedExceptions);",
" }",
" isolationLevelPreparedStmts.clear();"
],
"header": "@@ -789,14 +790,24 @@ public abstract class Connection",
"removed": [
" if (setTransactionIsolationStmt != null) {",
" try {",
" setTransactionIsolationStmt.close();",
" } catch (SQLException se) {",
" accumulatedExceptions = se;",
" setTransactionIsolationStmt = null;"
]
},
{
"added": [
" //If we do not already have a prepared statement for the requested",
" // isolation level change, then create one",
" PreparedStatement ps = (PreparedStatement)isolationLevelPreparedStmts.get(levelString);",
" if (ps == null || !ps.openOnClient_) {",
" ps = prepareStatementX(",
" \"SET CURRENT ISOLATION = \" + levelString,",
" java.sql.ResultSet.TYPE_FORWARD_ONLY,",
" java.sql.ResultSet.CONCUR_READ_ONLY,",
" holdability(),",
" java.sql.Statement.NO_GENERATED_KEYS,",
" null, null);",
" isolationLevelPreparedStmts.put(levelString, ps);",
" //Execute the prepared statement to change the isolation level",
" ps.execute();"
],
"header": "@@ -1008,18 +1019,22 @@ public abstract class Connection",
"removed": [
" if (setTransactionIsolationStmt == null ||",
" !(setTransactionIsolationStmt.openOnClient_ &&",
" setTransactionIsolationStmt.openOnServer_)) {",
" setTransactionIsolationStmt =",
" createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY,",
" java.sql.ResultSet.CONCUR_READ_ONLY,",
" holdability());",
"",
" setTransactionIsolationStmt.executeUpdate(",
" \"SET CURRENT ISOLATION = \" + levelString);"
]
}
]
}
] |
derby-DERBY-6053-c7f0048d
|
DERBY-6053 (Client should use a prepared statement rather than regular statement for Connection.setTransactionIsolation)
Sinnce Connection object is already synchronized, no need to use synchronized Hashtable, instead us HashMap.
Also parameterize HashMap object declaration for easier usage and tighter type checking by the compiler.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1443599 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
"import java.util.HashMap;"
],
"header": "@@ -23,6 +23,7 @@ package org.apache.derby.client.am;",
"removed": []
},
{
"added": [
" final private HashMap<String, PreparedStatement> ",
" isolationLevelPreparedStmts = ",
" new HashMap<String, PreparedStatement>();"
],
"header": "@@ -93,7 +94,9 @@ public abstract class Connection",
"removed": [
" private Hashtable isolationLevelPreparedStmts = new Hashtable();"
]
},
{
"added": [
" for (PreparedStatement ps : isolationLevelPreparedStmts.values() ) {",
" try {",
" ps.close();",
" } catch (SQLException se) {",
" accumulatedExceptions = Utils.accumulateSQLException(",
" se, accumulatedExceptions);",
" isolationLevelPreparedStmts.clear();"
],
"header": "@@ -792,22 +795,15 @@ public abstract class Connection",
"removed": [
" if (isolationLevelPreparedStmts != null) {",
" PreparedStatement ps;",
" for (Iterator<PreparedStatement> it = isolationLevelPreparedStmts.keySet().iterator();",
" it.hasNext(); ) {",
" try {",
" Object key = it.next();",
" ps = (PreparedStatement)isolationLevelPreparedStmts.get(key);",
" ps.close();",
" ps = null;",
" } catch (SQLException se) {",
" accumulatedExceptions = Utils.accumulateSQLException(",
" se, accumulatedExceptions);",
" }",
" isolationLevelPreparedStmts.clear();"
]
}
]
}
] |
derby-DERBY-606-f824190b
|
DERBY-606 : SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE fails on (very) large tables
Patch Contributed by Mayuresh Nirhali.
Problem was when Allocated Extent associated with last allocated page is being
compressed, All the pages are found to be free, thus new_highest_page is set to
'-1'. Now, when the CompressSpaceOperation is being logged
CompressedNumber.writeInt method is called with value -1. This method is
written to throw exception if the value is less than Zero, hence the
IOException occurs.
This patch addresses the problem by modifying compress
log record to write the new Highest Page as an uncompressed number,
if the database is created/hard-upgrade to 10.3. A new Compress Log
Record Class is created that will read/write new_highest_page in compressed
format as before 10.3. Old version of compress log Operation is used on
recovery, if the log record needs to be replayed on upgrade
from old-version of the database and also on soft-upgrade to 10.3.
Test cases for this bug are added to the existing OnlineCompressTest.java
test and to the upgrade test .
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@484797 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java",
"hunks": [
{
"added": [
"\t\t/* 454 */ \"org.apache.derby.impl.store.raw.data.CompressSpacePageOperation10_2\","
],
"header": "@@ -515,7 +515,7 @@ String[] TwoByte = {",
"removed": [
"\t\t/* 454 */ \"org.apache.derby.impl.store.raw.data.CompressSpacePageOperation\","
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java",
"hunks": [
{
"added": [
"\t\t/* org.apache.derby.impl.store.raw.data.CompressSpacePageOperation10_2 */",
" public static final int LOGOP_COMPRESS10_2_SPACE =",
"\t/* org.apache.derby.impl.store.raw.data.CompressSpacePageOperation */",
" public static final int LOGOP_COMPRESS_SPACE =",
" (MIN_ID_2 + 465);",
""
],
"header": "@@ -1728,10 +1728,14 @@ public interface StoredFormatIds {",
"removed": [
"\t\t/* org.apache.derby.impl.store.raw.data.CompressSpacePageOperation */",
" public static final int LOGOP_COMPRESS_SPACE ="
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.raw.log.LogFactory;"
],
"header": "@@ -32,6 +32,7 @@ import org.apache.derby.iapi.store.raw.Loggable;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/CompressSpacePageOperation.java",
"hunks": [
{
"added": [
"public class CompressSpacePageOperation extends PhysicalPageOperation"
],
"header": "@@ -50,7 +50,7 @@ it to the operating system.",
"removed": [
"public final class CompressSpacePageOperation extends PhysicalPageOperation"
]
},
{
"added": [
"\t\tif( !(this instanceof CompressSpacePageOperation10_2) )",
"\t\t{",
"\t\t\tout.writeInt(newHighestPage);",
"\t\t\tCompressedNumber.writeInt(out, num_pages_truncated);",
"\t\t}"
],
"header": "@@ -100,8 +100,11 @@ public final class CompressSpacePageOperation extends PhysicalPageOperation",
"removed": [
"\t\tCompressedNumber.writeInt(out, newHighestPage);",
"\t\tCompressedNumber.writeInt(out, num_pages_truncated);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/LoggableAllocActions.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.raw.RawStoreFactory;"
],
"header": "@@ -24,6 +24,7 @@ package org.apache.derby.impl.store.raw.data;",
"removed": []
}
]
}
] |
derby-DERBY-6060-7b5f9648
|
DERBY-6060 Fix Javadoc for UpgradeTrajectoryTest dangling reference
Patch derby-6060, class javadoc fixes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1441313 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6063-8072e989
|
DERBY-6063: Access static variables by class name in TabInfoImpl, InsertResultSet and ControlRow
Replaced occurrences of accessing static variables via instances with access via class names.
Removed unused meothod in ControlRow.
Removed a few unused local variables.
Patch file: derby-6063-1a_statics-by-class_and_unused_method.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1441396 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -920,7 +920,6 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\tboolean\tfirstDeferredRow = true;"
]
},
{
"added": [
" // doesn't matter, already locked",
" TransactionController.MODE_TABLE,",
" // doesn't matter, already locked",
" TransactionController.ISOLATION_READ_COMMITTED,"
],
"header": "@@ -1566,10 +1565,10 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
" tc.MODE_TABLE,\t\t\t\t // doesn't matter, ",
" // already locked",
" tc.ISOLATION_READ_COMMITTED, // doesn't matter, ",
" // already locked"
]
},
{
"added": [
" TransactionController.MODE_TABLE :",
" TransactionController.MODE_RECORD,",
" // read committed is good enough",
" TransactionController.ISOLATION_READ_COMMITTED,"
],
"header": "@@ -1619,10 +1618,10 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\t\t\t\t\ttc.MODE_TABLE :",
"\t\t\t\t\t\t\t\ttc.MODE_RECORD,",
"\t\t\t\t\t\ttc.ISOLATION_READ_COMMITTED,\t// read committed is ",
" // good enough"
]
},
{
"added": [],
"header": "@@ -1938,7 +1937,6 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\tDataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/ControlRow.java",
"hunks": [
{
"added": [
" new SQLLongint(ContainerHandle.INVALID_PAGE_NUMBER);",
" new SQLLongint(ContainerHandle.INVALID_PAGE_NUMBER);",
" ContainerHandle.INVALID_PAGE_NUMBER : "
],
"header": "@@ -318,14 +318,14 @@ public abstract class ControlRow implements AuxObject, TypedFormat",
"removed": [
" new SQLLongint(btree.container.INVALID_PAGE_NUMBER);",
" new SQLLongint(btree.container.INVALID_PAGE_NUMBER);",
" btree.container.INVALID_PAGE_NUMBER : "
]
},
{
"added": [],
"header": "@@ -785,23 +785,6 @@ public abstract class ControlRow implements AuxObject, TypedFormat",
"removed": [
" /**",
" * Set the conglomerate field in the btree.",
" * <p>",
" * Sets the btree field of the control row. Updates just the disk copy. ",
" *",
"\t * @exception StandardException Standard exception policy.",
" **/",
"\tprivate void setConglom(BTree btree)",
"\t\tthrows StandardException",
"\t{",
"\t\t// Store the field. Delay faulting value into object until getConlgom()",
" // call, which in general only happens during recovery.",
"",
"\t\t// Write the field through to the underlying row.",
"\t\tthis.page.updateFieldAtSlot(CR_SLOT, CR_CONGLOM_COLID, btree, null);",
"\t}",
""
]
}
]
}
] |
derby-DERBY-6064-6be56bc9
|
DERBY-6064: Failures in upgradeTests.Changes10_9 related to index cardinality statistics
Added logic to adjust asserts based on the version of the old database.
The fix affecting the tests is in the released 10.8.3-version of Derby, and
the fix has been backported to older branches back to 10.3.
Patch file: derby-6064-1a-istat_upgrade_test_fixes.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1441923 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/DerbyVersion.java",
"hunks": [
{
"added": [
" public static final DerbyVersion _10_9 = new DerbyVersion(10,9,0,0);"
],
"header": "@@ -40,6 +40,7 @@ public class DerbyVersion",
"removed": []
},
{
"added": [
" /** 10.8.3.0 (November 16, 2012/ SVN 1405108) */",
" public static final DerbyVersion _10_8_3_0 = new DerbyVersion(10,8,3,0);",
" /** 10.9.1.0 (June 25, 2012/ SVN 1344872) */",
" public static final DerbyVersion _10_9_1_0 = new DerbyVersion(10,9,1,0);"
],
"header": "@@ -77,6 +78,10 @@ public class DerbyVersion",
"removed": []
}
]
}
] |
derby-DERBY-6066-45a82041
|
DERBY-6066(Client should use a prepared statement rather than regular statement for Connection.getTransactionIsolation)
This commit has the client user a PreparedStatement rather than a Statement to get the current isolation level.
Additionally, we found while working on this issue, that the calls to get isolation level were not always getting sent to the server side. The research on this found following
The get transaction isolation call will be sent to the server on the wire in at least following 2 cases
1)When a newer client is working with the older versions of servers(ie server that do not have support for isolation level caching) - Server version 10.3 and earlier do not support isolation level caching and hence when a newer client(10.4 and higher) is talking to a 10.3 and earlier server, there will be no information available about the current isolation level on the client side and client will ask for the isolation level from the server by sending "VALUES CURRENT ISOLATION" over the wire.
For server versions 10.4 and above, there is a possibility that the current isolation level was already piggybacked to the client as part of some other client server communication and hence the current isolation level is already available to the client and there is no need to send "VALUES CURRENT ISOLATION" over the wire to the server.
2)Additionally, as per DERBY-4314 and write up on piggybacking at http://wiki.apache.org/db-derby/Derby3192Writeup, there might be cases, where even though server has support for isolation level caching, server has not had a chance to send the isolation level piggybacked to the client as part of some other communication between client and server and hence the client will actually need to send "VALUES CURRENT ISOLATION" to the server to get the current isolation level.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1450499 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
" private PreparedStatement getTransactionIsolationPrepStmt = null;"
],
"header": "@@ -99,7 +99,7 @@ public abstract class Connection",
"removed": [
" private Statement getTransactionIsolationStmt = null;"
]
},
{
"added": [
" if (getTransactionIsolationPrepStmt != null) {",
" getTransactionIsolationPrepStmt.close();",
" getTransactionIsolationPrepStmt = null;"
],
"header": "@@ -804,15 +804,15 @@ public abstract class Connection",
"removed": [
" if (getTransactionIsolationStmt != null) {",
" getTransactionIsolationStmt.close();",
" getTransactionIsolationStmt = null;"
]
},
{
"added": [],
"header": "@@ -1084,7 +1084,6 @@ public abstract class Connection",
"removed": [
" "
]
},
{
"added": [
" // DERBY-6066(Client should use a prepared statement rather than ",
" // regular statement for Connection.getTransactionIsolation)",
" // Following code(which actually sends the get transaction ",
" // isolation call to the server on the wire) will be executed ",
" // in at least following 2 cases",
" // 1)When a newer client is working with the older versions of ",
" // servers(ie server that do not have support for isolation ",
" // level caching) - Server version 10.3 and earlier do not ",
" // support isolation level caching and hence when a newer ",
" // client(10.4 and higher) is talking to a 10.3 and earlier ",
" // server, the if condition above will be false and the code ",
" // will reach here to get the isolation level from the server ",
" // by sending \"VALUES CURRENT ISOLATION\" over the wire. For ",
" // server versions 10.4 and above, the if condition above can ",
" // be true if the isolation level was already piggybacked to ",
" // the client as part of some other client server communication",
" // and hence the current isolation level is already available to ",
" // the client and there is no need to send ",
" // \"VALUES CURRENT ISOLATION\" over the wire to the server.",
" // 2)Additionally, as per DERBY-4314 and write up on piggybacking",
" // at http://wiki.apache.org/db-derby/Derby3192Writeup, there ",
" // might be cases, where even though server has support for ",
" // isolation level caching, server has not had a chance to ",
" // send the isolation level piggybacked to the client as part ",
" // of some other communication between client and server and ",
" // hence the if condition above will be false and client will",
" // actually need to send \"VALUES CURRENT ISOLATION\" to the ",
" // server to get the current isolation level.",
" // "
],
"header": "@@ -1102,6 +1101,35 @@ public abstract class Connection",
"removed": []
},
{
"added": [
" if (getTransactionIsolationPrepStmt == null || ",
" !(getTransactionIsolationPrepStmt.openOnClient_ &&",
" getTransactionIsolationPrepStmt.openOnServer_)) {",
" \tgetTransactionIsolationPrepStmt =",
" prepareStatementX(",
" \"VALUES CURRENT ISOLATION\",",
" java.sql.ResultSet.TYPE_FORWARD_ONLY,",
" holdability(),",
" java.sql.Statement.NO_GENERATED_KEYS,",
" null, null);",
" rs = getTransactionIsolationPrepStmt.executeQuery();"
],
"header": "@@ -1116,17 +1144,21 @@ public abstract class Connection",
"removed": [
" if (getTransactionIsolationStmt == null || ",
" !(getTransactionIsolationStmt.openOnClient_ &&",
" getTransactionIsolationStmt.openOnServer_)) {",
" getTransactionIsolationStmt =",
" createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY,",
" holdability());",
" rs = getTransactionIsolationStmt.executeQuery(\"values current isolation\");"
]
}
]
}
] |
derby-DERBY-6067-1e0c7038
|
DERBY-6067: JaCoCo fails with missing permissions when writing results
Added a "jacoco.active" property, which will grant the required privileges to
JaCoCo (or more specifically, all code bases) when set to the empty string ("").
Enabled logic to disable the security manager when spawning processes and at
the same time obtaining code coverage with JaCoCo.
Added comment in build.xml, explaining what derby.tests.jacoco.agent is for.
Patch file: derby-6067-1b-fix_privileges.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1447388 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java",
"hunks": [
{
"added": [
"",
" static final boolean jacocoEnabled = checkIfJacocoIsRunning();",
" private static boolean checkIfJacocoIsRunning() {",
" return ((Boolean)AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() {",
" if (getURL(\"org.jacoco.agent.rt.RT\") != null) {",
" System.setProperty(\"jacoco.active\", \"\");",
" return Boolean.TRUE;",
" }",
" return Boolean.FALSE;",
" }",
"\t\t})).booleanValue();",
" }",
""
],
"header": "@@ -88,7 +88,20 @@ public final class SecurityManagerSetup extends TestSetup {",
"removed": [
"\t"
]
},
{
"added": [
""
],
"header": "@@ -339,7 +352,7 @@ public final class SecurityManagerSetup extends TestSetup {",
"removed": [
"\t\t"
]
},
{
"added": [
" } catch (NoClassDefFoundError e) {",
" return null;"
],
"header": "@@ -430,6 +443,8 @@ public final class SecurityManagerSetup extends TestSetup {",
"removed": []
}
]
}
] |
derby-DERBY-6073-2a51fce9
|
DERBY-6073: Adjust StatementPoolingTest to account for class names introduced by JDBC 4.2.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1446698 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6073-314a6da0
|
DERBY-6073: Fix StatementPoolingTest bug by making test order deterministic.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1446675 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6073-4a515d83
|
DERBY-6073: Test ordering instability in StatementPoolingTest
ConnectionPoolDataSourceConnector should enable statement pooling
also if the database doesn't already exist.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1447667 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/ConnectionPoolDataSourceConnector.java",
"hunks": [
{
"added": [
"",
" enableStatementPooling(ds);",
"",
" // NOTE: Any other setup of the data source that gets added here,",
" // probably also needs to be added to singleUseDS(). Otherwise, that",
" // setup won't be performed on data sources that are used to create",
" // or shut down a database.",
"",
" }",
"",
" /**",
" * Enable statement pooling on the specified data source.",
" */",
" private static void enableStatementPooling(ConnectionPoolDataSource ds) {"
],
"header": "@@ -51,7 +51,21 @@ public class ConnectionPoolDataSourceConnector implements Connector {",
"removed": []
},
{
"added": [
"",
" // Enable statement pooling by default for single-use data sources",
" // too, just like it's enabled for the default data source in",
" // setConfiguration().",
" enableStatementPooling(sds);",
""
],
"header": "@@ -184,6 +198,12 @@ public class ConnectionPoolDataSourceConnector implements Connector {",
"removed": []
}
]
}
] |
derby-DERBY-6075-09c26978
|
DERBY-6075: Use modern collections in impl/sql/compile
Rename variables from aggregateVector to aggregates.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1459276 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -259,16 +259,14 @@ public class AggregateNode extends UnaryOperatorNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate list being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(",
"\t\t\t\t\tFromList\t\t\tfromList,",
"\t\t\t\t\tSubqueryList\t\tsubqueryList,",
"\t\t\t\t\tList\t\t\t\taggregateVector)"
]
},
{
"added": [
" // Add ourselves to the list of aggregates before we do anything else.",
" aggregates.add(this);"
],
"header": "@@ -320,8 +318,8 @@ public class AggregateNode extends UnaryOperatorNode",
"removed": [
"\t\t/* Add ourselves to the aggregateVector before we do anything else */",
"\t\taggregateVector.add(this);"
]
},
{
"added": [
" bindOperand(fromList, subqueryList, aggregates);"
],
"header": "@@ -329,7 +327,7 @@ public class AggregateNode extends UnaryOperatorNode",
"removed": [
" bindOperand(fromList, subqueryList, aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java",
"hunks": [
{
"added": [
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -196,7 +196,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\tFromList fromList, SubqueryList subqueryList, List aggregateVector)"
]
},
{
"added": [
" fromList, subqueryList, aggregates);",
" fromList, subqueryList, aggregates);"
],
"header": "@@ -205,12 +205,12 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\tfromList, subqueryList, aggregateVector);",
"\t\t\t\tfromList, subqueryList, aggregateVector);"
]
},
{
"added": [
" subqueryList, aggregates);"
],
"header": "@@ -251,7 +251,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\t\tsubqueryList, aggregateVector);"
]
},
{
"added": [
" subqueryList, aggregates);"
],
"header": "@@ -261,7 +261,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\t\tsubqueryList, aggregateVector);"
]
},
{
"added": [
" * @param aggregates List of aggregates to pass on to bindExpression if recast is performed",
" SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -276,13 +276,13 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t * @param aggregateVector AggregateVector to pass on to bindExpression if recast is performed",
"\t SubqueryList subqueryList, List aggregateVector)"
]
},
{
"added": [
" ((ValueNode) thenElseList.elementAt(0)).bindExpression(fromList, subqueryList, aggregates);",
" castType,fromList, subqueryList, aggregates);"
],
"header": "@@ -300,12 +300,12 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t((ValueNode) thenElseList.elementAt(0)).bindExpression(fromList, subqueryList, aggregateVector);",
"\t\t\t castType,fromList, subqueryList, aggregateVector);"
]
},
{
"added": [
" ((ValueNode) thenElseList.elementAt(1)).bindExpression(fromList, subqueryList, aggregates);",
" castType,fromList,subqueryList,aggregates);"
],
"header": "@@ -315,11 +315,11 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t((ValueNode) thenElseList.elementAt(1)).bindExpression(fromList, subqueryList, aggregateVector);",
"\t\t\t castType,fromList,subqueryList,aggregateVector);"
]
},
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -359,15 +359,14 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -376,7 +375,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\taggregateVector);"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -401,7 +400,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\taggregateVector);"
]
},
{
"added": [
" findType(thenElseList, fromList, subqueryList, aggregates),fromList,",
" aggregates);"
],
"header": "@@ -410,9 +409,9 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\tfindType(thenElseList, fromList, subqueryList, aggregateVector),fromList,",
"\t\t\t\t\taggregateVector);"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -521,7 +520,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\t\t\t\t\t\t\t\t\t\taggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes"
],
"header": "@@ -162,7 +162,7 @@ abstract class ConstantNode extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -142,14 +142,13 @@ public class DefaultNode extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,",
"\t\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [],
"header": "@@ -766,7 +766,6 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
" null, /* AGGREGATE list */"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromVTI.java",
"hunks": [
{
"added": [
" ArrayList aggregates = new ArrayList();",
" methodCall.bindExpression(fromListParam, subqueryList, aggregates);"
],
"header": "@@ -539,10 +539,8 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tArrayList aggregateVector = new ArrayList();",
"\t\tmethodCall.bindExpression(fromListParam,",
"\t\t\t\t\t\t\t\t\t subqueryList,",
"\t\t\t\t\t\t\t\t\t aggregateVector);"
]
},
{
"added": [
" ArrayList aggregates = null;"
],
"header": "@@ -902,7 +900,7 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tArrayList aggregateVector = null;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByList.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" void bindGroupByColumns(SelectNode select, List aggregates)"
],
"header": "@@ -97,11 +97,11 @@ public class GroupByList extends OrderedColumnList",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tvoid bindGroupByColumns(SelectNode select, List aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java",
"hunks": [
{
"added": [
" private List aggregates;"
],
"header": "@@ -84,7 +84,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
" private List aggregateVector;"
]
},
{
"added": [
" * @param aggregates The list of aggregates from"
],
"header": "@@ -116,7 +116,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t * @param aggregateVector\tThe vector of aggregates from"
]
},
{
"added": [
" Object aggregates,"
],
"header": "@@ -130,7 +130,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\t\t\t\tObject aggregateVector,"
]
},
{
"added": [
"// Aggregates can be null if we have a having clause.",
"// SanityManager.ASSERT(((List) aggregates).size() > 0,",
"// \"aggregates expected to be non-empty\");"
],
"header": "@@ -144,10 +144,10 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"//\t\t\tAggregage vector can be null if we have a having clause.",
"//\t\t\tSanityManager.ASSERT(((List) aggregateVector).size() > 0,",
"//\t\t\t\"aggregateVector expected to be non-empty\");"
]
},
{
"added": [
" this.aggregates = (List) aggregates;"
],
"header": "@@ -162,7 +162,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\tthis.aggregateVector = (List) aggregateVector;"
]
},
{
"added": [
" int numDistinct = numDistinctAggregates(aggregates);"
],
"header": "@@ -252,7 +252,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\tint numDistinct = numDistinctAggregates(aggregateVector);"
]
},
{
"added": [
" // aggregates and from the expression tree under havingClause)."
],
"header": "@@ -465,8 +465,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\t// aggregateVector and from the expression tree under",
"\t\t\t// havingClause)."
]
},
{
"added": [
" * For each aggregate in {@code aggregates} <UL>"
],
"header": "@@ -498,7 +497,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t * For each aggregate in aggregateVector <UL>"
]
},
{
"added": [],
"header": "@@ -607,7 +606,6 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\tAggregateNode\taggregate = null;"
]
},
{
"added": [
" int alSize = aggregates.size();",
" AggregateNode aggregate = (AggregateNode) aggregates.get(index);"
],
"header": "@@ -656,10 +654,10 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\tint alSize = aggregateVector.size();",
"\t\t\taggregate = (AggregateNode) aggregateVector.get(index);"
]
},
{
"added": [
" printLabel(depth, \"aggregates:\\n\");",
" for (int i = 0; i < aggregates.size(); i++) {",
" AggregateNode agg = (AggregateNode) aggregates.get(i);",
" debugPrint(formatNodeString(\"[\" + i + \"]:\", depth + 1));",
" agg.treePrint(depth + 1);",
" }"
],
"header": "@@ -896,14 +894,13 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\tprintLabel(depth, \"aggregateVector:\\n\");",
"\t\t\tfor (int i=0; i < aggregateVector.size(); i++) {",
"\t\t\t\t\tAggregateNode agg =",
"\t\t\t\t\t\t(AggregateNode)aggregateVector.get(i);",
"\t\t\t\t\tdebugPrint(formatNodeString(\"[\" + i + \"]:\", depth + 1));",
"\t\t\t\t\tagg.treePrint(depth + 1);",
"\t\t\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find",
" * AggregateNodes",
" ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -214,14 +214,14 @@ public class JavaToSQLValueNode extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
},
{
"added": [
" javaNode = javaNode.bindExpression(fromList, subqueryList, aggregates);"
],
"header": "@@ -229,7 +229,7 @@ public class JavaToSQLValueNode extends ValueNode",
"removed": [
"\t\tjavaNode = javaNode.bindExpression(fromList, subqueryList, aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JoinNode.java",
"hunks": [
{
"added": [
" List aggregates;"
],
"header": "@@ -87,7 +87,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tList\t\t\t\taggregateVector;"
]
},
{
"added": [
" aggregates = new ArrayList();"
],
"header": "@@ -808,7 +808,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\t\taggregateVector = new ArrayList();"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -830,7 +830,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\t\t aggregateVector);"
]
},
{
"added": [
" ** to be able to pass the list of aggregates up",
" if (!aggregates.isEmpty())"
],
"header": "@@ -839,10 +839,10 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\t\t\t** to be able to pass the aggregateVector up",
"\t\t\tif (aggregateVector.size() > 0)"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -882,7 +882,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\t\t aggregateVector);"
]
},
{
"added": [
" aggregates);"
],
"header": "@@ -894,7 +894,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\t\t aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java",
"hunks": [
{
"added": [
" ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)",
" super.bindExpression(fromList, subqueryList, aggregates);"
],
"header": "@@ -140,13 +140,11 @@ public final class LikeEscapeOperatorNode extends TernaryOperatorNode",
"removed": [
" public ValueNode bindExpression(",
" FromList fromList, ",
" SubqueryList subqueryList,",
" List aggregateVector)",
" super.bindExpression(fromList, subqueryList, aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -303,13 +303,12 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\t\tFromList fromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java",
"hunks": [
{
"added": [
" * expression is in, for binding columns.",
" * @param subqueryList The subquery list being built as we find SubqueryNodes",
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" JavaValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -102,18 +102,16 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"\t *\t\t\t\texpression is in, for binding columns.",
"\t * @param subqueryList\t\tThe subquery list being built as we find SubqueryNodes",
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"",
"\tpublic JavaValueNode bindExpression(",
"\t\tFromList fromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -695,15 +695,14 @@ public class ResultColumn extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,",
"\t\t\t\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" void bindExpressions(",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -811,13 +811,12 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic void bindExpressions(",
"\t\t\t\t\tFromList fromList, SubqueryList subqueryList,",
"\t\t\t\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java",
"hunks": [
{
"added": [
" private List aggregates;"
],
"header": "@@ -60,7 +60,7 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"\tprivate List aggregateVector;"
]
},
{
"added": [
" aggregates = new ArrayList();"
],
"header": "@@ -231,7 +231,7 @@ public class RowResultSetNode extends FromTable",
"removed": [
"\t\taggregateVector = new ArrayList();"
]
},
{
"added": [
" aggregates);",
" if (!aggregates.isEmpty())"
],
"header": "@@ -260,11 +260,11 @@ public class RowResultSetNode extends FromTable",
"removed": [
"\t\t\t\t\t\t\t\t\t aggregateVector);",
"\t\tif (!aggregateVector.isEmpty())"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [
" /** Aggregates in the SELECT list. */",
" /** Aggregates in the WHERE clause. */",
" /** Aggregates in the HAVING clause. */"
],
"header": "@@ -68,9 +68,11 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t/* Aggregate Vectors for select and where clauses */"
]
},
{
"added": [],
"header": "@@ -141,7 +143,6 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\t Object aggregateVector,"
]
},
{
"added": [
" /* RESOLVE -"
],
"header": "@@ -149,7 +150,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t/* RESOLVE - remove aggregateList from constructor."
]
},
{
"added": [
" // We expect zero aggregates, so initialize the holder array",
" // with zero capacity.",
" ArrayList groupByAggregates = new ArrayList(0);",
" groupByList.bindGroupByColumns(this, groupByAggregates);"
],
"header": "@@ -669,10 +670,11 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\tArrayList gbAggregateVector = new ArrayList();",
"\t\t\tgroupByList.bindGroupByColumns(this,",
"\t\t\t\t\t\t\t\t\t\t gbAggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
" * expression is in, for binding columns.",
" * @param subqueryList The subquery list being built as we find SubqueryNodes",
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" JavaValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -167,18 +167,16 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t *\t\t\t\texpression is in, for binding columns.",
"\t * @param subqueryList\t\tThe subquery list being built as we find SubqueryNodes",
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"",
"\tpublic JavaValueNode bindExpression(",
"\t\tFromList fromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
},
{
"added": [
" bindParameters(fromList, subqueryList, aggregates);"
],
"header": "@@ -186,7 +184,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\tbindParameters(fromList, subqueryList, aggregateVector);"
]
},
{
"added": [
" resolveRoutine( fromList, subqueryList, aggregates, sd );"
],
"header": "@@ -207,7 +205,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\tresolveRoutine( fromList, subqueryList, aggregateVector, sd );"
]
},
{
"added": [
" resolveRoutine(fromList, subqueryList, aggregates, sd);"
],
"header": "@@ -242,7 +240,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" resolveRoutine(fromList, subqueryList, aggregateVector, sd);"
]
},
{
"added": [
" resolveRoutine(fromList, subqueryList, aggregates, sd);"
],
"header": "@@ -267,7 +265,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" resolveRoutine(fromList, subqueryList, aggregateVector, sd);"
]
},
{
"added": [
" resolveRoutine(fromList, subqueryList, aggregates, sd);"
],
"header": "@@ -279,7 +277,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" resolveRoutine(fromList, subqueryList, aggregateVector, sd);"
]
},
{
"added": [
" return returnValueToJava.bindExpression(fromList, subqueryList, aggregates);"
],
"header": "@@ -400,7 +398,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\t\t\treturn returnValueToJava.bindExpression(fromList, subqueryList, aggregateVector);"
]
},
{
"added": [
" List aggregates, SchemaDescriptor sd)"
],
"header": "@@ -494,14 +492,9 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t * @param fromList",
"\t * @param subqueryList",
"\t * @param aggregateVector",
"\t * @param sd",
"\t * @throws StandardException",
" List aggregateVector, SchemaDescriptor sd)"
]
},
{
"added": [
" fromList, subqueryList, aggregates,"
],
"header": "@@ -610,7 +603,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" fromList, subqueryList, aggregateVector,"
]
},
{
"added": [
" fromList, subqueryList, aggregates,"
],
"header": "@@ -622,7 +615,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" fromList, subqueryList, aggregateVector,"
]
},
{
"added": [
" List aggregates,"
],
"header": "@@ -679,7 +672,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
" List aggregateVector,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -443,14 +443,13 @@ public class SubqueryNode extends ValueNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,",
"\t\t\t\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
" ArrayList aggregates = new ArrayList();"
],
"header": "@@ -610,7 +610,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\tArrayList aggregateVector = new ArrayList();"
]
},
{
"added": [
" checkTree = checkTree.bindExpression(",
" fromList, (SubqueryList) null, aggregates);",
" if (!aggregates.isEmpty())"
],
"header": "@@ -652,11 +652,11 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tcheckTree = checkTree.bindExpression(fromList, (SubqueryList) null,",
"\t\t\t\t\t\t\t\t\t\t aggregateVector);",
"\t\t\t\tif (!aggregateVector.isEmpty())"
]
},
{
"added": [
" ArrayList aggregates = new ArrayList();"
],
"header": "@@ -745,7 +745,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\tArrayList aggregateVector = new ArrayList();"
]
},
{
"added": [
" generationTree = generationClauseNode.bindExpression(",
" fromList, (SubqueryList) null, aggregates);"
],
"header": "@@ -788,8 +788,8 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tgenerationTree = generationClauseNode.bindExpression(fromList, (SubqueryList) null,",
"\t\t\t\t\t\t\t\t\t\t aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -140,16 +140,15 @@ public class UnaryArithmeticOperatorNode extends UnaryOperatorNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(",
"\t\tFromList\tfromList, SubqueryList subqueryList,",
"\t\tList aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)",
" bindOperand(fromList, subqueryList, aggregates);"
],
"header": "@@ -288,19 +288,18 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic ValueNode bindExpression(",
"\t\t\t\t\tFromList fromList, SubqueryList subqueryList,",
"\t\t\t\t\tList aggregateVector)",
"\t\tbindOperand(fromList, subqueryList, aggregateVector);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"hunks": [
{
"added": [
" ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregates)",
" return bindExpression(fromList, subqueryList, aggregates, false);"
],
"header": "@@ -365,11 +365,11 @@ public abstract class ValueNode extends QueryTreeNode",
"removed": [
"\tpublic ValueNode bindExpression(",
" FromList fromList, SubqueryList subqueryList, List aggregateVector)",
"\t\treturn bindExpression(fromList, subqueryList, aggregateVector,false);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java",
"hunks": [
{
"added": [
" * @param aggregates The aggregate list being built as we find AggregateNodes",
" void bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)"
],
"header": "@@ -70,13 +70,11 @@ public class ValueNodeList extends QueryTreeNodeVector",
"removed": [
"\t * @param aggregateVector\tThe aggregate vector being built as we find AggregateNodes",
"\tpublic void\tbindExpression(FromList fromList, ",
"\t\t\t\t\t\t\t SubqueryList subqueryList,",
"\t\t\t\t\t\t\t List aggregateVector)"
]
}
]
}
] |
derby-DERBY-6075-1c6c2e83
|
DERBY-6075: Use modern collections in impl/sql/compile
Replace remaining Vectors with ArrayLists.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455518 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -76,7 +76,6 @@ import org.apache.derby.iapi.services.context.ContextImpl;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
" if (savedObjects == null) {",
" savedObjects = new ArrayList();",
" }"
],
"header": "@@ -332,7 +331,9 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\tif (savedObjects == null) savedObjects = new Vector();"
]
},
{
"added": [
" Long conglomNum = ReuseFactory.getLong(conglomerateNumber);",
" // Try to find the given conglomerate number among the already",
" // opened conglomerates.",
" StoreCostController retval = (StoreCostController)",
" storeCostControllers.get(conglomNum);",
" if (retval == null) {",
" // Not found, so get a StoreCostController from the store.",
" retval = lcc.getTransactionCompile()",
" .openStoreCost(conglomerateNumber);",
" storeCostControllers.put(conglomNum, retval);",
" }"
],
"header": "@@ -442,28 +443,19 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\t/*",
"\t\t** Try to find the given conglomerate number in the array of",
"\t\t** conglom ids.",
"\t\t*/",
"\t\tfor (int i = 0; i < storeCostConglomIds.size(); i++)",
"\t\t{",
"\t\t\tLong conglomId = (Long) storeCostConglomIds.get(i);",
"\t\t\tif (conglomId.longValue() == conglomerateNumber)",
"\t\t\t\treturn (StoreCostController) storeCostControllers.get(i);",
"\t\t}",
"",
"\t\t/*",
"\t\t** Not found, so get a StoreCostController from the store.",
"\t\t*/",
"\t\tStoreCostController retval =",
"\t\t\t\t\t\tlcc.getTransactionCompile().openStoreCost(conglomerateNumber);",
"\t\t/* Put it in the array */",
"\t\tstoreCostControllers.add(retval);",
"\t\t/* Put the conglomerate number in its array */",
"\t\tstoreCostConglomIds.add(new Long(conglomerateNumber));"
]
},
{
"added": [
" Iterator it = storeCostControllers.values().iterator();",
" while (it.hasNext())",
" StoreCostController scc = (StoreCostController) it.next();"
],
"header": "@@ -473,10 +465,10 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\tfor (int i = 0; i < storeCostControllers.size(); i++)",
"\t\t\tStoreCostController scc =",
"\t\t\t\t(StoreCostController) storeCostControllers.get(i);"
]
},
{
"added": [],
"header": "@@ -484,7 +476,6 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\tstoreCostConglomIds.clear();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;"
],
"header": "@@ -57,7 +57,7 @@ import java.lang.reflect.Modifier;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromList.java",
"hunks": [
{
"added": [],
"header": "@@ -23,12 +23,9 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.Visitor;"
]
},
{
"added": [
"import org.apache.derby.iapi.util.ReuseFactory;",
"import java.util.ArrayList;",
""
],
"header": "@@ -38,11 +35,13 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tArrayList\t\tflattenedTableNumbers = new ArrayList();"
],
"header": "@@ -725,7 +724,7 @@ public class FromList extends QueryTreeNodeVector implements OptimizableList",
"removed": [
"\t\tVector \t\t\tflattenedTableNumbers = new Vector();"
]
},
{
"added": [
" flattenedTableNumbers.add(",
" ReuseFactory.getInteger(ft.getTableNumber()));"
],
"header": "@@ -755,7 +754,8 @@ public class FromList extends QueryTreeNodeVector implements OptimizableList",
"removed": [
"\t\t\t\t\tflattenedTableNumbers.add(new Integer(ft.getTableNumber()));"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\t\t\tisInSortedOrder = childResult.isOrderedOn(crs, true, (List)null);"
],
"header": "@@ -218,7 +217,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\t\tisInSortedOrder = childResult.isOrderedOn(crs, true, (Vector)null);"
]
},
{
"added": [
" ColumnReference[] crs = {",
" (ColumnReference) an.getOperand()",
" };",
"",
" // Holder list for the FromBaseTable. We expect no more",
" // than one table, hence initial capacity is 1.",
"\t\t\t\t\t\tArrayList tableVector = new ArrayList(1);",
""
],
"header": "@@ -1246,10 +1245,14 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\t\t\t\tColumnReference[] crs = new ColumnReference[1];",
"\t\t\t\t\t\tcrs[0] = (ColumnReference) an.getOperand();",
"\t\t\t\t\t\t",
"\t\t\t\t\t\tVector tableVector = new Vector();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -49,8 +50,8 @@ import org.apache.derby.iapi.services.io.FormatableArrayHolder;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.Arrays;"
],
"header": "@@ -43,10 +43,9 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"import java.util.Vector;",
""
]
},
{
"added": [],
"header": "@@ -869,17 +868,10 @@ public final class LikeEscapeOperatorNode extends TernaryOperatorNode",
"removed": [
" Vector param;",
"",
" param = new Vector(2);",
" else",
" {",
" param = new Vector(1);",
" }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java",
"hunks": [
{
"added": [],
"header": "@@ -60,7 +60,6 @@ import java.lang.reflect.Modifier;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\t\tArrayList movePreds = new ArrayList();"
],
"header": "@@ -1948,7 +1947,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\tVector movePreds = new Vector();"
]
},
{
"added": [
"\t\tArrayList maxPreds = new ArrayList();"
],
"header": "@@ -3873,7 +3872,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\tVector maxPreds = new Vector();"
]
},
{
"added": [
"\t\tprivate final ArrayList pwList;",
"\t\t\tpwList = new ArrayList(maxValue);"
],
"header": "@@ -4099,23 +4098,16 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\tVector pwList;",
"\t\t\tpwList = new Vector(maxValue);",
"\t\tvoid removeElement(PredicateWrapper pw)",
"\t\t{",
"\t\t\tint index = pwList.indexOf(pw);",
"\t\t\tif (index >= 0)",
"\t\t\t\tremoveElementAt(index);",
"\t\t}",
""
]
},
{
"added": [
" if (pwList.isEmpty()) {",
" }"
],
"header": "@@ -4178,11 +4170,9 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\tif (pwList == null)",
"\t\t\t\treturn;",
"",
"\t\t\tif (pwList.size() == 0)"
]
},
{
"added": [],
"header": "@@ -4224,8 +4214,6 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\tVector scratch = new Vector();",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.catalog.DefaultInfo;",
"removed": [
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;"
]
},
{
"added": [],
"header": "@@ -47,11 +46,7 @@ import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;",
"removed": [
"import org.apache.derby.iapi.sql.execute.CursorResultSet;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"",
"import org.apache.derby.iapi.sql.ResultSet;"
]
},
{
"added": [
"import java.util.ArrayList;",
"import java.util.List;"
],
"header": "@@ -66,9 +61,10 @@ import org.apache.derby.iapi.util.ReuseFactory;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tArrayList conglomVector = new ArrayList();"
],
"header": "@@ -892,7 +888,7 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\tVector\t\tconglomVector = new Vector();"
]
},
{
"added": [
"\t\tList\t\t\t\t\t\tconglomVector,"
],
"header": "@@ -993,7 +989,7 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\tVector\t\t\t\t\t\tconglomVector,"
]
}
]
}
] |
derby-DERBY-6075-234a2b69
|
DERBY-6075: Use modern collections in impl/sql/compile
Replace Hashtables used for duplicate checking with HashSets.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1453745 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java",
"hunks": [
{
"added": [
"import java.util.HashSet;"
],
"header": "@@ -21,7 +21,7 @@",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": [
" HashSet seenNames = new HashSet(size + 2, 0.999f);"
],
"header": "@@ -313,7 +313,7 @@ public class CreateIndexNode extends DDLStatementNode",
"removed": [
"\t\tHashtable\tht = new Hashtable(size + 2, (float) .999);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java",
"hunks": [
{
"added": [
"import java.util.HashSet;"
],
"header": "@@ -24,7 +24,7 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import java.util.Hashtable;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrderedColumnList.java",
"hunks": [
{
"added": [
"import java.util.HashSet;",
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -21,11 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.store.access.ColumnOrdering;",
"",
"import java.util.Hashtable;"
]
},
{
"added": [
" HashSet hashColumns = new HashSet();"
],
"header": "@@ -52,7 +51,7 @@ public abstract class OrderedColumnList extends QueryTreeNodeVector",
"removed": [
"\t\tHashtable hashColumns = new Hashtable();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
"import java.util.HashSet;"
],
"header": "@@ -24,9 +24,9 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": [
" HashSet seenNames = new HashSet(size + 2, 0.999f);"
],
"header": "@@ -951,7 +951,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t\tHashtable\tht = new Hashtable(size + 2, (float) .999);"
]
},
{
"added": [
" boolean alreadySeen = !seenNames.add(colName);",
"\t\t\tif (alreadySeen)"
],
"header": "@@ -960,11 +960,9 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t\t\tObject object = ht.put(colName, colName);",
"",
"\t\t\tif (object != null &&",
"\t\t\t\t((String) object).equals(colName))"
]
},
{
"added": [
" HashSet seenNames = new HashSet(size + 2, 0.999f);"
],
"header": "@@ -2098,7 +2096,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t\tHashtable\tht = new Hashtable(size + 2, (float) .999);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
"import java.util.Set;"
],
"header": "@@ -60,10 +60,10 @@ import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": [
" HashSet columnNames = new HashSet(size + 2, 0.999f);",
" HashSet constraintNames = new HashSet(size + 2, 0.999f);",
" ArrayList constraintsVector = new ArrayList();"
],
"header": "@@ -169,10 +169,10 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\tHashtable\tcolumnHT = new Hashtable(size + 2, (float) .999);",
"\t\tHashtable\tconstraintHT = new Hashtable(size + 2, (float) .999);",
"\t\tVector constraintsVector = new Vector();"
]
},
{
"added": [
"\t\t\t\tcheckForDuplicateColumns(ddlStmt, columnNames, cdn.getColumnName());"
],
"header": "@@ -215,7 +215,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tcheckForDuplicateColumns(ddlStmt, columnHT, cdn.getColumnName());"
]
},
{
"added": [
" checkForDuplicateConstraintNames(ddlStmt, constraintNames, cdn.getConstraintMoniker());"
],
"header": "@@ -292,7 +292,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
" checkForDuplicateConstraintNames(ddlStmt, constraintHT, cdn.getConstraintMoniker());"
]
},
{
"added": [
" * @param seenNames The column names seen so far (for enforcing uniqueness)",
"\t\t\t\t\t\t\t\t\tSet seenNames,",
"\t\tif (!seenNames.add(colName))"
],
"header": "@@ -1373,18 +1373,17 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t * @param ht\t\tHashtable for enforcing uniqueness.",
"\t\t\t\t\t\t\t\t\tHashtable ht,",
"\t\tObject object = ht.put(colName, colName);",
"\t\tif (object != null)"
]
},
{
"added": [
" * @param seenNames The constraint names seen so far (for enforcing",
" * uniqueness)",
"\t\t\t\t\t\t\t\t\tSet seenNames,",
"\t\tif (!seenNames.add(constraintName)) {"
],
"header": "@@ -1402,19 +1401,20 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\t\t\t\t\t\tHashtable ht,",
"\t\tObject object = ht.put(constraintName, constraintName);",
"\t\tif (object != null) {"
]
}
]
}
] |
derby-DERBY-6075-3541af3c
|
DERBY-6075: Use modern collections in impl/sql/compile
Replace Hashtable fields with HashSets.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1454296 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [
"import java.util.Set;"
],
"header": "@@ -22,9 +22,9 @@",
"removed": [
"import java.util.Hashtable;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [
"import java.util.HashSet;"
],
"header": "@@ -58,7 +58,7 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": [
" dependentTables = new HashSet();",
"\t\t\t\t/*Check whether the current target has already been explored.",
"\t\t\t\tif (dependentTables.add(currentTargetTableName))"
],
"header": "@@ -338,19 +338,18 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\t\t\t\tgraphHashTable = new Hashtable();",
"\t\t\t\t/*Check whether the current tatget is already been explored.",
"\t\t\t\tif(!graphHashTable.containsKey(currentTargetTableName))",
"\t\t\t\t\tgraphHashTable.put(currentTargetTableName, new Integer(noDependents));"
]
},
{
"added": [
" dependentTables.add(currentTargetTableName);"
],
"header": "@@ -367,7 +366,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\t\t\t\tgraphHashTable.put(currentTargetTableName, new Integer(0));"
]
},
{
"added": [
" DMLModStatementNode node = null;"
],
"header": "@@ -711,7 +710,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\tStatementNode node=null;"
]
},
{
"added": [
" // The dependent node should be marked as such, and it should inherit",
" // the set of dependent tables from the parent so that it can break",
" // out of cycles in the dependency graph.",
" if (node != null) {",
" node.isDependentTable = true;",
" node.dependentTables = dependentTables;",
" }",
"",
" private DeleteNode getEmptyDeleteNode(String schemaName, String targetTableName)"
],
"header": "@@ -719,22 +718,26 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\t\t((DeleteNode)node).isDependentTable = true;",
"\t\t\t((DeleteNode)node).graphHashTable = graphHashTable;",
"\t\t\t((UpdateNode)node).isDependentTable = true;",
"\t\t\t((UpdateNode)node).graphHashTable = graphHashTable;",
" private StatementNode getEmptyDeleteNode(String schemaName, String targetTableName)"
]
},
{
"added": [
" return (DeleteNode) nodeFactory.getNode("
],
"header": "@@ -771,7 +774,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
" return (StatementNode) nodeFactory.getNode("
]
},
{
"added": [
" private UpdateNode getEmptyUpdateNode(String schemaName,"
],
"header": "@@ -781,7 +784,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
" private StatementNode getEmptyUpdateNode(String schemaName, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/Predicate.java",
"hunks": [
{
"added": [
"import java.util.HashSet;",
"import java.util.Set;"
],
"header": "@@ -21,17 +21,14 @@",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
""
]
},
{
"added": [
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -43,9 +40,8 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.ArrayList;",
"import java.util.Hashtable;"
]
},
{
"added": [
" private Set searchClauses;"
],
"header": "@@ -72,7 +68,7 @@ public final class Predicate extends QueryTreeNode implements OptimizablePredica",
"removed": [
"\tprivate Hashtable searchClauseHT;"
]
},
{
"added": [
" return searchClauses != null &&",
" searchClauses.contains(ReuseFactory.getInteger(ro.getOperator()));"
],
"header": "@@ -560,15 +556,8 @@ public final class Predicate extends QueryTreeNode implements OptimizablePredica",
"removed": [
"\t\tif (searchClauseHT == null || ",
"\t\t\tsearchClauseHT.get(new Integer(ro.getOperator())) == null)",
"\t\t{",
"\t\t\treturn false;",
"\t\t}",
"\t\telse",
"\t\t{",
"\t\t\treturn true;",
"\t\t}"
]
},
{
"added": [
" if (searchClauses == null) {",
" searchClauses = new HashSet();",
" }",
" searchClauses.add(ReuseFactory.getInteger(ro.getOperator()));"
],
"header": "@@ -581,15 +570,13 @@ public final class Predicate extends QueryTreeNode implements OptimizablePredica",
"removed": [
"\t\tif (searchClauseHT == null)",
"\t\t{",
"\t\t\tsearchClauseHT = new Hashtable();",
"\t\t}",
"\t\tInteger i = new Integer(ro.getOperator());",
"\t\tsearchClauseHT.put(i, i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/VTIDeferModPolicy.java",
"hunks": [
{
"added": [
"import java.util.Arrays;",
"import java.util.HashSet;",
"import java.util.Iterator;"
],
"header": "@@ -28,11 +28,11 @@ import org.apache.derby.iapi.sql.compile.Visitable;",
"removed": [
"import java.util.Enumeration;",
"import java.util.Hashtable;",
""
]
},
{
"added": [
" Iterator columns = deferralSearch.columns.iterator();",
" while (columns.hasNext())",
" if (deferralControl.columnRequiresDefer(",
" statementType, (String) columns.next(), false)) {",
" }"
],
"header": "@@ -91,13 +91,13 @@ class VTIDeferModPolicy implements Visitor",
"removed": [
" Enumeration columns = deferralSearch.columns.keys();",
" while( columns.hasMoreElements())",
" if( deferralControl.columnRequiresDefer( statementType,",
" (String) columns.nextElement(),",
" false))"
]
},
{
"added": [
" private final HashSet columns = new HashSet();"
],
"header": "@@ -113,7 +113,7 @@ class VTIDeferModPolicy implements Visitor",
"removed": [
" private Hashtable columns = new Hashtable();"
]
},
{
"added": [
" columns.addAll(Arrays.asList(columnNames));"
],
"header": "@@ -125,8 +125,7 @@ class VTIDeferModPolicy implements Visitor",
"removed": [
" for( int i = 0; i < columnNames.length; i++)",
" columns.put( columnNames[i], columnNames[i]);"
]
},
{
"added": [
" if (columns.add(columnName))",
" if (columns.remove(columnName))"
],
"header": "@@ -143,21 +142,19 @@ class VTIDeferModPolicy implements Visitor",
"removed": [
" if( columns.get( columnName) == null)",
" columns.put( columnName, columnName);",
" if( columns.get( columnName) != null)",
" columns.remove( columnName); // Only test it once."
]
}
]
}
] |
derby-DERBY-6075-38b59797
|
DERBY-6075: Use modern collections in impl/sql/compile
Change signatures of
CompilerContext.setParameterList(Vector)
CompilerContext.getParameterList()
ResultColumnList.bindExpressions(FromList, SubqueryList, Vector)
to use List instead of Vector.
Also change overrides of those methods, as well as signatures of
local variables, fields and methods used by those methods.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1449020 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java",
"hunks": [
{
"added": [],
"header": "@@ -27,10 +27,6 @@ import org.apache.derby.iapi.services.loader.ClassFactory;",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"",
"import org.apache.derby.iapi.sql.ParameterValueSet;",
""
]
},
{
"added": [],
"header": "@@ -42,15 +38,12 @@ import org.apache.derby.iapi.sql.depend.Dependent;",
"removed": [
"import org.apache.derby.iapi.sql.compile.TypeCompilerFactory;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -48,7 +48,6 @@ import org.apache.derby.iapi.sql.dictionary.StatementColumnPermission;",
"removed": [
"import org.apache.derby.iapi.types.DataTypeDescriptor;"
]
},
{
"added": [],
"header": "@@ -59,7 +58,6 @@ import org.apache.derby.iapi.error.ExceptionSeverity;",
"removed": [
"import org.apache.derby.iapi.sql.ParameterValueSet;"
]
},
{
"added": [],
"header": "@@ -67,13 +65,10 @@ import org.apache.derby.iapi.store.access.SortCostController;",
"removed": [
"import org.apache.derby.iapi.services.uuid.UUIDFactory;",
"import org.apache.derby.iapi.services.monitor.Monitor;",
"import org.apache.derby.iapi.reference.SQLState;"
]
},
{
"added": [],
"header": "@@ -85,8 +80,6 @@ import java.util.Vector;",
"removed": [
"import java.util.Map.Entry;",
"import java.util.BitSet;"
]
},
{
"added": [
"\tpublic void setParameterList(List parameterList)"
],
"header": "@@ -585,7 +578,7 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\tpublic void setParameterList(Vector parameterList)"
]
},
{
"added": [
"\tpublic List getParameterList()"
],
"header": "@@ -601,7 +594,7 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\tpublic Vector getParameterList()"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CursorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -22,7 +22,7 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\tprivate List updatableColumns;"
],
"header": "@@ -64,7 +64,7 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\tprivate Vector\tupdatableColumns;"
]
},
{
"added": [
"\t\tthis.updatableColumns = (List) updatableColumns;"
],
"header": "@@ -120,7 +120,7 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\t\tthis.updatableColumns = (Vector) updatableColumns;"
]
},
{
"added": [
"\t\t\tthis.updatableColumns.isEmpty() || this.updateMode == UPDATE,"
],
"header": "@@ -128,7 +128,7 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\t\t\tthis.updatableColumns.size() == 0 || this.updateMode == UPDATE,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLStatementNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,18 +21,16 @@",
"removed": [
"import java.util.Vector;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.execute.ExecutionContext;"
]
},
{
"added": [
"\t\tList parameterList = getCompilerContext().getParameterList();",
"\t\tif (parameterList != null && !parameterList.isEmpty())"
],
"header": "@@ -267,12 +265,12 @@ abstract class DMLStatementNode extends StatementNode",
"removed": [
"\t\tVector parameterList = getCompilerContext().getParameterList();",
"\t\tif (parameterList != null && parameterList.size() > 0)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -24,8 +24,8 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -25,9 +25,9 @@ import java.lang.reflect.Modifier;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\t\t\t\tList aggregateVector)"
],
"header": "@@ -817,7 +817,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\t\tVector\taggregateVector)"
]
},
{
"added": [
"\tvoid markColumnsInSelectListUpdatableByCursor(List updateColumns)"
],
"header": "@@ -2871,7 +2871,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\tvoid markColumnsInSelectListUpdatableByCursor(Vector updateColumns)"
]
},
{
"added": [
" private void commonCodeForUpdatableByCursor(",
" List updateColumns, boolean dealingWithSelectResultColumnList)"
],
"header": "@@ -2887,7 +2887,8 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\tprivate void commonCodeForUpdatableByCursor(Vector updateColumns, boolean dealingWithSelectResultColumnList)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SetRoleNode.java",
"hunks": [
{
"added": [
"import java.util.List;",
""
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
},
{
"added": [],
"header": "@@ -28,7 +30,6 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
" List parameterList = getCompilerContext().getParameterList();"
],
"header": "@@ -132,7 +133,7 @@ public class SetRoleNode extends MiscellaneousStatementNode",
"removed": [
" Vector parameterList = getCompilerContext().getParameterList();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SetSchemaNode.java",
"hunks": [
{
"added": [
"import java.util.List;",
""
],
"header": "@@ -21,23 +21,18 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import java.util.Vector;",
""
]
},
{
"added": [
"\t\tList parameterList = getCompilerContext().getParameterList();"
],
"header": "@@ -142,7 +137,7 @@ public class SetSchemaNode extends MiscellaneousStatementNode",
"removed": [
"\t\tVector parameterList = getCompilerContext().getParameterList();"
]
},
{
"added": [],
"header": "@@ -160,7 +155,6 @@ public class SetSchemaNode extends MiscellaneousStatementNode",
"removed": [
"\t\tVector parameterList = getCompilerContext().getParameterList();"
]
}
]
}
] |
derby-DERBY-6075-402f3c2b
|
DERBY-6075: Use modern collections in impl/sql/compile
Remove some unnecessary use of java.util.Properties. Mostly unused
imports, but also some unused parameters.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455902 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/store/access/TransactionController.java",
"hunks": [
{
"added": [],
"header": "@@ -23,8 +23,6 @@ package org.apache.derby.iapi.store.access;",
"removed": [
"import java.io.Serializable;",
""
]
},
{
"added": [],
"header": "@@ -37,11 +35,8 @@ import org.apache.derby.iapi.store.raw.Transaction;",
"removed": [
"import org.apache.derby.iapi.store.access.BackingStoreHashtable;",
"import org.apache.derby.iapi.store.access.DatabaseInstant;",
"import org.apache.derby.iapi.error.ExceptionSeverity;"
]
},
{
"added": [],
"header": "@@ -1742,9 +1737,6 @@ public interface TransactionController",
"removed": [
" * @param implParameters Properties which help in choosing ",
" * implementation-specific sort options. If null, a",
"\t * \"generally useful\" sort will be used."
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -76,7 +76,6 @@ import org.apache.derby.iapi.services.context.ContextImpl;",
"removed": [
"import java.util.Properties;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CurrentOfNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,20 +21,14 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
""
]
},
{
"added": [],
"header": "@@ -42,21 +36,13 @@ import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.iapi.sql.execute.CursorResultSet;",
"",
"import org.apache.derby.iapi.types.RowLocation;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,39 +21,17 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicate;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicateList;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;",
"import org.apache.derby.iapi.sql.compile.RowOrdering;",
"import org.apache.derby.iapi.sql.compile.AccessPath;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.iapi.store.access.TransactionController;",
"",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,26 +21,8 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.compile.Optimizable;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicate;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicateList;",
"import org.apache.derby.iapi.sql.compile.Optimizer;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.Visitor;",
"import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,28 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.compile.CostEstimate;",
"import org.apache.derby.iapi.sql.compile.Optimizable;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicate;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicateList;",
"import org.apache.derby.iapi.sql.compile.Optimizer;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.Visitor;",
"import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrderByList.java",
"hunks": [
{
"added": [],
"header": "@@ -32,20 +32,10 @@ import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"removed": [
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
"import org.apache.derby.iapi.store.access.TransactionController;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,19 +21,14 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java",
"hunks": [
{
"added": [
"\t\tSortCostController scc = tc.openSortCostController();"
],
"header": "@@ -1988,7 +1988,7 @@ public class T_AccessFactory extends T_Generic",
"removed": [
"\t\tSortCostController scc = tc.openSortCostController(null);"
]
}
]
}
] |
derby-DERBY-6075-43fdf450
|
DERBY-6075: Use modern collections in impl/sql/compile
Use ArrayLists for the aggregate vectors.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455045 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromVTI.java",
"hunks": [
{
"added": [],
"header": "@@ -30,11 +30,9 @@ import java.sql.ResultSet;",
"removed": [
"import java.util.Enumeration;",
"import java.util.Vector;"
]
},
{
"added": [
"\t\tArrayList aggregateVector = new ArrayList();"
],
"header": "@@ -541,7 +539,7 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tVector aggregateVector = new Vector();"
]
},
{
"added": [
"\t\tArrayList aggregateVector = null;"
],
"header": "@@ -904,7 +902,7 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tVector aggregateVector = null;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JoinNode.java",
"hunks": [
{
"added": [],
"header": "@@ -57,7 +57,6 @@ import java.util.ArrayList;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -50,7 +51,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\taggregateVector = new ArrayList();"
],
"header": "@@ -231,7 +231,7 @@ public class RowResultSetNode extends FromTable",
"removed": [
"\t\taggregateVector = new Vector();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;"
],
"header": "@@ -43,7 +43,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tselectAggregates = new ArrayList();"
],
"header": "@@ -555,7 +555,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\tselectAggregates = new Vector();"
]
},
{
"added": [
"\t\twhereAggregates = new ArrayList();"
],
"header": "@@ -593,7 +593,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\twhereAggregates = new Vector();"
]
},
{
"added": [
"\t\t\thavingAggregates = new ArrayList();"
],
"header": "@@ -639,7 +639,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\thavingAggregates = new Vector();"
]
},
{
"added": [
"\t\t\tArrayList gbAggregateVector = new ArrayList();"
],
"header": "@@ -669,7 +669,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\tVector gbAggregateVector = new Vector();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [],
"header": "@@ -64,7 +64,6 @@ import java.util.HashSet;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tArrayList aggregateVector = new ArrayList();"
],
"header": "@@ -611,7 +610,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\tVector aggregateVector = new Vector();"
]
},
{
"added": [
"\t\t\t\tif (!aggregateVector.isEmpty())"
],
"header": "@@ -657,7 +656,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tif (aggregateVector.size() != 0)"
]
},
{
"added": [
"\t\tArrayList aggregateVector = new ArrayList();"
],
"header": "@@ -746,7 +745,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\tVector aggregateVector = new Vector();"
]
},
{
"added": [
"\t\t\t\tif (!aggregateVector.isEmpty())"
],
"header": "@@ -832,7 +831,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tif (aggregateVector.size() != 0)"
]
}
]
}
] |
derby-DERBY-6075-47d4a4c1
|
DERBY-6075: Use modern collections in impl/sql/compile
Replace use of Vector in method signatures and field declarations
with List. The actual instances are still Vectors.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1453240 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -22,7 +22,7 @@",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java",
"hunks": [
{
"added": [
"\t\tObject[] retVal = savedObjects.toArray();"
],
"header": "@@ -341,8 +341,7 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\tObject[] retVal = new Object[savedObjects.size()];",
"\t\tsavedObjects.copyInto(retVal);"
]
},
{
"added": [
"\t\tstoreCostControllers.add(retval);",
"\t\tstoreCostConglomIds.add(new Long(conglomerateNumber));"
],
"header": "@@ -461,10 +460,10 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\t\tstoreCostControllers.add(storeCostControllers.size(), retval);",
"\t\tstoreCostConglomIds.add(storeCostConglomIds.size(), new Long(conglomerateNumber));"
]
},
{
"added": [
"\tprivate List\t\t\t\tsavedObjects;"
],
"header": "@@ -1023,7 +1022,7 @@ public class CompilerContextImpl extends ContextImpl",
"removed": [
"\tprivate Vector\t\t\t\tsavedObjects;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [],
"header": "@@ -31,7 +30,6 @@ import org.apache.derby.catalog.types.SynonymAliasInfo;",
"removed": [
"import org.apache.derby.iapi.reference.Limits;"
]
},
{
"added": [
"\t\t\t\tint paramCount = ((List) parameters[0]).size();"
],
"header": "@@ -192,7 +190,7 @@ public class CreateAliasNode extends DDLStatementNode",
"removed": [
"\t\t\t\tint paramCount = ((Vector) parameters[0]).size();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -22,8 +22,8 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\tList\t\t\t\tcolumnNameList;"
],
"header": "@@ -54,7 +54,7 @@ public class CreateIndexNode extends DDLStatementNode",
"removed": [
"\tVector\t\t\t\tcolumnNameList;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java",
"hunks": [
{
"added": [
"import java.util.Iterator;"
],
"header": "@@ -24,10 +24,9 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import java.util.Enumeration;",
"import java.util.Vector;"
]
},
{
"added": [
"\tprivate\tList\t\t\t\trefClause;"
],
"header": "@@ -60,7 +59,7 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
"\tprivate\tVector\t\t\t\trefClause;"
]
},
{
"added": [
"\t\tthis.refClause = (List) refClause;"
],
"header": "@@ -264,7 +263,7 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
"\t\tthis.refClause = (Vector) refClause;\t"
]
},
{
"added": [
"\t\tif ((refClause == null) || refClause.isEmpty())",
"\t\tfor (Iterator it = refClause.iterator(); it.hasNext(); )",
"\t\t\tTriggerReferencingStruct trn = (TriggerReferencingStruct) it.next();"
],
"header": "@@ -782,14 +781,14 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
"\t\tif ((refClause == null) || (refClause.size() == 0))",
"\t\tfor (Enumeration e = refClause.elements(); e.hasMoreElements(); )",
"\t\t\tTriggerReferencingStruct trn = (TriggerReferencingStruct)e.nextElement();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -60,6 +60,7 @@ import org.apache.derby.iapi.services.io.FormatableProperties;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DistinctNode.java",
"hunks": [
{
"added": [
"import java.util.List;",
""
],
"header": "@@ -21,14 +21,13 @@",
"removed": [
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.compile.Visitor;"
]
},
{
"added": [],
"header": "@@ -36,25 +35,16 @@ import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"removed": [
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.util.JBitSet;",
"",
"",
"import java.util.Properties;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" * out of the base table from the RowLocation returned by the"
],
"header": "@@ -101,7 +101,7 @@ import org.apache.derby.impl.sql.catalog.SYSUSERSRowFactory;",
"removed": [
" * out of the base table from the RowLocation retunrned by the"
]
},
{
"added": [
"\t * @param locations\tlist of bit numbers to be cleared",
"\tvoid clearDependency(List locations)"
],
"header": "@@ -2205,9 +2205,9 @@ public class FromBaseTable extends FromTable",
"removed": [
"\t * @param locations\tvector of bit numbers to be cleared",
"\tvoid clearDependency(Vector locations)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByList.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,22 +21,13 @@",
"removed": [
"",
"",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.util.ReuseFactory;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -26,6 +26,7 @@ import java.util.Vector;",
"removed": []
},
{
"added": [
" private List aggregateVector;"
],
"header": "@@ -84,7 +85,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\tVector\taggregateVector;"
]
},
{
"added": [
"//\t\t\tSanityManager.ASSERT(((List) aggregateVector).size() > 0,"
],
"header": "@@ -146,7 +147,7 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"//\t\t\tSanityManager.ASSERT(((Vector) aggregateVector).size() > 0,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,30 +21,20 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.sql.execute.NoPutResultSet;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
""
]
},
{
"added": [],
"header": "@@ -53,8 +43,6 @@ import org.apache.derby.catalog.types.ReferencedColumnsDescriptorImpl;",
"removed": [
"import java.util.Properties;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JoinNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;"
]
},
{
"added": [],
"header": "@@ -34,13 +33,11 @@ import org.apache.derby.iapi.sql.compile.Optimizable;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [],
"header": "@@ -50,15 +47,8 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": [
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
""
]
},
{
"added": [
"\tList\t\t\t\taggregateVector;"
],
"header": "@@ -98,7 +88,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tVector\t\t\t\taggregateVector;"
]
},
{
"added": [
"\tboolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, List fbtVector)"
],
"header": "@@ -1912,7 +1902,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tboolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, Vector fbtVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java",
"hunks": [
{
"added": [
"\tprivate int chooseLongestMatch(PredicateWrapperList[] predArray, List ret,"
],
"header": "@@ -3947,12 +3947,11 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\tprivate int chooseLongestMatch(PredicateWrapperList[] predArray, Vector ret,",
"\t\tint weight;"
]
},
{
"added": [
"\t\tList uniquepreds = pwl.createLeadingUnique();"
],
"header": "@@ -3993,7 +3992,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\tVector uniquepreds = pwl.createLeadingUnique();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNodeVector.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -24,10 +24,9 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import java.util.Enumeration;"
]
},
{
"added": [
"\tprivate final List v = new Vector();",
"\tfinal QueryTreeNode elementAt(int index)",
"\t\treturn (QueryTreeNode) v.get(index);",
"\t\tv.add(qt);",
"\t\tv.remove(index);",
"\t\tv.remove(qt);"
],
"header": "@@ -39,31 +38,31 @@ import java.util.Vector;",
"removed": [
"\tprivate Vector\t\t\tv = new Vector();",
"\tQueryTreeNode elementAt(int index)",
"\t\treturn (QueryTreeNode) v.elementAt(index);",
"\t\tv.addElement(qt);",
"\t\tv.removeElementAt(index);",
"\t\tv.removeElement(qt);"
]
},
{
"added": [
"\t\tv.set(index, qt);"
],
"header": "@@ -78,7 +77,7 @@ abstract class QueryTreeNodeVector extends QueryTreeNode",
"removed": [
"\t\tv.setElementAt(qt, index);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -57,7 +57,7 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
" (getFromList(), (SubqueryList) null, (List) null);"
],
"header": "@@ -1032,7 +1032,7 @@ public abstract class ResultSetNode extends QueryTreeNode",
"removed": [
" (getFromList(), (SubqueryList) null, (Vector) null);"
]
},
{
"added": [
"\t * @param\tfbtVector\t\t\tVector that is to be filled with the FromBaseTable",
"\tboolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, List fbtVector)"
],
"header": "@@ -1736,14 +1736,14 @@ public abstract class ResultSetNode extends QueryTreeNode",
"removed": [
"\t * @param\tfbtVector\t\t\tVector that is to be filled with the FromBaseTable\t",
"\tboolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, Vector fbtVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [
" private List selectAggregates;",
" private List whereAggregates;",
" private List havingAggregates;",
""
],
"header": "@@ -69,9 +69,10 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\tVector\tselectAggregates ;",
"\tVector\twhereAggregates;",
"\tVector havingAggregates;"
]
},
{
"added": [
"\t\t\tselectAggregates.isEmpty() &&",
"\t\t\twhereAggregates.isEmpty())"
],
"header": "@@ -1189,8 +1190,8 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\tselectAggregates.size() == 0 &&",
"\t\t\twhereAggregates.size() == 0)"
]
},
{
"added": [
"\t\t\tList aggs = selectAggregates;"
],
"header": "@@ -1544,7 +1545,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\tVector aggs = selectAggregates;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,36 +21,25 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicate;",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.ResultSet;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import java.util.Properties;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
" {",
" constraintsVector.add(cd);",
" }"
],
"header": "@@ -191,7 +191,9 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\t\t\tconstraintsVector.addElement(cd);"
]
},
{
"added": [
"\t\t\t\t\tdestConstraint = constraintsVector.get(i);"
],
"header": "@@ -267,7 +269,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\t\tdestConstraint = constraintsVector.elementAt(i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/WindowReferenceNode.java",
"hunks": [
{
"added": [],
"header": "@@ -22,11 +22,6 @@",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import java.sql.Types;",
"import java.util.Vector;"
]
}
]
}
] |
derby-DERBY-6075-5d9ef3f0
|
DERBY-6075: Use modern collections in impl/sql/compile
Replace use of java.util.Vector with java.util.ArrayList in
DMLModStatementNode.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1452350 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import java.util.List;"
],
"header": "@@ -21,9 +21,10 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\t\t(List) null);"
],
"header": "@@ -745,7 +746,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\t\t\t\t\t\t\t\t\t(Vector) null);"
]
},
{
"added": [
"\t\tArrayList\t\t\t\t\t\t\tfkVector = new ArrayList();"
],
"header": "@@ -874,7 +875,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tVector\t\t\t\t\t\t\t\tfkVector = new Vector(10);"
]
},
{
"added": [
"\t\tArrayList refTableNames = new ArrayList(1);",
"\t\tArrayList refIndexConglomNum = new ArrayList(1);",
"\t\tArrayList refActions = new ArrayList(1);",
"\t\tArrayList refColDescriptors = new ArrayList(1);",
"\t\tArrayList fkColMap = new ArrayList(1);"
],
"header": "@@ -885,11 +886,11 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tVector refTableNames = new Vector(1);",
"\t\tVector refIndexConglomNum = new Vector(1);",
"\t\tVector refActions = new Vector(1);",
"\t\tVector refColDescriptors = new Vector(1);",
"\t\tVector fkColMap = new Vector(1);"
]
},
{
"added": [
" if (!fkVector.isEmpty()) {",
" fkInfo = (FKInfo[]) fkVector.toArray(new FKInfo[fkVector.size()]);",
" }",
"\t\tint size = refActions.size();"
],
"header": "@@ -1005,18 +1006,12 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tint size = fkVector.size();",
"\t\tif (size > 0)",
"\t\t{",
"\t\t\tfkInfo = new FKInfo[size];",
"\t\t\tfor (int i = 0; i < size; i++)",
"\t\t\t{",
"\t\t\t\tfkInfo[i] = (FKInfo)fkVector.get(i);",
"\t\t\t}",
"\t\t}",
"\t\tsize = refActions.size();"
]
},
{
"added": [
"\t\tArrayList conglomVector = new ArrayList();"
],
"header": "@@ -1690,7 +1685,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tVector\t\tconglomVector = new Vector();"
]
},
{
"added": [
"\t\tList\t\t\t\tconglomVector"
],
"header": "@@ -1718,7 +1713,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tVector\t\t\t\tconglomVector"
]
},
{
"added": [
"\t\tList\taffectedConglomerates"
],
"header": "@@ -1776,7 +1771,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tVector\taffectedConglomerates"
]
}
]
}
] |
derby-DERBY-6075-b153b241
|
DERBY-6075: Use modern collections in impl/sql/compile
Rename variables that have "vector" in their names and update
comments.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465368 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [
" ArrayList fkList = new ArrayList();"
],
"header": "@@ -876,7 +876,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tArrayList\t\t\t\t\t\t\tfkVector = new ArrayList();"
]
},
{
"added": [
" fkList.add(new FKInfo("
],
"header": "@@ -987,7 +987,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\t\tfkVector.add(new FKInfo("
]
},
{
"added": [
" // Now convert the list into an array.",
" if (!fkList.isEmpty()) {",
" fkInfo = (FKInfo[]) fkList.toArray(new FKInfo[fkList.size()]);",
" // Convert the ref action info lists to arrays."
],
"header": "@@ -1004,14 +1004,12 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\t/*",
"\t\t** Now convert the vector into an array.",
"\t\t*/",
" if (!fkVector.isEmpty()) {",
" fkInfo = (FKInfo[]) fkVector.toArray(new FKInfo[fkVector.size()]);",
"\t\t//convert the ref action info vectors to to arrays"
]
},
{
"added": [
" ArrayList conglomerates = new ArrayList();",
" DMLModStatementNode.getXAffectedIndexes(",
" td, updatedColumns, colBitSet, conglomerates);",
" markAffectedIndexes(conglomerates);"
],
"header": "@@ -1686,11 +1684,12 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tArrayList conglomVector = new ArrayList();",
"\t\tDMLModStatementNode.getXAffectedIndexes(td, updatedColumns, colBitSet, conglomVector );",
"\t\tmarkAffectedIndexes( conglomVector );"
]
},
{
"added": [
" * @param conglomerates OUT: list of affected indices"
],
"header": "@@ -1705,7 +1704,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t *\t@param\tconglomVector\tOUT: vector of affected indices"
]
},
{
"added": [
" FormatableBitSet colBitSet,",
" List conglomerates"
],
"header": "@@ -1713,8 +1712,8 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tFormatableBitSet\t\t\t\tcolBitSet,",
"\t\tList\t\t\t\tconglomVector"
]
},
{
"added": [
" if ( conglomerates != null )"
],
"header": "@@ -1741,7 +1740,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\t\tif ( conglomVector != null )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java",
"hunks": [
{
"added": [
" ArrayList conglomerates = new ArrayList();",
" FormatableBitSet columnMap = DeleteNode.getDeleteReadMap(baseTable,",
" conglomerates, relevantTriggers, needsDeferredProcessing);",
"",
" markAffectedIndexes(conglomerates);"
],
"header": "@@ -690,12 +690,13 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\tArrayList conglomVector = new ArrayList();",
"\t\tFormatableBitSet\tcolumnMap = DeleteNode.getDeleteReadMap(baseTable,conglomVector, relevantTriggers, needsDeferredProcessing);",
"\t\t",
"\t\tmarkAffectedIndexes( conglomVector );"
]
},
{
"added": [
" * @param conglomerates OUT: list of affected indices"
],
"header": "@@ -901,7 +902,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t *\t@param\tconglomVector\t\tOUT: vector of affected indices"
]
},
{
"added": [
" List conglomerates,"
],
"header": "@@ -915,7 +916,7 @@ public class DeleteNode extends DMLModStatementNode",
"removed": [
"\t\tList\t\t\t\t\t\tconglomVector,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" * @param fbtHolder List that is to be filled with the FromBaseTable",
" boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, List fbtHolder)"
],
"header": "@@ -4289,14 +4289,14 @@ public class FromBaseTable extends FromTable",
"removed": [
"\t * @param\tfbtVector\t\t\tVector that is to be filled with the FromBaseTable\t",
"\tboolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, List fbtVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java",
"hunks": [
{
"added": [
" ArrayList fbtHolder = new ArrayList(1);",
" boolean minMaxOptimizationPossible = isOrderedOn(crs, false, fbtHolder);",
" SanityManager.ASSERT(fbtHolder.size() <= 1,",
" \"bad number of FromBaseTables returned by isOrderedOn() -- \" +",
" fbtHolder.size());"
],
"header": "@@ -1248,12 +1248,14 @@ public class GroupByNode extends SingleChildResultSetNode",
"removed": [
"\t\t\t\t\t\tArrayList tableVector = new ArrayList(1);",
"\t\t\t\t\t\tboolean minMaxOptimizationPossible = isOrderedOn(crs, false, tableVector);",
"\t\t\t\t\t\t\tSanityManager.ASSERT(tableVector.size() <= 1, \"bad number of FromBaseTables returned by isOrderedOn() -- \"+tableVector.size());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java",
"hunks": [
{
"added": [
" ** traversing the list in the next loop,"
],
"header": "@@ -542,7 +542,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\t** traversing the Vector in the next loop,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" * @param updateColumns A list representing the columns"
],
"header": "@@ -2863,7 +2863,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t * @param updateColumns\t\tA Vector representing the columns"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowOrderingImpl.java",
"hunks": [
{
"added": [
"import java.util.Iterator;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
},
{
"added": [
" /** List of ColumnOrderings. */"
],
"header": "@@ -32,7 +33,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"\t/* This vector contains ColumnOrderings */"
]
},
{
"added": [
" /**",
" * List of table numbers for tables that are always ordered.",
" * This happens for one-row tables.",
" */",
" /** List of unordered Optimizables. */"
],
"header": "@@ -45,15 +46,15 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t/*",
"\t** This vector contains table numbers for tables that are always ordered.",
"\t** This happens for one-row tables.",
"\t*/",
"\t/* This vector contains unordered Optimizables */"
]
},
{
"added": [
" if (alwaysOrdered(tableNumber))"
],
"header": "@@ -79,7 +80,7 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\tif (vectorContainsOptimizable(tableNumber, alwaysOrderedOptimizables))"
]
},
{
"added": [
" if (alwaysOrdered(tableNumber))"
],
"header": "@@ -120,7 +121,7 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\tif (vectorContainsOptimizable(tableNumber, alwaysOrderedOptimizables))"
]
},
{
"added": [],
"header": "@@ -154,31 +155,6 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t/**",
"\t * Return true if the given vector of Optimizables contains an Optimizable",
"\t * with the given table number.",
"\t */",
"\tprivate boolean vectorContainsOptimizable(int tableNumber, ArrayList vec)",
"\t{",
"\t\tint i;",
"",
"\t\tfor (i = vec.size() - 1; i >= 0; i--)",
"\t\t{",
"\t\t\tOptimizable optTable =",
"\t\t\t\t\t\t\t(Optimizable) vec.get(i);",
"",
"\t\t\tif (optTable.hasTableNumber())",
"\t\t\t{",
"\t\t\t\tif (optTable.getTableNumber() == tableNumber)",
"\t\t\t\t{",
"\t\t\t\t\treturn true;",
"\t\t\t\t}",
"\t\t\t}",
"\t\t}",
"",
"\t\treturn false;",
"\t}",
""
]
},
{
"added": [
" Iterator it = alwaysOrderedOptimizables.iterator();",
" while (it.hasNext()) {",
" Optimizable optTable = (Optimizable) it.next();",
"",
" if (optTable.hasTableNumber()) {",
" if (optTable.getTableNumber() == tableNumber) {",
" return true;",
" }",
" }",
" }",
"",
" return false;"
],
"header": "@@ -280,10 +256,18 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\treturn vectorContainsOptimizable(",
"\t\t\t\t\t\t\t\t\t\ttableNumber,",
"\t\t\t\t\t\t\t\t\t\talwaysOrderedOptimizables",
"\t\t\t\t\t\t\t\t\t\t);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
" ArrayList constraints = new ArrayList();"
],
"header": "@@ -171,7 +171,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
" ArrayList constraintsVector = new ArrayList();"
]
},
{
"added": [
" constraints.add(cd);"
],
"header": "@@ -191,7 +191,7 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
" constraintsVector.add(cd);"
]
},
{
"added": [
" // If constraint is primary key or unique key, add it to the list.",
" /* In case of create table, the list can have only ConstraintDefinitionNode"
],
"header": "@@ -252,11 +252,11 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t//if constraint is primary key or unique key, add it to the vector",
"\t\t\t\t/* In case of create table, the vector can have only ConstraintDefinitionNode"
]
},
{
"added": [
" for (int i = 0; i < constraints.size(); i++)",
" destConstraint = constraints.get(i);"
],
"header": "@@ -265,10 +265,10 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": [
"\t\t\t\tfor (int i=0; i<constraintsVector.size();i++)",
"\t\t\t\t\tdestConstraint = constraintsVector.get(i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java",
"hunks": [
{
"added": [
" ArrayList conglomerates = new ArrayList();",
" dd, baseTable, updateColumnList, conglomerates, relevantCdl,",
" markAffectedIndexes(conglomerates);"
],
"header": "@@ -888,16 +888,16 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\tArrayList conglomVector = new ArrayList();",
" dd, baseTable, updateColumnList, conglomVector, relevantCdl,",
"\t\tmarkAffectedIndexes( conglomVector );"
]
},
{
"added": [
" * @param conglomerates OUT: list of affected indices"
],
"header": "@@ -971,7 +971,7 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t *\t@param\tconglomVector\t\tOUT: vector of affected indices"
]
},
{
"added": [
" List conglomerates,"
],
"header": "@@ -989,7 +989,7 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\tList\t\t\t\t\t\tconglomVector,"
]
}
]
}
] |
derby-DERBY-6075-c0a807c0
|
DERBY-6075: Use modern collections in impl/sql/compile
Make CollectNodesVisitor return a List instead of a Vector.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448064 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -167,7 +167,6 @@ import java.util.Hashtable;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import java.util.List;",
" * in a list."
],
"header": "@@ -21,17 +21,14 @@",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import org.apache.derby.iapi.error.StandardException;",
"",
"import java.util.Vector;",
"",
" * in a vector."
]
},
{
"added": [
" private final List nodeList;",
" private final Class nodeClass;",
" private final Class skipOverClass;",
""
],
"header": "@@ -40,9 +37,10 @@ import java.util.Vector;",
"removed": [
"\tprivate Vector\tnodeList;",
"\tprivate Class \tnodeClass;",
"\tprivate Class\tskipOverClass;"
]
},
{
"added": [
" this(nodeClass, null);"
],
"header": "@@ -51,8 +49,7 @@ public class CollectNodesVisitor implements Visitor",
"removed": [
"\t\tthis.nodeClass = nodeClass;",
"\t\tnodeList = new Vector();"
]
},
{
"added": [
" this.nodeList = new ArrayList();",
" this.nodeClass = nodeClass;"
],
"header": "@@ -65,7 +62,8 @@ public class CollectNodesVisitor implements Visitor",
"removed": [
"\t\tthis(nodeClass);"
]
},
{
"added": [
"\t * Don't visit children under the skipOverClass"
],
"header": "@@ -101,7 +99,7 @@ public class CollectNodesVisitor implements Visitor",
"removed": [
"\t * Don't visit childen under the skipOverClass"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -26,6 +26,7 @@ import java.util.Collections;",
"removed": []
},
{
"added": [],
"header": "@@ -42,8 +43,6 @@ import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;",
"removed": [
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"import org.apache.derby.iapi.types.TypeId;"
]
},
{
"added": [
"\t\t\tList tabs = visitor.getList();"
],
"header": "@@ -603,7 +602,7 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
"\t\t\tVector tabs = visitor.getList();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromSubquery.java",
"hunks": [
{
"added": [
"import java.util.Iterator;",
"import java.util.List;"
],
"header": "@@ -21,8 +21,8 @@",
"removed": [
"import java.util.Enumeration;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromVTI.java",
"hunks": [
{
"added": [
"import java.util.Iterator;",
"import java.util.List;"
],
"header": "@@ -32,6 +32,8 @@ import java.sql.SQLException;",
"removed": []
},
{
"added": [
"\t\tList colRefs = getNodesFromParameters(ColumnReference.class);",
"\t\tfor (Iterator it = colRefs.iterator(); it.hasNext(); )",
"\t\t\tColumnReference ref = (ColumnReference) it.next();"
],
"header": "@@ -901,11 +903,11 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tVector colRefs = getNodesFromParameters(ColumnReference.class);",
"\t\tfor (Enumeration e = colRefs.elements(); e.hasMoreElements(); )",
"\t\t\tColumnReference ref = (ColumnReference)e.nextElement();"
]
},
{
"added": [
"\t * @return A list containing all of the nodes of interest.",
"\tList getNodesFromParameters(Class nodeClass)"
],
"header": "@@ -1006,11 +1008,11 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t * @return A vector containing all of the nodes of interest.",
"\tVector getNodesFromParameters(Class nodeClass)"
]
},
{
"added": [
"\t\tList colRefs = getNodesFromParameters(ColumnReference.class);",
"\t\tfor (Iterator it = colRefs.iterator(); it.hasNext(); )",
"\t\t\tColumnReference ref = (ColumnReference) it.next();"
],
"header": "@@ -1610,10 +1612,10 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\tVector colRefs = getNodesFromParameters(ColumnReference.class);",
"\t\tfor (Enumeration e = colRefs.elements(); e.hasMoreElements(); )",
"\t\t\tColumnReference ref = (ColumnReference)e.nextElement();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,32 +21,17 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"",
"import org.apache.derby.iapi.services.compiler.LocalField;",
" import org.apache.derby.iapi.store.access.Qualifier;",
"",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import java.lang.reflect.Modifier;",
"",
"import java.sql.Types;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java",
"hunks": [
{
"added": [
"import java.util.Iterator;"
],
"header": "@@ -56,11 +56,10 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": [
"import java.lang.reflect.Method;",
"import java.util.Enumeration;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;"
]
},
{
"added": [],
"header": "@@ -41,25 +40,15 @@ import org.apache.derby.iapi.sql.compile.RowOrdering;",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"",
"import org.apache.derby.iapi.sql.execute.ExecIndexRow;",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.sql.Row;",
"import org.apache.derby.iapi.sql.dictionary.StatisticsDescriptor;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.store.access.Qualifier;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;"
]
},
{
"added": [
"import java.util.Iterator;",
"import java.util.List;"
],
"header": "@@ -67,11 +56,10 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": [
"import java.sql.Types;",
"import java.util.Enumeration;",
"import java.util.Properties;"
]
},
{
"added": [
"\t\t\tList colRefs = getCRs.getList();"
],
"header": "@@ -1480,7 +1468,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\tVector colRefs = getCRs.getList();"
]
},
{
"added": [
"\t\t\t\tfor (Iterator it = colRefs.iterator(); it.hasNext(); )",
"\t\t\t\t\tColumnReference ref = (ColumnReference) it.next();"
],
"header": "@@ -1489,9 +1477,9 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": [
"\t\t\t\tfor (Enumeration e = colRefs.elements(); e.hasMoreElements(); )",
"\t\t\t\t\tColumnReference ref = (ColumnReference)e.nextElement();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import java.util.Arrays;"
]
},
{
"added": [],
"header": "@@ -39,7 +38,6 @@ import org.apache.derby.iapi.reference.Limits;",
"removed": [
"import org.apache.derby.iapi.store.access.TransactionController;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -47,6 +45,7 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": []
},
{
"added": [
"\tList windowFuncCalls;"
],
"header": "@@ -95,7 +94,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\tVector windowFuncCalls;"
]
},
{
"added": [
"\t\t\t\t\t(WindowFunctionNode) windowFuncCalls.get(i);"
],
"header": "@@ -195,7 +194,7 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\t\t\t\t\t(WindowFunctionNode)windowFuncCalls.elementAt(i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -25,23 +25,21 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.sql.compile.AccessPath;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.StringDataValue;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [],
"header": "@@ -33,7 +33,6 @@ import org.apache.derby.iapi.sql.compile.CompilerContext;",
"removed": [
"import org.apache.derby.iapi.types.StringDataValue;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -63,6 +62,7 @@ import org.apache.derby.catalog.UUID;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/WindowResultSetNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -20,37 +20,16 @@",
"removed": [
"import java.util.Iterator;",
"import java.util.Vector;",
"import java.util.Comparator;",
"import java.util.Collections;",
"",
"import org.apache.derby.catalog.IndexDescriptor;",
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.iapi.services.io.FormatableArrayHolder;",
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;",
"import org.apache.derby.iapi.sql.compile.AccessPath;",
"import org.apache.derby.iapi.sql.compile.CostEstimate;",
"import org.apache.derby.iapi.sql.compile.Optimizable;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicate;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicateList;",
"import org.apache.derby.iapi.sql.compile.Optimizer;",
"import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;",
"import org.apache.derby.iapi.sql.compile.RowOrdering;",
"import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.store.access.ColumnOrdering;",
"import org.apache.derby.impl.sql.execute.AggregatorInfo;",
"import org.apache.derby.impl.sql.execute.AggregatorInfoList;"
]
},
{
"added": [
" List windowFuncCalls;"
],
"header": "@@ -64,7 +43,7 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" Vector windowFuncCalls;"
]
},
{
"added": [
" this.windowFuncCalls = (List) windowFuncCalls;"
],
"header": "@@ -85,7 +64,7 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" this.windowFuncCalls = (Vector)windowFuncCalls;"
]
},
{
"added": [
" List colRefs = getCRVisitor.getList();",
" ArrayList uniqueCols = new ArrayList();",
" ColumnReference cr = (ColumnReference) colRefs.get(i);"
],
"header": "@@ -175,13 +154,13 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" Vector colRefs = getCRVisitor.getList();",
" Vector uniqueCols = new Vector();",
" ColumnReference cr = (ColumnReference)colRefs.elementAt(i);"
]
},
{
"added": [
" List vcs = getVCVisitor.getList();",
" uniqueCols.add(vcs.get(i));",
" ValueNode crOrVcn = (ValueNode) uniqueCols.get(i);"
],
"header": "@@ -195,18 +174,18 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" Vector vcs = getVCVisitor.getList();",
" uniqueCols.add(vcs.elementAt(i));",
" ValueNode crOrVcn = (ValueNode)uniqueCols.elementAt(i);"
]
},
{
"added": [
" private boolean colRefAlreadySeen(List uniqueColRefs,",
" ColumnReference cr = (ColumnReference) uniqueColRefs.get(i);"
],
"header": "@@ -253,12 +232,12 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" private boolean colRefAlreadySeen(Vector uniqueColRefs,",
" ColumnReference cr = (ColumnReference)uniqueColRefs.elementAt(i);"
]
}
]
}
] |
derby-DERBY-6075-c7000cb7
|
DERBY-6075: Use modern collections in impl/sql/compile
- Use ArrayList instead of Vector in ColumnOrdering and RowOrderingImpl
- Use ReuseFactory to allocate Integer instances for table number and
column number
- Use library methods List.contains() and List.isEmpty()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1451125 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -21,12 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.sql.compile.Optimizable;",
"",
"",
"import java.util.Vector;"
]
},
{
"added": [
" private final ArrayList columns = new ArrayList();",
" private final ArrayList tables = new ArrayList();"
],
"header": "@@ -34,13 +32,13 @@ class ColumnOrdering {",
"removed": [
"\tVector columns = new Vector();",
"\tVector tables = new Vector();"
]
},
{
"added": [
" tables.add(ReuseFactory.getInteger(tableNumber));",
" columns.add(ReuseFactory.getInteger(columnNumber));"
],
"header": "@@ -112,8 +110,8 @@ class ColumnOrdering {",
"removed": [
"\t\ttables.add(new Integer(tableNumber));",
"\t\tcolumns.add(new Integer(columnNumber));"
]
},
{
"added": [
"\t\treturn tables.isEmpty();"
],
"header": "@@ -141,7 +139,7 @@ class ColumnOrdering {",
"removed": [
"\t\treturn (tables.size() == 0);"
]
},
{
"added": [
"\t\t\tretval.columns.add(columns.get(i));",
"\t\t\tretval.tables.add(tables.get(i));"
],
"header": "@@ -150,8 +148,8 @@ class ColumnOrdering {",
"removed": [
"\t\t\tretval.columns.addElement(columns.get(i));",
"\t\t\tretval.tables.addElement(tables.get(i));"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowOrderingImpl.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
""
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
},
{
"added": [
"\tprivate final ArrayList ordering = new ArrayList();"
],
"header": "@@ -28,12 +30,10 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;",
"",
"\tVector ordering;"
]
},
{
"added": [
" private final ArrayList alwaysOrderedOptimizables = new ArrayList();",
" private final ArrayList unorderedOptimizables = new ArrayList();"
],
"header": "@@ -49,18 +49,15 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\tVector alwaysOrderedOptimizables;",
"\tVector unorderedOptimizables;",
"\t\tordering = new Vector();",
"\t\tunorderedOptimizables = new Vector();",
"\t\talwaysOrderedOptimizables = new Vector();"
]
},
{
"added": [
"\tprivate boolean vectorContainsOptimizable(int tableNumber, ArrayList vec)"
],
"header": "@@ -161,7 +158,7 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\tprivate boolean vectorContainsOptimizable(int tableNumber, Vector vec)"
]
},
{
"added": [
" if (!unorderedOptimizables.isEmpty()) {",
" }",
"\t\tif (ordering.isEmpty())"
],
"header": "@@ -187,12 +184,13 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\tif (unorderedOptimizables.size() > 0)",
"\t\tif (ordering.size() == 0)"
]
},
{
"added": [
" if (!unorderedOptimizables.isEmpty()) {",
" }"
],
"header": "@@ -219,8 +217,9 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\tif (unorderedOptimizables.size() > 0)"
]
},
{
"added": [
"\t\t\t\t(ordering.isEmpty()) ||"
],
"header": "@@ -250,7 +249,7 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\t\t\t\t(ordering.size() == 0) ||"
]
},
{
"added": [
"\tprivate void removeOptimizableFromVector(int tableNumber, ArrayList vec)"
],
"header": "@@ -321,7 +320,7 @@ class RowOrderingImpl implements RowOrdering {",
"removed": [
"\tprivate void removeOptimizableFromVector(int tableNumber, Vector vec)"
]
}
]
}
] |
derby-DERBY-6075-f33fbafe
|
DERBY-6075: Use modern collections in impl/sql/compile
Change the signatures of
- ValueNode.bindExpression(FromList, SubqueryList, Vector)
- ValueNode.bindExpression(FromList, SubqueryList, Vector, boolean)
- JavaValueNode.bindExpression(FromList, SubqueryList, Vector)
- all overrides of the above methods
to use java.util.List instead of java.util.Vector.
The actual arguments passed to said methods are still of type
java.util.Vector.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448065 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java",
"hunks": [
{
"added": [],
"header": "@@ -27,37 +27,24 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.error.StandardException;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.iapi.sql.execute.ExecAggregator;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.catalog.TypeDescriptor;",
"",
"import org.apache.derby.impl.sql.compile.CountAggregateDefinition;",
"import org.apache.derby.impl.sql.compile.MaxMinAggregateDefinition;",
"import org.apache.derby.impl.sql.compile.SumAvgAggregateDefinition;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -20,13 +20,11 @@",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"import java.sql.Types;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AndNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,14 +21,12 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.compile.NodeFactory;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,27 +21,22 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.NumberDataValue;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import java.sql.Types;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,11 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.DataValueDescriptor;"
]
},
{
"added": [],
"header": "@@ -33,10 +32,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import java.util.Vector;",
"import java.sql.Types;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -28,13 +29,11 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,28 +21,18 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.iapi.types.BooleanDataValue;",
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"import org.apache.derby.iapi.services.compiler.LocalField;",
"import java.lang.reflect.Modifier;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -29,6 +29,7 @@ import org.apache.derby.iapi.services.compiler.MethodBuilder;",
"removed": []
},
{
"added": [],
"header": "@@ -39,7 +40,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CastNode.java",
"hunks": [
{
"added": [],
"header": "@@ -31,7 +31,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.types.StringDataValue;"
]
},
{
"added": [],
"header": "@@ -47,12 +46,10 @@ import org.apache.derby.iapi.util.StringUtil;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -60,7 +57,7 @@ import org.apache.derby.iapi.util.ReuseFactory;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -28,12 +29,10 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -38,7 +38,7 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -29,7 +30,6 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [],
"header": "@@ -38,7 +38,6 @@ import org.apache.derby.iapi.store.access.Qualifier;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -39,7 +39,7 @@ import org.apache.derby.iapi.reference.ClassName;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,33 +21,23 @@",
"removed": [
"import org.apache.derby.iapi.services.monitor.Monitor;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.types.BooleanDataValue;",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [],
"header": "@@ -56,7 +46,6 @@ import org.apache.derby.iapi.reference.ClassName;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tFromList fromList, SubqueryList subqueryList, List aggregateVector)"
],
"header": "@@ -207,7 +196,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\tFromList fromList, SubqueryList subqueryList, Vector aggregateVector)"
]
},
{
"added": [
"\t SubqueryList subqueryList, List aggregateVector)"
],
"header": "@@ -293,7 +282,7 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t SubqueryList subqueryList, Vector aggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -31,13 +32,9 @@ import org.apache.derby.iapi.services.compiler.LocalField;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.iapi.util.ReuseFactory;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,11 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.TypeId;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -34,15 +32,12 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import java.lang.reflect.Modifier;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,31 +21,21 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.types.RefDataValue;",
"import org.apache.derby.iapi.types.RowLocation;",
"import org.apache.derby.iapi.sql.execute.CursorResultSet;",
"",
"import org.apache.derby.iapi.services.compiler.ClassBuilder;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.catalog.TypeDescriptor;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,18 +21,13 @@",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -43,7 +38,7 @@ import java.lang.reflect.Modifier;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -40,7 +41,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -38,7 +37,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java",
"hunks": [
{
"added": [],
"header": "@@ -32,7 +32,6 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,40 +21,25 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import org.apache.derby.iapi.jdbc.ConnectionContext;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.execute.BaseActivation;",
"import org.apache.derby.catalog.TypeDescriptor;",
"import java.sql.SQLException;",
"import java.sql.Types;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,12 +21,11 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [],
"header": "@@ -34,7 +33,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/IsNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,24 +21,15 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import org.apache.derby.iapi.sql.compile.NodeFactory;",
"",
"import org.apache.derby.iapi.types.BooleanDataValue;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import java.lang.reflect.Modifier;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -34,18 +33,15 @@ import org.apache.derby.iapi.services.compiler.LocalField;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java",
"hunks": [
{
"added": [],
"header": "@@ -25,19 +25,13 @@ import org.apache.derby.iapi.sql.compile.CompilerContext;",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.services.i18n.MessageService;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -55,7 +49,7 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -25,19 +25,15 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.types.ConcatableDataValue;",
"import org.apache.derby.iapi.sql.compile.TypeCompiler;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -24,12 +24,9 @@ package org.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -38,18 +35,15 @@ import org.apache.derby.iapi.sql.compile.TypeCompiler;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.iapi.services.compiler.LocalField;",
"import java.lang.reflect.Modifier;",
"import org.apache.derby.iapi.reference.ClassName;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java",
"hunks": [
{
"added": [],
"header": "@@ -62,7 +62,6 @@ import java.sql.ResultSet;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;"
]
},
{
"added": [],
"header": "@@ -34,26 +33,19 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.catalog.AliasInfo;",
"import java.util.Vector;",
"import java.util.Enumeration;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -25,14 +25,13 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.iapi.services.compiler.LocalField;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,19 +21,11 @@",
"removed": [
"import org.apache.derby.iapi.reference.SQLState;",
"",
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -42,19 +34,13 @@ import org.apache.derby.iapi.services.loader.ClassInspector;",
"removed": [
"import org.apache.derby.iapi.types.JSQLType;",
"",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import org.apache.derby.iapi.error.ExceptionSeverity;",
"import org.apache.derby.catalog.AliasInfo;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,13 +21,12 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -22,7 +22,7 @@",
"removed": [
"import java.util.Enumeration;"
]
},
{
"added": [],
"header": "@@ -30,7 +30,6 @@ import org.apache.derby.iapi.reference.ClassName;",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,7 +21,7 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [],
"header": "@@ -31,7 +31,6 @@ import org.apache.derby.iapi.services.io.StoredFormatIds;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -22,10 +22,9 @@ package org.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java",
"hunks": [
{
"added": [],
"header": "@@ -28,18 +28,8 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.types.StringDataValue;",
"",
"import org.apache.derby.iapi.sql.compile.TypeCompiler;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -49,7 +39,7 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -25,19 +25,17 @@ import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java",
"hunks": [
{
"added": [],
"header": "@@ -24,7 +24,6 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.types.StringDataValue;"
]
},
{
"added": [],
"header": "@@ -33,7 +32,6 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -45,7 +43,7 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticClassFieldReferenceNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.monitor.Monitor;"
]
},
{
"added": [],
"header": "@@ -29,14 +28,12 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -44,7 +41,7 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -53,8 +53,8 @@ import org.apache.derby.catalog.AliasInfo;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\tList aggregateVector)"
],
"header": "@@ -178,7 +178,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\tVector\taggregateVector) "
]
},
{
"added": [
" private void resolveRoutine(FromList fromList, SubqueryList subqueryList,",
" List aggregateVector, SchemaDescriptor sd)",
" throws StandardException {"
],
"header": "@@ -500,7 +500,9 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\tprivate void resolveRoutine(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, SchemaDescriptor sd) throws StandardException {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -45,15 +44,12 @@ import org.apache.derby.iapi.store.access.Qualifier;",
"removed": [
"import java.util.Iterator;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -26,12 +26,10 @@ import org.apache.derby.iapi.services.compiler.LocalField;",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
"import org.apache.derby.iapi.types.StringDataValue;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -45,7 +43,7 @@ import org.apache.derby.iapi.util.ReuseFactory;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TestConstraintNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -29,13 +30,10 @@ import org.apache.derby.iapi.reference.ClassName;",
"removed": [
"import org.apache.derby.iapi.types.BooleanDataValue;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TimestampOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,14 +21,11 @@",
"removed": [
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -37,7 +34,7 @@ import org.apache.derby.iapi.services.classfile.VMOpcode;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"",
"import org.apache.derby.iapi.types.StringDataValue;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -32,10 +29,9 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,9 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [],
"header": "@@ -33,19 +33,14 @@ import org.apache.derby.iapi.store.access.ScanController;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import java.sql.Types;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryDateTimestampOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -30,7 +30,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -40,7 +39,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryLogicalOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,7 +21,7 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [],
"header": "@@ -29,9 +29,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -42,7 +42,7 @@ import org.apache.derby.iapi.util.JBitSet;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\t\t\t\t\tList aggregateVector)"
],
"header": "@@ -297,7 +297,7 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
"\t\t\t\t\tVector\taggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UntypedNullConstantNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [],
"header": "@@ -30,7 +31,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,15 +21,13 @@",
"removed": [
"import java.util.Vector;",
"import org.apache.derby.iapi.services.i18n.MessageService;",
"import org.apache.derby.iapi.sql.compile.CompilerContext;"
]
},
{
"added": [
" FromList fromList, SubqueryList subqueryList, List aggregateVector)"
],
"header": "@@ -368,8 +366,7 @@ public abstract class ValueNode extends QueryTreeNode",
"removed": [
"\t\t\t\t\t\t\t\t\tFromList fromList, SubqueryList subqueryList,",
"\t\t\t\t\t\t\t\t\tVector\taggregateVector)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.services.loader.ClassFactory;"
],
"header": "@@ -33,12 +34,12 @@ import org.apache.derby.iapi.types.TypeId;",
"removed": [
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/WindowFunctionNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -20,15 +20,13 @@",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"import java.sql.Types;",
"import java.util.Vector;"
]
},
{
"added": [
" List aggregateVector)"
],
"header": "@@ -109,7 +107,7 @@ public abstract class WindowFunctionNode extends UnaryOperatorNode",
"removed": [
" Vector aggregateVector)"
]
}
]
}
] |
derby-DERBY-6081-e25c098c
|
DERBY-6081: JDBC 4.2 setObject() and updateObject() methods throw NPE when type is null
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448278 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6082-74fb1b0a
|
DERBY-6082: Removed re-prepares trigged by openOnServer_
Changed piggy-backing of prepare of preparedStatementForAutogeneratedKeys_ so that it doesn't need openOnServer_
Removed MaterialStatement.markClosedOnServer and implementation since it did not do anything.
Since this reduced ClientStatement.markClosedOnServer() to a cleanup-method for section_, it was removed and section_ was encapsulated as a private member where setSection is responsible for cleanup.
Patch file derby-6082a.diff. (+ review comment)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1539540 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/ClientPreparedStatement.java",
"hunks": [
{
"added": [
" setSection(section);"
],
"header": "@@ -200,7 +200,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" section_ = section;"
]
},
{
"added": [
" setSection(agent_.sectionManager_.getPositionedUpdateSection(cursorName, false)); // false means get a regular section",
" if (getSection() == null) {"
],
"header": "@@ -279,9 +279,9 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" section_ = agent_.sectionManager_.getPositionedUpdateSection(cursorName, false); // false means get a regular section",
" if (section_ == null) {"
]
},
{
"added": [
" if (getSection().getClientCursorName() != null && // cursor name is user defined",
" cursorName.compareTo(getSection().getClientCursorName()) == 0)",
" sql_ = substituteClientCursorNameWithServerCursorName(sql_, getSection());",
" setSection(agent_.sectionManager_.getDynamicSection(resultSetHoldability_));"
],
"header": "@@ -294,16 +294,16 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" if (section_.getClientCursorName() != null && // cursor name is user defined",
" cursorName.compareTo(section_.getClientCursorName()) == 0)",
" sql_ = substituteClientCursorNameWithServerCursorName(sql_, section_);",
" section_ = agent_.sectionManager_.getDynamicSection(resultSetHoldability_);"
]
},
{
"added": [
" writePrepareDescribeOutput(sql_, getSection());",
" writeDescribeInput(getSection());"
],
"header": "@@ -1904,8 +1904,8 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" writePrepareDescribeOutput(sql_, section_);",
" writeDescribeInput(section_);"
]
},
{
"added": [
" writePrepare(sql_, getSection());",
" writeDescribeInput(getSection());"
],
"header": "@@ -1917,8 +1917,8 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" writePrepare(sql_, section_);",
" writeDescribeInput(section_);"
]
},
{
"added": [
" boolean prepareSentForAutoGeneratedKeys = false;"
],
"header": "@@ -2021,6 +2021,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": []
},
{
"added": [
" writeExecute(getSection(),"
],
"header": "@@ -2044,7 +2045,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" writeExecute(section_,"
]
},
{
"added": [
" if (preparedStatementForAutoGeneratedKeys_ == null) {",
" preparedStatementForAutoGeneratedKeys_ =",
" prepareAutoGeneratedKeysStatement(connection_);",
" prepareSentForAutoGeneratedKeys = true;",
" }",
" ",
" writeOpenQuery(preparedStatementForAutoGeneratedKeys_.getSection(),"
],
"header": "@@ -2053,8 +2054,13 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" prepareAutoGeneratedKeysStatement();",
" writeOpenQuery(preparedStatementForAutoGeneratedKeys_.section_,"
]
},
{
"added": [
" writeOpenQuery(getSection(),"
],
"header": "@@ -2076,7 +2082,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" writeOpenQuery(section_,"
]
},
{
"added": [
" null, getSection(),"
],
"header": "@@ -2086,8 +2092,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" null,",
" section_,"
]
},
{
"added": [
" if (prepareSentForAutoGeneratedKeys) {",
" preparedStatementForAutoGeneratedKeys_.materialPreparedStatement_.readPrepareDescribeOutput_();",
" }",
" "
],
"header": "@@ -2124,7 +2129,10 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" readPrepareAutoGeneratedKeysStatement();"
]
},
{
"added": [
" writeExecute(getSection(),"
],
"header": "@@ -2290,7 +2298,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" writeExecute(section_,"
]
},
{
"added": [
" null, getSection(),"
],
"header": "@@ -2303,8 +2311,7 @@ public class ClientPreparedStatement extends ClientStatement",
"removed": [
" null, // no procedure name supplied for prepared CALLs",
" section_,"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientResultSet.java",
"hunks": [
{
"added": [
" writeCursorClose_(statement_.getSection());"
],
"header": "@@ -501,7 +501,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writeCursorClose_(statement_.section_);"
]
},
{
"added": [
" writeCursorClose_(statement_.getSection());"
],
"header": "@@ -519,7 +519,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writeCursorClose_(statement_.section_);"
]
},
{
"added": [
" statement_.cursorName_ = statement_.getSection().getServerCursorName();"
],
"header": "@@ -1948,7 +1948,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" statement_.cursorName_ = statement_.section_.getServerCursorName();"
]
},
{
"added": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.getSection() : generatedSection_,"
],
"header": "@@ -4054,7 +4054,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_,"
]
},
{
"added": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.getSection() : generatedSection_,"
],
"header": "@@ -4072,7 +4072,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_,"
]
},
{
"added": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.getSection() : generatedSection_,"
],
"header": "@@ -4096,16 +4096,10 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_,",
"",
" // re-prepare the update statement if repreparing is needed after a commit.",
" if (!preparedStatementForUpdate_.openOnServer_) {",
" preparedStatementForUpdate_.materialPreparedStatement_.writePrepare_(preparedStatementForUpdate_.sql_,",
" preparedStatementForUpdate_.section_);",
" }"
]
},
{
"added": [],
"header": "@@ -4127,10 +4121,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // read prepare replies if the update statement is re-prepared after a commit.",
" if (!preparedStatementForUpdate_.openOnServer_) {",
" preparedStatementForUpdate_.materialPreparedStatement_.readPrepare_();",
" }"
]
},
{
"added": [],
"header": "@@ -4139,13 +4129,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // re-prepare the insert statement if repreparing is needed after a commit.",
" if (!preparedStatementForInsert_.openOnServer_) {",
" preparedStatementForInsert_.materialPreparedStatement_.writePrepare_(",
" preparedStatementForInsert_.sql_,",
" preparedStatementForInsert_.section_);",
" }",
""
]
},
{
"added": [],
"header": "@@ -4154,11 +4137,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // read prepare replies if the update statement is re-prepared after a commit.",
" if (!preparedStatementForInsert_.openOnServer_) {",
" preparedStatementForInsert_.materialPreparedStatement_.readPrepare_();",
" }",
""
]
},
{
"added": [],
"header": "@@ -4168,12 +4146,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // re-prepare the update statement if repreparing is needed after a commit.",
" if (!preparedStatementForUpdate_.openOnServer_) {",
" preparedStatementForUpdate_.materialPreparedStatement_.writePrepare_(preparedStatementForUpdate_.sql_,",
" preparedStatementForUpdate_.section_);",
" }",
""
]
},
{
"added": [],
"header": "@@ -4194,11 +4166,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // read prepare replies if the update statement is re-prepared after a commit.",
" if (!preparedStatementForUpdate_.openOnServer_) {",
" preparedStatementForUpdate_.materialPreparedStatement_.readPrepare_();",
" }",
""
]
},
{
"added": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.getSection() : generatedSection_,"
],
"header": "@@ -4218,17 +4185,11 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" writePositioningFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_,",
" // re-prepare the update statement if repreparing is needed after a commit.",
" if (!preparedStatementForDelete_.openOnServer_) {",
" preparedStatementForDelete_.materialPreparedStatement_.writePrepare_(preparedStatementForDelete_.sql_,",
" preparedStatementForDelete_.section_);",
" }",
""
]
},
{
"added": [],
"header": "@@ -4248,10 +4209,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // read prepare replies if the update statement is re-prepared after a commit.",
" if (!preparedStatementForDelete_.openOnServer_) {",
" preparedStatementForDelete_.materialPreparedStatement_.readPrepare_();",
" }"
]
},
{
"added": [],
"header": "@@ -4262,12 +4219,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // re-prepare the update statement if repreparing is needed after a commit.",
" if (!preparedStatementForDelete_.openOnServer_) {",
" preparedStatementForDelete_.materialPreparedStatement_.writePrepare_(preparedStatementForDelete_.sql_,",
" preparedStatementForDelete_.section_);",
" }",
""
]
},
{
"added": [],
"header": "@@ -4280,10 +4231,6 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" // read prepare replies if the update statement is re-prepared after a commit.",
" if (!preparedStatementForDelete_.openOnServer_) {",
" preparedStatementForDelete_.materialPreparedStatement_.readPrepare_();",
" }"
]
},
{
"added": [
" preparedStatementForInsert_.getSection(),"
],
"header": "@@ -4349,7 +4296,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" preparedStatementForInsert_.section_,"
]
},
{
"added": [
" preparedStatementForUpdate_.materialPreparedStatement_.writeExecute_(preparedStatementForUpdate_.getSection(),"
],
"header": "@@ -4367,7 +4314,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" preparedStatementForUpdate_.materialPreparedStatement_.writeExecute_(preparedStatementForUpdate_.section_,"
]
},
{
"added": [
" preparedStatementForDelete_.materialPreparedStatement_.writeExecute_(preparedStatementForDelete_.getSection(),",
" preparedStatementForDelete_.materialPreparedStatement_.writeExecute_(preparedStatementForDelete_.getSection(),"
],
"header": "@@ -4384,14 +4331,14 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" preparedStatementForDelete_.materialPreparedStatement_.writeExecute_(preparedStatementForDelete_.section_,",
" preparedStatementForDelete_.materialPreparedStatement_.writeExecute_(preparedStatementForDelete_.section_,"
]
},
{
"added": [
" return statement_.getSection().getServerCursorName();"
],
"header": "@@ -4709,7 +4656,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" return statement_.section_.getServerCursorName();"
]
},
{
"added": [
" statement_.getSection().getPositionedUpdateSection());"
],
"header": "@@ -4734,7 +4681,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" statement_.section_.getPositionedUpdateSection());"
]
},
{
"added": [
" statement_.getSection().getPositionedUpdateSection()); // update section"
],
"header": "@@ -4744,7 +4691,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" statement_.section_.getPositionedUpdateSection()); // update section"
]
},
{
"added": [
" Section section = (generatedSection_ == null) ? statement_.getSection() : generatedSection_;"
],
"header": "@@ -5002,7 +4949,7 @@ public abstract class ClientResultSet implements ResultSet,",
"removed": [
" Section section = (generatedSection_ == null) ? statement_.section_ : generatedSection_;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientStatement.java",
"hunks": [
{
"added": [
" private Section section_;"
],
"header": "@@ -66,7 +66,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" public Section section_;"
]
},
{
"added": [],
"header": "@@ -141,13 +141,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" // This means a DERBY server-side section for this statement is in the prepared state.",
" // A client-side jdbc statement may remain open across commits (openOnClient=true),",
" // but the server-side DERBY section moves to an unprepared state (openOnServer=false) across commits,",
" // requiring an implicit re-prepare \"under the covers\" by the driver.",
" // Unprepared jdbc query statements still have prepared sections on the server.",
" // This openOnServer_ only has implications for preparedstatement",
" boolean openOnServer_ = false;"
]
},
{
"added": [],
"header": "@@ -265,7 +258,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" openOnServer_ = false;"
]
},
{
"added": [],
"header": "@@ -1766,7 +1758,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" openOnServer_ = true;"
]
},
{
"added": [],
"header": "@@ -1798,7 +1789,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" openOnServer_ = true;"
]
},
{
"added": [],
"header": "@@ -2126,20 +2116,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" private void markClosedOnServer() {",
" if (section_ != null) {",
" section_.free();",
" section_ = null;",
" }",
" openOnServer_ = false;",
" // if an error occurs during the middle of the reset, before the statement",
" // has a chance to reset its materialStatement_, and Agent.disconnectEvent() is called,",
" // then the materialStatement_ here can be null.",
" if (materialStatement_ != null) {",
" materialStatement_.markClosedOnServer_();",
" }",
" }",
""
]
},
{
"added": [
" * 1. finalize() - For the finalizer to be called, the Statement "
],
"header": "@@ -2147,7 +2123,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" * 1. finalize() - For the finaizer to be called, the Statement "
]
},
{
"added": [
" setSection(null);"
],
"header": "@@ -2191,7 +2167,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" markClosedOnServer();"
]
},
{
"added": [
" boolean prepareSentForAutoGeneratedKeys = false;"
],
"header": "@@ -2287,6 +2263,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": []
},
{
"added": [
" if (preparedStatementForAutoGeneratedKeys_ == null) {",
" preparedStatementForAutoGeneratedKeys_ =",
" prepareAutoGeneratedKeysStatement(connection_);",
" prepareSentForAutoGeneratedKeys = true;",
" }",
" writeOpenQuery(preparedStatementForAutoGeneratedKeys_.getSection(),"
],
"header": "@@ -2350,8 +2327,12 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" prepareAutoGeneratedKeysStatement();",
" writeOpenQuery(preparedStatementForAutoGeneratedKeys_.section_,"
]
},
{
"added": [
" setSection(newSection);"
],
"header": "@@ -2384,8 +2365,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" markClosedOnServer();",
" section_ = newSection;"
]
},
{
"added": [
" if (prepareSentForAutoGeneratedKeys) {",
" preparedStatementForAutoGeneratedKeys_.materialPreparedStatement_.readPrepareDescribeOutput_();",
" }"
],
"header": "@@ -2420,7 +2400,9 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" readPrepareAutoGeneratedKeysStatement();"
]
},
{
"added": [
" setSection(agent_.sectionManager_.getDynamicSection(resultSetHoldability_));",
" writeExecuteImmediate(sql, getSection());",
" setSection(writeExecuteCall(sql, true));"
],
"header": "@@ -2487,15 +2469,11 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" if (section_ != null) {",
" section_.free();",
" }",
" section_ =",
" agent_.sectionManager_.getDynamicSection(resultSetHoldability_);",
" writeExecuteImmediate(sql, section_);",
" section_ = writeExecuteCall(sql, true);"
]
},
{
"added": [],
"header": "@@ -2603,8 +2581,6 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" //openOnClient_ = true;",
" openOnServer_ = true;"
]
},
{
"added": [
" (cursorName_, getSection());",
" getSection().setClientCursorName(cursorName_);"
],
"header": "@@ -2958,8 +2934,8 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" (cursorName_, section_);",
" section_.setClientCursorName(cursorName_);"
]
},
{
"added": [
" (getSection().getServerCursorName(), getSection());"
],
"header": "@@ -2967,7 +2943,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" (section_.getServerCursorName(), section_);"
]
},
{
"added": [
" getSection().getServerCursorNameForPositionedUpdate());",
" getSection().getServerCursorName());",
" getSection().getServerCursorNameForPositionedUpdate());"
],
"header": "@@ -3043,17 +3019,17 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" section_.getServerCursorNameForPositionedUpdate());",
" section_.getServerCursorName());",
" section_.getServerCursorNameForPositionedUpdate());"
]
},
{
"added": [
" agent_.sectionManager_.mapCursorNameToResultSet(getSection().getServerCursorName(), resultSet_);"
],
"header": "@@ -3065,7 +3041,7 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" agent_.sectionManager_.mapCursorNameToResultSet(section_.getServerCursorName(), resultSet_);"
]
},
{
"added": [
" protected static ClientPreparedStatement ",
" prepareAutoGeneratedKeysStatement(ClientConnection cc) ",
" String s = \"select IDENTITY_VAL_LOCAL() from SYSIBM.SYSDUMMY1\";",
" ClientPreparedStatement cps =",
" cc.newPreparedStatement_(s,"
],
"header": "@@ -3121,14 +3097,12 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" ",
"",
" private void getPreparedStatementForAutoGeneratedKeys()",
" if (preparedStatementForAutoGeneratedKeys_ == null) {",
" String s = \"select IDENTITY_VAL_LOCAL() from SYSIBM.SYSDUMMY1\";",
" preparedStatementForAutoGeneratedKeys_ =",
" connection_.newPreparedStatement_(s,"
]
},
{
"added": [
" ",
" cps.cursorAttributesToSendOnPrepare_ = Configuration.cursorAttribute_WithHold; ",
" cps.materialPreparedStatement_.writePrepareDescribeOutput_(cps.sql_, cps.getSection());",
" return cps;"
],
"header": "@@ -3139,24 +3113,10 @@ public class ClientStatement implements Statement, StatementCallbackInterface{",
"removed": [
" StringBuffer cursorAttributes = new StringBuffer();",
" cursorAttributes.append(Configuration.cursorAttribute_WithHold);",
" preparedStatementForAutoGeneratedKeys_.cursorAttributesToSendOnPrepare_ = cursorAttributes.toString();",
" }",
" }",
"",
" void prepareAutoGeneratedKeysStatement() throws SqlException {",
" getPreparedStatementForAutoGeneratedKeys();",
" if (!preparedStatementForAutoGeneratedKeys_.openOnServer_) {",
" preparedStatementForAutoGeneratedKeys_.materialPreparedStatement_.writePrepareDescribeOutput_(preparedStatementForAutoGeneratedKeys_.sql_,",
" preparedStatementForAutoGeneratedKeys_.section_);",
" }",
" }",
"",
" void readPrepareAutoGeneratedKeysStatement() throws SqlException {",
" if (!preparedStatementForAutoGeneratedKeys_.openOnServer_) {",
" preparedStatementForAutoGeneratedKeys_.materialPreparedStatement_.readPrepareDescribeOutput_();",
" }"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetResultSet.java",
"hunks": [
{
"added": [
" writeScrollableFetch_((generatedSection_ == null) ? statement_.getSection() : generatedSection_,"
],
"header": "@@ -172,7 +172,7 @@ class NetResultSet extends ClientResultSet {",
"removed": [
" writeScrollableFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_,"
]
},
{
"added": [
" statement_.getSection() :"
],
"header": "@@ -267,7 +267,7 @@ class NetResultSet extends ClientResultSet {",
"removed": [
" statement_.section_ :"
]
}
]
}
] |
derby-DERBY-6086-b6af70a4
|
DERBY-6086: Factor out logic for creating custom connection in jdbcapi.StatementPoolingTest
Factored out logic for creating logical connections with statement caching into
a separate inner helper class. Used when you need to get more than one logical
connection from a single pooled connection.
Patch file: derby-6086-1b-logical_con_boilerplate.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1448956 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6089-4c2fc4ab
|
DERBY-6089: Make old overloads of CallableStatement.registerOutParameter raise a SQLFeatureNotSupportedException when illegal types are used.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455602 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java",
"hunks": [
{
"added": [
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( sqlType ) );",
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( sqlType ), scale );",
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( sqlType ), typeName );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( sqlType ) );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( sqlType ), scale );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( sqlType ), typeName );"
],
"header": "@@ -40,42 +40,42 @@ public class EmbedCallableStatement42 extends EmbedCallableStatement40",
"removed": [
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( this, sqlType ) );",
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( this, sqlType ), scale );",
" registerOutParameter( parameterIndex, Util42.getTypeAsInt( this, sqlType ), typeName );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( this, sqlType ) );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( this, sqlType ), scale );",
" registerOutParameter( parameterName, Util42.getTypeAsInt( this, sqlType ), typeName );"
]
},
{
"added": [
" setObject( parameterIndex, x, Util42.getTypeAsInt( targetSqlType ) );"
],
"header": "@@ -83,7 +83,7 @@ public class EmbedCallableStatement42 extends EmbedCallableStatement40",
"removed": [
" setObject( parameterIndex, x, Util42.getTypeAsInt( this, targetSqlType ) );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java",
"hunks": [
{
"added": [
"\t\tUtil.checkForSupportedDataType(sqlType);"
],
"header": "@@ -335,7 +335,7 @@ public class EmbedPreparedStatement",
"removed": [
"\t\tcheckForSupportedDataType(sqlType);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement42.java",
"hunks": [
{
"added": [
" Util42.getTypeAsInt( targetSqlType )"
],
"header": "@@ -54,7 +54,7 @@ public class EmbedPreparedStatement42 extends EmbedPreparedStatement40",
"removed": [
" Util42.getTypeAsInt( this, targetSqlType )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java",
"hunks": [
{
"added": [
" updateObject( columnIndex, x, Util42.getTypeAsInt( targetSqlType ) );"
],
"header": "@@ -51,7 +51,7 @@ public class EmbedResultSet42 extends org.apache.derby.impl.jdbc.EmbedResultSet4",
"removed": [
" updateObject( columnIndex, x, Util42.getTypeAsInt( this, targetSqlType ) );"
]
},
{
"added": [
" updateObject( columnIndex, x, Util42.getTypeAsInt( targetSqlType ) );"
],
"header": "@@ -59,7 +59,7 @@ public class EmbedResultSet42 extends org.apache.derby.impl.jdbc.EmbedResultSet4",
"removed": [
" updateObject( columnIndex, x, Util42.getTypeAsInt( this, targetSqlType ) );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/Util42.java",
"hunks": [
{
"added": [
" public static int getTypeAsInt( SQLType sqlType )"
],
"header": "@@ -40,7 +40,7 @@ public class Util42",
"removed": [
" public static int getTypeAsInt( ConnectionChild connChild, SQLType sqlType )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.Util;"
],
"header": "@@ -33,6 +33,7 @@ import org.apache.derby.iapi.types.UserDataValue;",
"removed": []
}
]
}
] |
derby-DERBY-609-8629a0fb
|
- DERBY-609 Returning ByteArrayInputStream from ResultSet is not appropriate - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@326534 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/ResultSet.java",
"hunks": [
{
"added": [
"import java.io.IOException;"
],
"header": "@@ -20,7 +20,7 @@",
"removed": [
""
]
},
{
"added": [
"\tprivate CloseFilterInputStream is_;",
""
],
"header": "@@ -35,6 +35,8 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -493,6 +495,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -513,6 +518,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -533,6 +541,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -553,6 +564,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -573,6 +587,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -593,6 +610,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -613,6 +633,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -633,6 +656,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -655,6 +681,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -676,6 +705,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -695,6 +727,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -722,6 +757,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -741,6 +779,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -768,6 +809,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -787,6 +831,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -816,6 +863,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -835,6 +885,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -854,6 +907,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
" return createCloseFilterInputStream(result);",
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -868,11 +924,14 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" return result;"
]
},
{
"added": [
" return createCloseFilterInputStream(result);",
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -890,11 +949,14 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" return result;"
]
},
{
"added": [
" return createCloseFilterInputStream(result);",
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -915,11 +977,14 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" return result;"
]
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -940,6 +1005,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -960,6 +1028,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -980,6 +1051,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -997,6 +1071,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -1014,6 +1091,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
},
{
"added": [
"\t ",
"\t closeCloseFilterInputStream();",
"\t "
],
"header": "@@ -1039,6 +1119,9 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
}
]
}
] |
derby-DERBY-6092-0e593faf
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468229 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6092-643af3da
|
DERBY-6092: IOException when closing LOBFile at end of transaction
A bug in Java 5 may cause IOException if two threads attempt to
close the same RandomAccessFile at the same time.
Avoid this situation by removing the LOBFile from the list of open
files before closing it from LOBStreamControl's finalizer. Then the
cleanup code at the end of the transaction won't find the file and
try to close it if the finalizer is about to close it.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466362 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java",
"hunks": [
{
"added": [
" // Remove the file from the list of open files *first*, then close it.",
" //",
" // Why? This code may be called from finalize(), and may end up running",
" // at the same time the transaction is committed or rolled back. If two",
" // threads call RandomAccessFile.close() at the same time, Java 5 could",
" // fail (see DERBY-6092). By removing it from the list before closing",
" // it, we make sure that EmbedConnection.clearLOBMapping() won't see",
" // it if we get to the file first. Conversely, if clearLOBMapping()",
" // gets to it first, the call to removeLobFile() will block until",
" // clearLOBMapping() is done, so we won't attempt to close the file",
" // until after clearLOBMapping() is done, rather than at the same time.",
" //",
" // Calling close() concurrently is safe on Java 6 and newer, after the",
" // fix for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6322678 .",
" file.close();"
],
"header": "@@ -531,8 +531,22 @@ class LOBStreamControl {",
"removed": [
" file.close();"
]
}
]
}
] |
derby-DERBY-6092-8f1a708d
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
This change adds non-order by test runs based on the
testPositionAgressive() test case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469000 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6092-ca9270d8
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
This change adds non-order by test runs based on the
testTriggersWithClobColumn() test case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468661 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6094-25206833
|
DERBY-6094: Create the database before running login timeout tests, in order to prevent slow database creation from killing the LoginTimeoutTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455156 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6094-25c1e7bc
|
DERBY-6094: Enforce login timeouts in the embedded driver and data sources.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1454600 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/NetConnection.java",
"hunks": [
{
"added": [
"",
" handleLoginTimeout( e );",
" "
],
"header": "@@ -444,6 +444,9 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": []
},
{
"added": [
"",
" handleLoginTimeout( e );",
" "
],
"header": "@@ -488,6 +491,9 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/SQLExceptionFactory40.java",
"hunks": [
{
"added": [
" //no derby sqlstate belongs to",
" ex = new SQLNonTransientConnectionException(message, sqlState, severity, t);"
],
"header": "@@ -72,10 +72,9 @@ public class SQLExceptionFactory40 extends SQLExceptionFactory {",
"removed": [
" //none of the sqlstate supported by derby belongs to",
" ex = new SQLNonTransientConnectionException(message, sqlState,",
" severity, t);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/Driver20.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.reference.SQLState;"
],
"header": "@@ -29,6 +29,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": []
},
{
"added": [
"import java.sql.Connection;",
"import java.sql.DriverManager;",
"import java.sql.SQLException;",
"import java.util.concurrent.Callable;",
"import java.util.concurrent.ExecutionException;",
"import java.util.concurrent.Executors;",
"import java.util.concurrent.ExecutorService;",
"import java.util.concurrent.Future;",
"import java.util.concurrent.ThreadPoolExecutor;",
"import java.util.concurrent.ThreadFactory;",
"import java.util.concurrent.TimeoutException;",
"import java.util.concurrent.TimeUnit;"
],
"header": "@@ -36,14 +37,25 @@ import org.apache.derby.iapi.security.SecurityUtil;",
"removed": [
"import java.sql.SQLException;"
]
},
{
"added": [
" private static ExecutorService _executorPool;",
" static",
" {",
" _executorPool = Executors.newCachedThreadPool();",
" ((ThreadPoolExecutor) _executorPool).setThreadFactory( new DaemonThreadFactory() );",
" } ",
""
],
"header": "@@ -54,6 +66,13 @@ import java.util.Properties;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/InternalDriver.java",
"hunks": [
{
"added": [
"\tpublic Connection connect( String url, Properties info, int loginTimeoutSeconds )"
],
"header": "@@ -156,7 +156,7 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
"\tpublic Connection connect(String url, Properties info)"
]
},
{
"added": [
" EmbedConnection conn;",
"\t\t\t",
" if ( loginTimeoutSeconds <= 0 ) { conn = getNewEmbedConnection( url, finfo ); }",
" else { conn = timeLogin( url, finfo, loginTimeoutSeconds ); }",
" "
],
"header": "@@ -258,9 +258,12 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
"\t\t\t",
"\t\t\tEmbedConnection conn = getNewEmbedConnection(url, finfo);"
]
},
{
"added": [
" /**",
" * Enforce the login timeout.",
" */",
" protected abstract EmbedConnection timeLogin( String url, Properties info, int loginTimeoutSeconds )",
" throws SQLException;",
" "
],
"header": "@@ -281,6 +284,12 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": []
}
]
},
{
"file": "java/shared/org/apache/derby/shared/common/reference/SQLState.java",
"hunks": [
{
"added": [
"\t <LI> XBDA Communications"
],
"header": "@@ -107,7 +107,7 @@ package org.apache.derby.shared.common.reference;",
"removed": [
"\t <LI> XBDA DataComm"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/DriverManagerConnector.java",
"hunks": [
{
"added": [
" // Uncomment this for more information",
" // printFullException( e, 0 );",
""
],
"header": "@@ -100,6 +100,9 @@ public class DriverManagerConnector implements Connector {",
"removed": []
},
{
"added": [
" private static void printFullException( Throwable t, int indentLevel )",
" {",
" if ( t == null ) { return; }",
"",
" String tab = \" \";",
" StringBuilder buffer = new StringBuilder();",
"",
" for ( int i = 0; i < indentLevel; i++ ) { buffer.append( tab ); }",
" buffer.append( \"Message: \" + t.getMessage() );",
"",
" SQLException nextSQLException = null;",
" ",
" if ( t instanceof SQLException )",
" {",
" SQLException se = (SQLException) t;",
"",
" buffer.append( se.getClass().getName() + \" : SQLState = \" + se.getSQLState() );",
"",
" nextSQLException = se.getNextException();",
" }",
"",
" System.out.println( buffer.toString() );",
"",
" printFullException( nextSQLException, indentLevel + 1 );",
" printFullException( t.getCause(), indentLevel + 1 );",
" }",
""
],
"header": "@@ -119,6 +122,33 @@ public class DriverManagerConnector implements Connector {",
"removed": []
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java",
"hunks": [
{
"added": [
" return getDataSourceObject(dsClassName,"
],
"header": "@@ -105,7 +105,7 @@ public class JDBCDataSource {",
"removed": [
" return (javax.sql.DataSource) getDataSourceObject(dsClassName,"
]
},
{
"added": [
" static javax.sql.DataSource getDataSourceObject(String classname, HashMap beanProperties)"
],
"header": "@@ -143,7 +143,7 @@ public class JDBCDataSource {",
"removed": [
" static Object getDataSourceObject(String classname, HashMap beanProperties)"
]
},
{
"added": [
" javax.sql.DataSource ds = null;",
" ds = (javax.sql.DataSource) Class.forName(classname, true, contextLoader).newInstance();"
],
"header": "@@ -155,11 +155,11 @@ public class JDBCDataSource {",
"removed": [
" Object ds = null;",
" ds = Class.forName(classname, true, contextLoader).newInstance();"
]
},
{
"added": [
" {",
" ds = (javax.sql.DataSource) Class.forName(classname).newInstance();",
" }"
],
"header": "@@ -167,7 +167,9 @@ public class JDBCDataSource {",
"removed": [
" ds = Class.forName(classname).newInstance();"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
" private final static String KEY_LOGIN_TIMEOUT = \"derby.tests.login.timeout\"; "
],
"header": "@@ -117,6 +117,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
"",
" try {",
" String loginTimeoutString = BaseTestCase.getSystemProperty( KEY_LOGIN_TIMEOUT );",
" ",
" if ( loginTimeoutString != null )",
" {",
" int loginTimeout = Integer.parseInt( loginTimeoutString );",
"",
" connector.setLoginTimeout( loginTimeout );",
" }",
" }",
" catch (Exception e) { Assert.fail(e.getMessage()); }"
],
"header": "@@ -1481,6 +1482,18 @@ public final class TestConfiguration {",
"removed": []
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/XADataSourceConnector.java",
"hunks": [
{
"added": [
" public void setLoginTimeout( int seconds ) throws SQLException",
" {",
" ds.setLoginTimeout( seconds );",
" }",
" ",
" public int getLoginTimeout() throws SQLException",
" {",
" return ds.getLoginTimeout();",
" }",
" "
],
"header": "@@ -145,6 +145,16 @@ public class XADataSourceConnector implements Connector {",
"removed": []
}
]
}
] |
derby-DERBY-6094-d5beee79
|
DERBY-6094: Make login timeouts recover from interrupts and retry.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455230 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/jdbc/Driver20.java",
"hunks": [
{
"added": [
"import java.util.concurrent.LinkedBlockingQueue;",
"import java.util.concurrent.SynchronousQueue;",
"import org.apache.derby.iapi.util.InterruptStatus;"
],
"header": "@@ -52,10 +52,13 @@ import java.util.concurrent.ExecutionException;",
"removed": []
},
{
"added": [
" private static ThreadPoolExecutor _executorPool;",
" _executorPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE,",
" 60L, TimeUnit.SECONDS,",
" new SynchronousQueue<Runnable>()); ",
" _executorPool.setThreadFactory( new DaemonThreadFactory() );"
],
"header": "@@ -66,11 +69,13 @@ import java.util.concurrent.TimeUnit;",
"removed": [
" private static ExecutorService _executorPool;",
" _executorPool = Executors.newCachedThreadPool();",
" ((ThreadPoolExecutor) _executorPool).setThreadFactory( new DaemonThreadFactory() );"
]
},
{
"added": [
" private static final String driver20 = \"driver20\"; ",
" LoginCallable callable = new LoginCallable( this, url, info );",
" Future<EmbedConnection> task = _executorPool.submit( callable );",
" long startTime = System.currentTimeMillis();",
" long interruptedTime = startTime;",
" ",
" while ((startTime - interruptedTime) / 1000.0 < loginTimeoutSeconds) {",
" try {",
" return task.get( loginTimeoutSeconds, TimeUnit.SECONDS );",
" }",
" catch (InterruptedException ie) {",
" interruptedTime = System.currentTimeMillis();",
" InterruptStatus.setInterrupted();",
" continue;",
" }",
" catch (ExecutionException ee) { throw processException( ee ); }",
" catch (TimeoutException te) { throw Util.generateCsSQLException( SQLState.LOGIN_TIMEOUT ); }",
" }",
" ",
" // Timed out due to interrupts, throw.",
" throw Util.generateCsSQLException( SQLState.LOGIN_TIMEOUT );",
" } finally {",
" InterruptStatus.restoreIntrFlagIfSeen();"
],
"header": "@@ -245,21 +250,37 @@ public abstract class Driver20 extends InternalDriver implements Driver {",
"removed": [
" LoginCallable callable = new LoginCallable( this, url, info );",
" Future<EmbedConnection> task = _executorPool.submit( callable );",
"",
" return task.get( loginTimeoutSeconds, TimeUnit.SECONDS );",
" catch (InterruptedException ie) { throw processException( ie ); }",
" catch (ExecutionException ee) { throw processException( ee ); }",
" catch (TimeoutException te) { throw Util.generateCsSQLException( SQLState.LOGIN_TIMEOUT ); }"
]
}
]
}
] |
derby-DERBY-6094-f63235de
|
DERBY-6094: Further cleanup of LoginTimeoutTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1455238 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6096-7f0f7751
|
DERBY-6096 OutOfMemoryError with Clob or Blob hash join: DataTypeDescriptor.estimatedMemoryUsage() has no case for BLOB or CLOB so would underestimate memory usage for those types at zero
Estimate BLOB/CLOB size at 10000 like other long types.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464247 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java",
"hunks": [
{
"added": [
" //DERBY-6096 Need to estimate usage for BLOB and clob",
" case StoredFormatIds.BLOB_TYPE_ID:"
],
"header": "@@ -1491,6 +1491,8 @@ public final class DataTypeDescriptor implements Formatable",
"removed": []
}
]
}
] |
derby-DERBY-6096-90553c50
|
DERBY-6096: Only run gc if debug output has been requested
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464470 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6097-b1a7fdac
|
DERBY-6097: Management test suite fails when JMX is not supported
Skip the management tests if JMX is not supported.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1453179 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
" /**",
" * Is javax.management.MBeanServer available? Indicates whether the",
" * JVM supports the Java Management Extensions (JMX).",
" */",
" private static final boolean HAVE_MBEAN_SERVER =",
" haveClass(\"javax.management.MBeanServer\");",
""
],
"header": "@@ -139,6 +139,13 @@ public class JDBC {",
"removed": []
},
{
"added": [
" /**",
" * Return true if the JVM supports the Java Management Extensions (JMX).",
" */",
" public static boolean vmSupportsJMX() {",
" return HAVE_MBEAN_SERVER;",
" }",
""
],
"header": "@@ -210,6 +217,13 @@ public class JDBC {",
"removed": []
}
]
}
] |
derby-DERBY-6100-9a818929
|
DERBY-6100: Upgrade tests fail on compact2
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1453856 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-611-37f3f74a
|
DERBY-611 Network client: updateRow() causes a commit when autoCommit = true. Submitted by Dag.Wanvik@Sun.COM
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@357678 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/ResultSet.java",
"hunks": [
{
"added": [
" writeUpdateRow(false);"
],
"header": "@@ -2817,11 +2817,7 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" boolean chainAutoCommit = connection_.willAutoCommitGenerateFlow();",
" writeUpdateRow(chainAutoCommit);",
" if (chainAutoCommit) {",
" connection_.writeCommit();",
" }"
]
},
{
"added": [],
"header": "@@ -2842,9 +2838,6 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" if (chainAutoCommit) {",
" connection_.readCommit();",
" }"
]
},
{
"added": [],
"header": "@@ -2905,9 +2898,6 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
" if (connection_.autoCommit_) {",
" connection_.writeAutoCommit();",
" }"
]
}
]
}
] |
derby-DERBY-6114-13673bdd
|
DERBY-6114: OOME in XAMemTest.testDerby4137_TransactionTimeoutSpecifiedNotExceeded
Periodically run purge() on the cancellation timer to reclaim the
space occupied by cancelled tasks.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1492094 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/timer/TimerFactory.java",
"hunks": [
{
"added": [
"import java.util.TimerTask;"
],
"header": "@@ -21,7 +21,7 @@",
"removed": [
"import java.util.Timer;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java",
"hunks": [
{
"added": [
"import java.util.TimerTask;"
],
"header": "@@ -29,6 +29,7 @@ import java.security.AccessController;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java",
"hunks": [
{
"added": [],
"header": "@@ -50,7 +50,6 @@ import org.apache.derby.iapi.error.ExceptionSeverity;",
"removed": [
"import java.util.Timer;"
]
},
{
"added": [
" getTimerFactory().cancel(this);",
" private static TimerFactory getTimerFactory() {",
" return Monitor.getMonitor().getTimerFactory();",
" }",
""
],
"header": "@@ -184,10 +183,14 @@ final class GenericStatementContext",
"removed": [
" cancel();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/XATransactionState.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package org.apache.derby.jdbc;",
"removed": [
"import java.util.Timer;"
]
},
{
"added": [
" private static TimerFactory getTimerFactory() {",
" return Monitor.getMonitor().getTimerFactory();",
" }"
],
"header": "@@ -120,7 +119,9 @@ final class XATransactionState extends ContextImpl {",
"removed": [
""
]
},
{
"added": [
" * Schedule a timeout task which will rollback the global transaction"
],
"header": "@@ -317,7 +318,7 @@ final class XATransactionState extends ContextImpl {",
"removed": [
" * Schedule a timeout task wich will rollback the global transaction"
]
},
{
"added": [
" getTimerFactory().schedule(timeoutTask, timeoutMillis);"
],
"header": "@@ -329,10 +330,8 @@ final class XATransactionState extends ContextImpl {",
"removed": [
" TimerFactory timerFactory = Monitor.getMonitor().getTimerFactory();",
" Timer timer = timerFactory.getCancellationTimer();",
" timer.schedule(timeoutTask, timeoutMillis);"
]
}
]
}
] |
derby-DERBY-6114-8032298d
|
DERBY-6114: Fold Java5SingletonTimerFactory into SingletonTimerFactory
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1499256 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java",
"hunks": [
{
"added": [
"import java.util.concurrent.atomic.AtomicInteger;"
],
"header": "@@ -30,6 +30,7 @@ import java.security.PrivilegedAction;",
"removed": []
},
{
"added": [
" /**",
" * The number of times {@link #cancel(TimerTask)} has been called.",
" * Used for determining whether it's time to purge cancelled tasks from",
" * the timer.",
" */",
" private final AtomicInteger cancelCount = new AtomicInteger();",
""
],
"header": "@@ -52,6 +53,13 @@ public class SingletonTimerFactory",
"removed": []
},
{
"added": [
" ClassLoader savecl = getContextClassLoader();",
" if (savecl != null) {",
" setContextClassLoader(null);",
"",
" if (savecl != null) {",
" // Restore the original context class loader.",
" setContextClassLoader(savecl);",
" }"
],
"header": "@@ -66,65 +74,17 @@ public class SingletonTimerFactory",
"removed": [
" ClassLoader savecl = null;",
" boolean hasGetClassLoaderPerms = false;",
" try {",
" savecl = AccessController.doPrivileged(",
" new PrivilegedAction<ClassLoader>() {",
" public ClassLoader run() {",
" return Thread.currentThread().getContextClassLoader();",
" }",
" });",
" hasGetClassLoaderPerms = true;",
" } catch (SecurityException se) {",
" // Ignore security exception. Versions of Derby before",
" // the DERBY-3745 fix did not require getClassLoader ",
" // privs. We may leak class loaders if we are not",
" // able to do this but we can't just fail.",
" if (hasGetClassLoaderPerms)",
" try {",
" AccessController.doPrivileged(",
" new PrivilegedAction<Object>() {",
" public Object run() {",
" Thread.currentThread().setContextClassLoader(null);",
" return null;",
" }",
" });",
" } catch (SecurityException se) {",
" // ignore security exception. Earlier versions of Derby, before the ",
" // DERBY-3745 fix did not require setContextClassloader permissions.",
" // We may leak class loaders if we are not able to set this, but ",
" // cannot just fail.",
" }",
" if (hasGetClassLoaderPerms)",
" try {",
" final ClassLoader tmpsavecl = savecl;",
" AccessController.doPrivileged(",
" new PrivilegedAction<Object>() {",
" public Object run() {",
" Thread.currentThread().setContextClassLoader(tmpsavecl);",
" return null;",
" }",
" });",
" } catch (SecurityException se) {",
" // ignore security exception. Earlier versions of Derby, before the ",
" // DERBY-3745 fix did not require setContextClassloader permissions.",
" // We may leak class loaders if we are not able to set this, but ",
" // cannot just fail.",
" }",
" }",
" /**",
" * Returns a Timer object that can be used for adding TimerTasks",
" * that cancel executing statements.",
" *",
" * @return a Timer object for cancelling statements.",
" */",
" Timer getCancellationTimer()",
" {",
" return singletonTimer;"
]
},
{
"added": [
"",
" // DERBY-6114: Cancelled tasks stay in the timer's queue until they",
" // are scheduled to run, unless we call the purge() method. This",
" // prevents garbage collection of the tasks. Even though the tasks",
" // are small objects, there could be many of them, especially when",
" // both the transaction throughput and tasks' delays are high, it",
" // could lead to OutOfMemoryErrors. Since purge() could be a heavy",
" // operation if the queue is big, we don't call it every time a task",
" // is cancelled.",
" //",
" // When Java 7 has been made the lowest supported level, we should",
" // consider replacing the java.util.Timer instance with a",
" // java.util.concurrent.ScheduledThreadPoolExecutor, and call",
" // setRemoveOnCancelPolicy(true) on the executor.",
" if (cancelCount.incrementAndGet() % 1000 == 0) {",
" singletonTimer.purge();",
" }"
],
"header": "@@ -137,6 +97,23 @@ public class SingletonTimerFactory",
"removed": []
}
]
}
] |
derby-DERBY-6117-10df8a5b
|
DERBY-6117: Add a context-aware table function which could be used as an example in user docs; commit derby-6117-03-aa-ArchiveVTI.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1563944 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/vti/ForeignTableVTI.java",
"hunks": [
{
"added": [
"public\tclass ForeignTableVTI extends ForwardingVTI implements RestrictedVTI"
],
"header": "@@ -120,7 +120,7 @@ import org.apache.derby.iapi.util.IdUtil;",
"removed": [
"public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI"
]
},
{
"added": [
" ",
" private Connection _foreignConnection; // if null, we use _connectionURL to make a Connection"
],
"header": "@@ -138,7 +138,9 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": []
},
{
"added": [],
"header": "@@ -147,7 +149,6 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": [
" private ResultSet _foreignResultSet;"
]
},
{
"added": [
" /**",
" * <p>",
" * Construct from the foreign schema and table name and a foreign connection.",
" * </p>",
" */",
" public ForeignTableVTI",
" (",
" String foreignSchemaName,",
" String foreignTableName,",
" Connection foreignConnection",
" )",
" {",
" _foreignSchemaName = foreignSchemaName;",
" _foreignTableName = foreignTableName;",
" _foreignConnection = foreignConnection;",
" }",
" "
],
"header": "@@ -155,6 +156,23 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": []
},
{
"added": [
" if ( getWrappedResultSet() != null ) { getWrappedResultSet().close(); }",
" wrapResultSet( null );",
" _foreignConnection = null;",
" if ( !isClosed() && (getWrappedResultSet() == null) )",
" ( getForeignConnection( _connectionURL, _foreignConnection ), makeQuery() );",
" wrapResultSet( _foreignPreparedStatement.executeQuery() );",
" return getWrappedResultSet().next();",
" public boolean isClosed() { return ( (_connectionURL == null) && (_foreignConnection == null) ); }"
],
"header": "@@ -237,103 +255,28 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": [
" if ( _foreignResultSet != null ) { _foreignResultSet.close(); }",
" _foreignResultSet = null;",
" if ( !isClosed() && (_foreignResultSet == null) )",
" ( getForeignConnection( _connectionURL ), makeQuery() );",
" _foreignResultSet = _foreignPreparedStatement.executeQuery();",
" return _foreignResultSet.next();",
" public boolean isClosed() { return (_connectionURL == null); }",
"",
" public boolean wasNull() throws SQLException",
" { return _foreignResultSet.wasNull(); }",
"",
" public ResultSetMetaData getMetaData() throws SQLException",
" { return _foreignResultSet.getMetaData(); }",
"",
" public InputStream \tgetAsciiStream(int i) throws SQLException",
" { return _foreignResultSet.getAsciiStream( mapColumnNumber( i ) ); }",
" ",
" public BigDecimal \tgetBigDecimal(int i) throws SQLException",
" { return _foreignResultSet.getBigDecimal( mapColumnNumber( i ) ); }",
"",
" @Deprecated",
" public BigDecimal \tgetBigDecimal(int i, int scale) throws SQLException",
" { return _foreignResultSet.getBigDecimal( mapColumnNumber( i ), scale ); }",
" ",
" public InputStream \tgetBinaryStream(int i) throws SQLException",
" { return _foreignResultSet.getBinaryStream( mapColumnNumber( i ) ); }",
" ",
" public Blob \tgetBlob(int i) throws SQLException",
" { return _foreignResultSet.getBlob( mapColumnNumber( i ) ); }",
" ",
" public boolean \tgetBoolean(int i) throws SQLException",
" { return _foreignResultSet.getBoolean( mapColumnNumber( i ) ); }",
" ",
" public byte \tgetByte(int i) throws SQLException",
" { return _foreignResultSet.getByte( mapColumnNumber( i ) ); }",
" ",
" public byte[] \tgetBytes(int i) throws SQLException",
" { return _foreignResultSet.getBytes( mapColumnNumber( i ) ); }",
" ",
" public Reader \tgetCharacterStream(int i) throws SQLException",
" { return _foreignResultSet.getCharacterStream( mapColumnNumber( i ) ); }",
"",
" public Clob \tgetClob(int i) throws SQLException",
" { return _foreignResultSet.getClob( mapColumnNumber( i ) ); }",
"",
" public Date \tgetDate(int i) throws SQLException",
" { return _foreignResultSet.getDate( mapColumnNumber( i ) ); }",
"",
" public Date \tgetDate(int i, Calendar cal) throws SQLException",
" { return _foreignResultSet.getDate( mapColumnNumber( i ), cal ); }",
"",
" public double \tgetDouble(int i) throws SQLException",
" { return _foreignResultSet.getDouble( mapColumnNumber( i ) ); }",
"",
" public float \tgetFloat(int i) throws SQLException",
" { return _foreignResultSet.getFloat( mapColumnNumber( i ) ); }",
"",
" public int \tgetInt(int i) throws SQLException",
" { return _foreignResultSet.getInt( mapColumnNumber( i ) ); }",
"",
" public long \tgetLong(int i) throws SQLException",
" { return _foreignResultSet.getLong( mapColumnNumber( i ) ); }",
"",
" public Object \tgetObject(int i) throws SQLException",
" { return _foreignResultSet.getObject( mapColumnNumber( i ) ); }",
"",
" public short \tgetShort(int i) throws SQLException",
" { return _foreignResultSet.getShort( mapColumnNumber( i ) ); }",
"",
" public String \tgetString(int i) throws SQLException",
" { return _foreignResultSet.getString( mapColumnNumber( i ) ); }",
"",
" public Time \tgetTime(int i) throws SQLException",
" { return _foreignResultSet.getTime( mapColumnNumber( i ) ); }",
"",
" public Time \tgetTime(int i, Calendar cal) throws SQLException",
" { return _foreignResultSet.getTime( mapColumnNumber( i ), cal ); }",
"",
" public Timestamp \tgetTimestamp(int i) throws SQLException",
" { return _foreignResultSet.getTimestamp( mapColumnNumber( i ) ); }",
"",
" public Timestamp \tgetTimestamp(int i, Calendar cal) throws SQLException",
" { return _foreignResultSet.getTimestamp( mapColumnNumber( i ), cal ); }"
]
},
{
"added": [
" ( String connectionURL, Connection foreignConnection )",
" if ( foreignConnection != null ) { return foreignConnection; }",
" "
],
"header": "@@ -365,9 +308,11 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": [
" ( String connectionURL )"
]
}
]
}
] |
derby-DERBY-6117-29007f04
|
DERBY-6117: Give table functions more information about their execution environment; commit derby-6117-01-ab-AwareVTI.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1561668 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java",
"hunks": [
{
"added": [
" @param vtiSchema Name of the schema holding the table function.",
" @param vtiName Name of the table function."
],
"header": "@@ -668,6 +668,8 @@ public interface ResultSetFactory {",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java",
"hunks": [
{
"added": [
" int vtiRestrictionNumber,",
" String vtiSchema,",
" String vtiName"
],
"header": "@@ -463,7 +463,9 @@ public class GenericResultSetFactory implements ResultSetFactory",
"removed": [
" int vtiRestrictionNumber"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.vti.AwareVTI;",
"import org.apache.derby.vti.VTIContext;"
],
"header": "@@ -54,8 +54,10 @@ import org.apache.derby.iapi.services.io.FormatableHashtable;",
"removed": []
},
{
"added": [
" private String vtiSchema;",
" private String vtiName;",
""
],
"header": "@@ -99,6 +101,9 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": []
},
{
"added": [
" int vtiRestrictionNumber,",
" String vtiSchema,",
" String vtiName"
],
"header": "@@ -122,7 +127,9 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
" int vtiRestrictionNumber"
]
},
{
"added": [
" this.vtiSchema = vtiSchema;",
" this.vtiName = vtiName;"
],
"header": "@@ -136,6 +143,8 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/vti/VTITemplate.java",
"hunks": [
{
"added": [
"public abstract class VTITemplate implements ResultSet, AwareVTI",
" private VTIContext _vtiContext;",
" "
],
"header": "@@ -68,8 +68,10 @@ import java.util.Map;",
"removed": [
"public abstract class VTITemplate implements ResultSet"
]
}
]
}
] |
derby-DERBY-6117-70d436bd
|
DERBY-6117: Allow StringColumnVTIs to change their column names (once) based on their runtime environment; tests passed cleanly for me on derby-6117-02-aa-changeColumnNamesInStringColumnVTI.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1563135 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/vti/StringColumnVTI.java",
"hunks": [
{
"added": [
"import org.apache.derby.shared.common.reference.SQLState;",
"import org.apache.derby.iapi.error.StandardException;"
],
"header": "@@ -34,6 +34,8 @@ import java.sql.Timestamp;",
"removed": []
},
{
"added": [
" if ( columnNames != null )",
" {",
" _columnNames = ArrayUtil.copy( columnNames );",
" }"
],
"header": "@@ -101,7 +103,10 @@ public abstract class StringColumnVTI extends VTITemplate",
"removed": [
" _columnNames = ArrayUtil.copy( columnNames );"
]
},
{
"added": [
" /**",
" * <p>",
" * Set the column names for this table function. This is useful for AwareVTIs,",
" * which need to figure out their column names after analyzing their execution",
" * context. Throws an exception if the column names have already been set.",
" * </p>",
" */",
" public void setColumnNames( String[] columnNames )",
" throws SQLException",
" {",
" if ( _columnNames != null ) { throw makeSQLException( SQLState.LANG_CANNOT_CHANGE_COLUMN_NAMES ); }",
"",
" _columnNames = ArrayUtil.copy( columnNames );",
" }",
"",
" "
],
"header": "@@ -110,6 +115,22 @@ public abstract class StringColumnVTI extends VTITemplate",
"removed": []
}
]
}
] |
derby-DERBY-6117-a2ecbd3e
|
DERBY-6117 Silently swallowed SecurityExceptions may disable Derby features, including security features.
Patch derby-6617-3b. It adds reporting of the swallowed
SecurityException in FileMonitor#createDaemonGroup.
To get that printed I also i had to to make sure to dump the temporary
log in a change added to BaseMonitor#runWithState.
Additionally, I discovered that Derby became unbootable if we lack the
modifyThreadGroup permission: the monitor in such an event, lacking a
proper handler, thought it was already initialized so subsequent boot
attempts (from a non-system thread so we wouldn't see the
modifyThreadGroup issue) would also fail. I added a handler to clear
the monitor to fix this.
A new test fixture, testModifyThreadGroup checks that the warning
message being written to the console.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1617737 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/monitor/Monitor.java",
"hunks": [
{
"added": [
"import java.security.AccessControlException;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java",
"hunks": [
{
"added": [
"import java.security.AccessControlException;"
],
"header": "@@ -89,6 +89,7 @@ import java.util.NoSuchElementException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java",
"hunks": [
{
"added": [
"import org.apache.derby.shared.common.sanity.SanityManager;"
],
"header": "@@ -38,6 +38,7 @@ import org.apache.derby.iapi.services.info.ProductGenusNames;",
"removed": []
},
{
"added": [
" *",
" * @return the thread group \"derby.daemons\" or null if we saw",
" * a SecurityException",
" private ThreadGroup createDaemonGroup() {",
" // In case of a lacking privilege, issue a warning, return null and",
" // let the daemon threads be created in the default thread group.",
" // This can only happen if the current Derby thread is a part of",
" // the root thread group \"system\".",
" reportThread(se);"
],
"header": "@@ -84,15 +85,21 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" private static ThreadGroup createDaemonGroup() {",
" // In case of a lacking privilege, silently return null and let",
" // the daemon threads be created in the default thread group."
]
}
]
}
] |
derby-DERBY-6122-8ce125fb
|
DERBY-6122 - InterruptResilienceTest fails with: junit.framework.ComparisonFailure: Database shutdown expected:<[08006]> but was:<[XBDA0]>
The core problem that led to this assert was that an attempt by the
test to shutdown the database timed out with:
Caused by: java.sql.SQLException: Login timeout exceeded.
The test had set a 10 second timeout assuming that was large enough such that
no timeout would be encountered, but failed a few times in public IBM lab
nightly regression runs. Raising the number to 1000.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466225 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6126-572f3e8b
|
DERBY-6126: compatibility._Suite fails if derbyTesting.jar lives in different directory than product jars
Based on fix contributed by Kristian Waagan.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1494883 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/DerbyDistribution.java",
"hunks": [
{
"added": [
" * directory have been forbidden. The main reason for this is that it is",
" * from another. While it is possible to support such a configuration running",
" * off the {@code classes}-directory in many scenarios, it complicates",
" * the creation and handling of classpath string. Generating the JARs when"
],
"header": "@@ -35,12 +35,13 @@ import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;",
"removed": [
" * directory has been forbidden. The main reason for this is that it is",
" * from another. While it is possible to support such a configuration in many",
" * scenarios, it complicates things quite a bit. Generating the JARs when"
]
},
{
"added": [
" * Returns a distribution with the specified version, based on the given",
" * library directory.",
" * </p>",
" *",
" * <p>",
" * It is the responsibility of the caller to ensure that the specified",
" * version matches the JARs in the given directory.",
" * </p>",
" *",
" * @param version the version of the distribution",
" * @param baseDir the base dir for the distribution, holding the Derby JARs",
" * @return A representation of the distribution, or {@code null} if",
" * the specified directory doesn't contain a valid distribution.",
" * @throws IllegalArgumentException if {@code version} is {@code null}",
" */",
" public static DerbyDistribution newInstance(DerbyVersion version,",
" File baseDir) {",
" return newInstance(version, baseDir, baseDir);",
" }",
"",
" /**",
" * <p>",
" * Returns a distribution with the specified version, based on the given",
" * library and testing directories.",
" * </p>",
" *",
" * <p>",
" * It is the responsibility of the caller to ensure that the specified",
" * version matches the JARs in the given directories.",
" * </p>",
" * @param baseDir the directory holding the production JARs",
" * @param testDir the directory holding the testing JAR",
" * the specified directories don't make up a valid distribution.",
" public static DerbyDistribution newInstance(DerbyVersion version,",
" File baseDir, File testDir) {",
" File[] productionJars = getProductionJars(baseDir);",
" File[] testingJars = getTestingJars(testDir);"
],
"header": "@@ -279,22 +280,49 @@ public class DerbyDistribution implements Comparable<DerbyDistribution> {",
"removed": [
" * Returns an instance based on the given library directory and version.",
" * This method is capable of understanding the difference of JAR based",
" * distribution and a distribution running off the classes-directory.",
" * @param dir the base directory for the distribution (either the classes",
" * directory or a directory holding the Derby JAR files)",
" * the specified directory is determined to be invalid.",
" public static DerbyDistribution getInstance(File dir,",
" DerbyVersion version) {",
" File[] productionJars = getProductionJars(dir);",
" File[] testingJars = getTestingJars(dir);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/ReleaseRepository.java",
"hunks": [
{
"added": [
" DerbyDistribution dist = DerbyDistribution.newInstance(",
" version, dir);"
],
"header": "@@ -192,8 +192,8 @@ public class ReleaseRepository {",
"removed": [
" DerbyDistribution dist = DerbyDistribution.getInstance(",
" dir, version);"
]
}
]
}
] |
derby-DERBY-6131-232f5efc
|
DERBY-6131 select from view with "upper" and "in" list throws a ClassCastException
Prior to this fix the following query on a view would throw a ClassCastException
select name from myView where upper(name) in ('AA', 'BB');
This query got in code that was trying to "push" predicates down, and
that code is only currently build to push constants and column references.
In this case it was mistakenly trying to push down the "upper" call, and
when it tried to cast it as a column reference it got the error. The fix
was to check the type of the node and not push in this case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464594 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.