id
stringlengths 22
25
| commit_message
stringlengths 137
6.96k
| diffs
listlengths 0
63
|
|---|---|---|
derby-DERBY-481-95a483de
|
DERBY-481: Grammar changes for declaring generated columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@708169 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java",
"hunks": [
{
"added": [
"\tpublic static final int\t\t\tNON_DETERMINISTIC_ILLEGAL\t\t=\t0x00001000;",
""
],
"header": "@@ -99,6 +99,8 @@ public interface CompilerContext extends Context",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java",
"hunks": [
{
"added": [
" int numGenerationClauses = 0;"
],
"header": "@@ -299,6 +299,7 @@ public class AlterTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
" ",
" numGenerationClauses = tableElementList.countGenerationClauses();"
],
"header": "@@ -365,6 +366,8 @@ public class AlterTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) )",
"\t\t\t/* In order to check the validity of the check constraints and",
"\t\t\t * generation clauses"
],
"header": "@@ -377,9 +380,10 @@ public class AlterTableNode extends DDLStatementNode",
"removed": [
"\t\tif (numCheckConstraints > 0)",
"\t\t\t/* In order to check the validity of the check constraints"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java",
"hunks": [
{
"added": [
" GenerationClauseNode generationClauseNode;"
],
"header": "@@ -76,6 +76,7 @@ public class ColumnDefinitionNode extends TableElementNode",
"removed": []
},
{
"added": [
"\t\telse if (defaultNode instanceof GenerationClauseNode)",
"\t\t{",
" generationClauseNode = (GenerationClauseNode) defaultNode;",
"\t\t}"
],
"header": "@@ -129,6 +130,10 @@ public class ColumnDefinitionNode extends TableElementNode",
"removed": []
},
{
"added": [
"",
" /** Set the type of this column */",
" public void setType( DataTypeDescriptor dts ) { type = dts; }"
],
"header": "@@ -211,6 +216,9 @@ public class ColumnDefinitionNode extends TableElementNode",
"removed": []
},
{
"added": [
"\t/**",
"\t * Set the generation clause (Default) bound to this column.",
"\t */",
" public void setDefaultInfo( DefaultInfoImpl dii ) { defaultInfo = dii; }",
""
],
"header": "@@ -254,6 +262,11 @@ public class ColumnDefinitionNode extends TableElementNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java",
"hunks": [
{
"added": [
" int numGenerationClauses = 0;"
],
"header": "@@ -235,6 +235,7 @@ public class CreateTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
" numGenerationClauses = tableElementList.countGenerationClauses();",
""
],
"header": "@@ -403,6 +404,8 @@ public class CreateTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) )",
"\t\t\t/* In order to check the validity of the check constraints and",
"\t\t\t * generation clauses"
],
"header": "@@ -418,9 +421,10 @@ public class CreateTableNode extends DDLStatementNode",
"removed": [
"\t\tif (numCheckConstraints > 0)",
"\t\t\t/* In order to check the validity of the check constraints"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.C_NodeTypes;"
],
"header": "@@ -29,6 +29,7 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.i18n.MessageService;"
],
"header": "@@ -25,6 +25,7 @@ import java.sql.Types;",
"removed": []
},
{
"added": [
" return makeTableName",
" ( getNodeFactory(), getContextManager(), schemaName, flatName );",
"\t}",
"",
"\tpublic\tstatic TableName\tmakeTableName",
"\t(",
" NodeFactory nodeFactory,",
" ContextManager contextManager,",
"\t\tString\tschemaName,",
"\t\tString\tflatName",
"\t)",
"\t\tthrows StandardException",
"\t{",
"\t\treturn (TableName) nodeFactory.getNode",
"\t\t\t\tcontextManager"
],
"header": "@@ -1157,12 +1158,25 @@ public abstract class QueryTreeNode implements Visitable",
"removed": [
"\t\treturn (TableName) getNodeFactory().getNode",
"\t\t\t\tgetContextManager()"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
""
],
"header": "@@ -197,7 +197,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\t\t\t"
]
},
{
"added": [],
"header": "@@ -210,7 +210,6 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.catalog.types.DefaultInfoImpl;"
],
"header": "@@ -30,6 +30,9 @@ import org.apache.derby.iapi.sql.compile.C_NodeTypes;",
"removed": []
},
{
"added": [
" /**",
"\t * Count the number of generation clauses.",
"\t */",
"\tpublic int countGenerationClauses()",
"\t{",
"\t\tint\tnumGenerationClauses = 0;",
"\t\tint size = size();",
"",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t{",
"\t\t\tColumnDefinitionNode cdn;",
"\t\t\tTableElementNode element = (TableElementNode) elementAt(index);",
"",
"\t\t\tif (! (element instanceof ColumnDefinitionNode))",
"\t\t\t{",
"\t\t\t\tcontinue;",
"\t\t\t}",
"",
"\t\t\tcdn = (ColumnDefinitionNode) element;",
"",
"\t\t\tif ( cdn.hasGenerationClause() )",
"\t\t\t{",
"\t\t\t\tnumGenerationClauses++;",
"\t\t\t}",
"\t\t}",
"",
"\t\treturn numGenerationClauses;",
"\t}",
""
],
"header": "@@ -379,6 +382,35 @@ public class TableElementList extends QueryTreeNodeVector",
"removed": []
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/dblook/DB_Table.java",
"hunks": [
{
"added": [
"",
" String defaultText = rs.getString(2);",
"",
" if ( defaultText.startsWith( \"GENERATED ALWAYS AS\" ) )",
" { colDef.append( \" \" ); }",
"\t\t\t\telse { colDef.append(\" DEFAULT \"); }",
" ",
"\t\t\t\tcolDef.append( defaultText );"
],
"header": "@@ -149,8 +149,14 @@ public class DB_Table {",
"removed": [
"\t\t\t\tcolDef.append(\" DEFAULT \");",
"\t\t\t\tcolDef.append(rs.getString(2));"
]
}
]
}
] |
derby-DERBY-481-a008fbf0
|
DERBY-481: Add some tests for generated columns which coerce between different length character and numeric columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@711579 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-481-c0342dee
|
DERBY-481: Forbid SET NULL/DEFAULT in delete actions for foreign keys defined on generated columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@711135 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.FormatableBitSet;"
],
"header": "@@ -24,6 +24,7 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": []
},
{
"added": [
"\t\tint numReferenceConstraints = 0;"
],
"header": "@@ -299,6 +300,7 @@ public class AlterTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
" numReferenceConstraints = tableElementList.countConstraints(",
"\t\t\t\t\t\t\t\t\tDataDictionary.FOREIGNKEY_CONSTRAINT);",
" "
],
"header": "@@ -367,6 +369,9 @@ public class AlterTableNode extends DDLStatementNode",
"removed": []
},
{
"added": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) || (numReferenceConstraints > 0))"
],
"header": "@@ -380,7 +385,7 @@ public class AlterTableNode extends DDLStatementNode",
"removed": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java",
"hunks": [
{
"added": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) || (numReferenceConstraints > 0) )"
],
"header": "@@ -422,7 +422,7 @@ public class CreateTableNode extends DDLStatementNode",
"removed": [
"\t\tif ( (numCheckConstraints > 0) || (numGenerationClauses > 0) )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.StatementType;"
],
"header": "@@ -26,6 +26,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": []
}
]
}
] |
derby-DERBY-481-e0bc63ca
|
DERBY-481: Add tests for bulk import of generated columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@729329 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-481-ec4aa986
|
DERBY-481: Add support for NOT NULL constraints on generated columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@711571 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/GenericColumnDescriptor.java",
"hunks": [
{
"added": [
" private boolean hasGenerationClause;"
],
"header": "@@ -67,6 +67,7 @@ public final class GenericColumnDescriptor",
"removed": []
},
{
"added": [
" hasGenerationClause = rcd.hasGenerationClause();"
],
"header": "@@ -98,6 +99,7 @@ public final class GenericColumnDescriptor",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java",
"hunks": [
{
"added": [
" evaluateGenerationClauses( generationClauses, activation, sourceResultSet, execRow, false );"
],
"header": "@@ -259,7 +259,7 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
" evaluateGenerationClauses( generationClauses, activation, sourceResultSet, execRow );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;"
],
"header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.monitor.Monitor;",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.types.DataTypeDescriptor;"
],
"header": "@@ -42,6 +43,7 @@ import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"removed": []
},
{
"added": [
" private int firstColumn = -1;",
" private int[] generatedColumnPositions; // 1-based positions",
" private DataValueDescriptor[] normalizedGeneratedValues; // one for each slot in generatedColumnPositions",
""
],
"header": "@@ -72,6 +74,10 @@ abstract class NoRowsResultSetImpl implements ResultSet",
"removed": []
},
{
"added": [
" ExecRow newRow,",
" boolean isUpdate"
],
"header": "@@ -590,7 +596,8 @@ abstract class NoRowsResultSetImpl implements ResultSet",
"removed": [
" ExecRow newRow"
]
},
{
"added": [
"",
" //",
" // Now apply NOT NULL checks and other coercions. For non-generated columns, these",
" // are performed in the driving ResultSet.",
" //",
" if ( firstColumn < 0 ) { firstColumn = NormalizeResultSet.computeStartColumn( isUpdate, activation.getResultDescription() ); }",
" if ( generatedColumnPositions == null ) { setupGeneratedColumns( activation, (ValueRow) newRow ); }",
" ",
" ResultDescription resultDescription = activation.getResultDescription();",
" int count = generatedColumnPositions.length;",
"",
" for ( int i = 0; i < count; i++ )",
" {",
" int position = generatedColumnPositions[ i ];",
"",
" DataValueDescriptor normalizedColumn = NormalizeResultSet.normalizeColumn",
" (",
" resultDescription.getColumnDescriptor( position ).getType(),",
" newRow,",
" position,",
" normalizedGeneratedValues[ i ],",
" resultDescription",
" );",
"",
" newRow.setColumn( position, normalizedColumn );",
" }"
],
"header": "@@ -607,6 +614,32 @@ abstract class NoRowsResultSetImpl implements ResultSet",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java",
"hunks": [
{
"added": [
"\t\tstartCol = computeStartColumn( forUpdate, resultDescription );"
],
"header": "@@ -104,16 +104,7 @@ class NormalizeResultSet extends NoPutResultSetImpl",
"removed": [
"\t\t/*",
"\t\t An update row, for an update statement which sets n columns; i.e",
"\t\t UPDATE tab set x,y,z=.... where ...;",
"\t\t has,",
"\t\t before values of x,y,z after values of x,y,z and rowlocation.",
"\t\t need only normalize after values of x,y,z.",
"\t\t i.e insead of starting at index = 1, I need to start at index = 4.",
"\t\t also I needn't normalize the last value in the row.",
"\t*/",
"\t\tstartCol = (forUpdate) ? ((numCols - 1)/ 2) + 1 : 1;"
]
},
{
"added": [
" /**",
" * <p>",
" * Compute the start column for an update/insert.",
" * </p>",
" */",
" public static int computeStartColumn( boolean isUpdate, ResultDescription desc )",
" {",
"\t\tint count = desc.getColumnCount();",
" ",
"\t\t/*",
"\t\t An update row, for an update statement which sets n columns; i.e",
"\t\t UPDATE tab set x,y,z=.... where ...;",
"\t\t has,",
"\t\t before values of x,y,z after values of x,y,z and rowlocation.",
"\t\t need only normalize after values of x,y,z.",
"\t\t i.e insead of starting at index = 1, I need to start at index = 4.",
"\t\t also I needn't normalize the last value in the row.",
" */",
"\t\treturn (isUpdate) ? ((count - 1)/ 2) + 1 : 1;",
" }",
"",
" ",
"\t/**",
"\t * Normalize a row. For now, this means calling constructors through",
"\t * the type services to normalize a type to itself. For example,",
"\t * if you're putting a char(30) value into a char(15) column, it",
"\t * calls a SQLChar constructor with the char(30) value, and the",
"\t * constructor truncates the value and makes sure that no non-blank",
"\t * characters are truncated.",
"\t *",
"\t * In the future, this mechanism will be extended to do type conversions,",
"\t * as well. I didn't implement type conversions yet because it looks",
"\t * like a lot of work, and we needed char and varchar right away.",
"\t *",
" \t * @exception StandardException thrown on failure ",
"\t */",
"\tpublic static DataValueDescriptor normalizeColumn",
" (DataTypeDescriptor dtd, ExecRow sourceRow, int sourceColumnPosition, DataValueDescriptor resultCol, ResultDescription desc )",
" throws StandardException",
"\t{",
" DataValueDescriptor sourceCol = sourceRow.getColumn( sourceColumnPosition );",
"",
" try {",
" DataValueDescriptor returnValue = dtd.normalize( sourceCol, resultCol );",
"",
" return returnValue;",
" } catch (StandardException se) {",
" // Catch illegal null insert and add column info",
" if (se.getMessageId().startsWith(SQLState.LANG_NULL_INTO_NON_NULL))",
" {",
" ResultColumnDescriptor columnDescriptor = desc.getColumnDescriptor( sourceColumnPosition );",
" throw StandardException.newException",
" (SQLState.LANG_NULL_INTO_NON_NULL, columnDescriptor.getName());",
" }",
" //just rethrow if not LANG_NULL_INTO_NON_NULL",
" throw se;",
" }",
" }",
" "
],
"header": "@@ -278,6 +269,65 @@ class NormalizeResultSet extends NoPutResultSetImpl",
"removed": []
}
]
}
] |
derby-DERBY-481-f18c7165
|
DERBY-481: Forbid renaming of columns referenced by generation clauses and prevent users from adding defaults to generated columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@712664 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-481-f4d0cf75
|
DERBY-481: Allow DEFAULT literal on INSERTs into generated columns which don't have explicity target lists.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@710071 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4810-28e70780
|
DERBY-4810: setTimestamp() methods don't agree on trailing zeros
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1000811 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4812-8e4af955
|
DERBY-4812 ReplicationMessageTransmit run does not unwrap PrivilegedActionException which can lead to failure of replicationTests.ReplicationRun_Local_StateTest_part1_1
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1002291 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageReceive.java",
"hunks": [
{
"added": [
" * IOException is raised with cause"
],
"header": "@@ -113,7 +113,7 @@ public class ReplicationMessageReceive {",
"removed": [
" * PrivilegedExceptionAction is raised with cause"
]
},
{
"added": [
" *",
" * <code>SocketConnection</code> class or while",
" * trying to open a connection."
],
"header": "@@ -123,11 +123,11 @@ public class ReplicationMessageReceive {",
"removed": [
" * @throws PrivilegedActionException if an exception occurs while trying",
" * to open a connection.",
" * <code>SocketConnection</code> class."
]
},
{
"added": [],
"header": "@@ -136,7 +136,6 @@ public class ReplicationMessageReceive {",
"removed": [
" PrivilegedActionException,"
]
},
{
"added": [
" Socket client = null;",
" try {",
" //Start listening on the socket and accepting the connection",
" client =",
" (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" return serverSocket.accept();",
" }",
" });",
" } catch(PrivilegedActionException pea) {",
" throw (IOException) pea.getException();",
" }",
""
],
"header": "@@ -148,16 +147,20 @@ public class ReplicationMessageReceive {",
"removed": [
" ",
" //Start listening on the socket and accepting the connection",
" Socket client =",
" (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" return serverSocket.accept();",
" }",
" });",
" "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java",
"hunks": [
{
"added": [
" * ",
" * <code>SocketConnection</code> class or open a connection."
],
"header": "@@ -98,11 +98,9 @@ public class ReplicationMessageTransmit {",
"removed": [
" * @throws PrivilegedActionException if an exception occurs while trying",
" * to open a connection.",
" *",
" * <code>SocketConnection</code> class."
]
},
{
"added": [],
"header": "@@ -112,7 +110,6 @@ public class ReplicationMessageTransmit {",
"removed": [
" PrivilegedActionException,"
]
},
{
"added": [
" try {",
" //create a connection to the slave.",
" s = (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" SocketFactory sf = SocketFactory.getDefault();",
" InetSocketAddress sockAddr = new InetSocketAddress(",
" slaveAddress.getHostAddress(), ",
" slaveAddress.getPortNumber());",
" Socket s_temp = sf.createSocket();",
" s_temp.connect(sockAddr, timeout_);",
" return s_temp;",
" }",
" });",
" } catch(PrivilegedActionException pea) {",
" throw (IOException) pea.getException();",
" }"
],
"header": "@@ -120,20 +117,23 @@ public class ReplicationMessageTransmit {",
"removed": [
" ",
" //create a connection to the slave.",
" s = (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" SocketFactory sf = SocketFactory.getDefault();",
" InetSocketAddress sockAddr = new InetSocketAddress(",
" slaveAddress.getHostAddress(), ",
" slaveAddress.getPortNumber());",
" Socket s_temp = sf.createSocket();",
" s_temp.connect(sockAddr, timeout_);",
" return s_temp;",
" }",
" });"
]
}
]
}
] |
derby-DERBY-4814-26f891cf
|
DERBY-4814: Minor cleanup of Derby151Test
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1000779 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4825-1ada130a
|
DERBY-4825: Assert failure in LargeDataLocksTest.testGetCharacterStream()
because of wrong number of locks
Wait for background thread to complete post-commit work before
counting the locks, so that the locks it obtains don't intermittently
show up in the lock table.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1006332 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4825-bf59358c
|
DERBY-4825: Assert failure in LargeDataLocksTest.testGetCharacterStream() because of wrong number of locks
Report the contents of the lock table to help debugging.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1004609 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4828-9e89a519
|
DERBY-4828: Import fails if column names contain double quotes
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1004197 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4829-d1a83916
|
DERBY-4829: dblook fails if there is a column privilege on a table
whose name contains a quote
Properly quote strings and identifiers. Also add missing clause in the
generated GRANT statement to prevent syntax errors when copying
statements from the dblook output.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1005362 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/dblook/DB_GrantRevoke.java",
"hunks": [
{
"added": [
"import java.sql.PreparedStatement;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
},
{
"added": [
" // Statement that gets the names of the columns in a given table.",
" PreparedStatement columnStmt = conn.prepareStatement(",
" \"SELECT COLUMNNUMBER, COLUMNNAME \" +",
" \"FROM SYS.SYSCOLUMNS C, SYS.SYSTABLES T, SYS.SYSSCHEMAS S \" +",
" \"WHERE T.TABLEID = C.REFERENCEID and S.SCHEMAID = T.SCHEMAID \" +",
" \"AND S.SCHEMANAME = ? AND T.TABLENAME = ? \" +",
" \"ORDER BY COLUMNNUMBER\");",
""
],
"header": "@@ -188,6 +189,14 @@ public class DB_GrantRevoke {",
"removed": []
},
{
"added": [
" // Auth name will added directly to the generated DDL, so we need",
" // to quote it.",
" // Schema name and table name are parameters to a prepared",
" // statement, so quoting is not needed.",
" String schemaName = rs.getString(2);",
" String tableName = rs.getString(3);",
"",
" // isIgnorableSchema, on the other hand, expects the schema name",
" // to be quoted.",
" String schemaNameQuoted =",
" dblook.addQuotes(dblook.expandDoubleQuotes(schemaName));",
" if (dblook.isIgnorableSchema(schemaNameQuoted)) {",
" }",
" columnStmt.setString(1, schemaName);",
" columnStmt.setString(2, tableName);",
" ResultSet rsCols = columnStmt.executeQuery();",
" // The full name will be added directly to the generated GRANT",
" // statement, so it needs to be quoted.",
" String fullName = schemaNameQuoted + \".\" +",
" dblook.addQuotes(dblook.expandDoubleQuotes(tableName));",
"",
" rsCols.close();",
"",
" columnStmt.close();"
],
"header": "@@ -196,30 +205,43 @@ public class DB_GrantRevoke {",
"removed": [
"\t\t\tString schemaName = dblook.expandDoubleQuotes(rs.getString(2));",
"\t\t\tString tableName = dblook.expandDoubleQuotes(rs.getString(3));",
"\t\t\tif (dblook.isIgnorableSchema(schemaName))",
"\t\t\tStatement stmtCols = conn.createStatement();",
"\t\t\tString queryCols = \"SELECT COLUMNNUMBER, COLUMNNAME \" +",
"\t\t\t\t\"FROM SYS.SYSCOLUMNS C, SYS.SYSTABLES T, SYS.SYSSCHEMAS S \" +",
"\t\t\t\t\"WHERE T.TABLEID = C.REFERENCEID and S.SCHEMAID = T.SCHEMAID \"+",
"\t\t\t\t\"and T.TABLENAME = '\"+tableName+\"' AND SCHEMANAME = '\"+schemaName +",
"\t\t\t\t\"' ORDER BY COLUMNNUMBER\";",
"\t\t\tResultSet rsCols= stmtCols.executeQuery(queryCols);",
"\t\t\tString fullName = dblook.addQuotes(schemaName) + \".\" + dblook.addQuotes(tableName);"
]
},
{
"added": [
"",
" String colName = dblook.addQuotes(",
" dblook.expandDoubleQuotes(rsCols.getString(2)));",
" colNames.append(colName);"
],
"header": "@@ -261,8 +283,11 @@ public class DB_GrantRevoke {",
"removed": [
"\t\t\tcolNames.append(rsCols.getString(2));"
]
},
{
"added": [
" grantStmt.append(\") ON \");",
" grantStmt.append(fullName);"
],
"header": "@@ -286,7 +311,8 @@ public class DB_GrantRevoke {",
"removed": [
"\t\tgrantStmt.append(\")\");"
]
}
]
}
] |
derby-DERBY-4835-598c5959
|
DERBY-4835 Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError
The problem was that the clearing of stored statements during the upgrade was conditional. The clearing should happen unconditionally during upgrade. Unconditional clearing of SPSes has fixed the problem with this jira.
Also, added a test in upgrade suite for triggers. The test has been added to BasicSetup.java which will ensure that this trigger test will automatically get run with even future releases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1021426 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4835-95971f27
|
DERBY-5120 Row from SYSDEPENDS gets deleted when a table has update triggers defined on it and an upate is made to the table
This commit moves recording to trigger action sps's dependency on trigger table from create trigger constant action and alter
table constant action to SPSDescriptor. This central location in SPSDescriptor for recording the dependency will take care of
create trigger, alter table and sps regeneration cases. The checkin also required fixing triggerGeneral.sql because now
that we do not loose the dependency between trigger action sps and trigger table, the change in trigger table always sends
an invalidation signal to it's triggers which causes those triggers to recompile when they fire next time. For triggerGeneral
case, the trigger in question ends up being incorrect(because of alter table add column) and thus would cause the test to fail.
I resolved it by fixing the trigger action.
Additionally, I have added upgrade test case which checks how the trigger invalidation signal are missed prior to this fix
thus not catching incorrect triggers. This test has been disabled for 10.5.1.1, 10.5.3.0, 10.6.1.0 and 10.6.2.1 because those
4 releases do not have DERBY-4835 fix in them. Because of that missing fix, the triggers donot get invalidated as part of
upgrade for those releases and hence the test added by this jira would fail for those 4 releases. To avoid the failure, I have
disabled the test for those 4 releases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1146915 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4835-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-4835-caf6b950
|
DERBY-5105: NoSuchMethodError in upgrade tests (testTriggerBasic)
Disable the post soft upgrade phase for the versions that suffer from
DERBY-4835.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1081072 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4836-45e3ef08
|
DERBY-4836: many failures with IBM 1.5 and 1.6 on windows after test InternationalConnectTest
Ensure that the databases are shut down before attempting to delete them.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1028035 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4836-4b013e1c
|
DERBY-4836; many failures with IBM 1.5 and 1.6 on windows after test InternationalConnectTest
revive test for IBM 1.5 and 1.6 jvms; need IBM 1.6 SR9 and IBM 1.5 SR13.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1213473 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4836-65b2c92d
|
DERBY-4836; many test failures on windows with ibm 1.5 and 1.6 on windows after test InternationalConnectTest
skipping over the test with ibm jvms while investigating.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1005285 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4836-e5a97fee
|
DERBY-4836 many failures with IBM 1.5 and 1.6 on windows after test InternationalConnectTest
Stopped testBoundaries() fixture from running on IBM and Windows (Sun < 1.5)
Added cleanup for the additional databases that are created by testBoundaries()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1027261 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4843-2aa7d957
|
DERBY-4843: Consult isPoolable hint before caching prepared statement
Added tests to verify that Derby heeds the isPoobable hint before adding a
statement to the cache. The default being true, this mechanism is supposedly
used primarily for avoiding that ad-hoc queries "pollute" the cache.
Only the client driver has a JDBC statement object cache.
Patch file: derby-4843-2a-test_isPoolable.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1129136 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4845-1ea68f8c
|
DERBY-4845: Improve the dependency tracking for our build targets
Don't access the readOnlyUpgrade field in DataDictionaryImpl directly
from iapi code. Added a method to the DataDictionary interface instead.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1200232 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
"\t\tif (!dd.isReadOnlyUpgrade()) {"
],
"header": "@@ -393,7 +393,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t\tif (!((org.apache.derby.impl.sql.catalog.DataDictionaryImpl) dd).readOnlyUpgrade) {"
]
},
{
"added": [
"\t\t\tif (!lcc.getDataDictionary().isReadOnlyUpgrade()) {"
],
"header": "@@ -689,7 +689,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t\t\tif (!((org.apache.derby.impl.sql.catalog.DataDictionaryImpl) (lcc.getDataDictionary())).readOnlyUpgrade) {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\tprivate boolean readOnlyUpgrade;",
""
],
"header": "@@ -428,7 +428,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic boolean readOnlyUpgrade;"
]
}
]
},
{
"file": "java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java",
"hunks": [
{
"added": [
" public boolean isReadOnlyUpgrade() {",
" return false;",
" }",
""
],
"header": "@@ -775,6 +775,10 @@ public class EmptyDictionary implements DataDictionary, ModuleSupportable {",
"removed": []
}
]
}
] |
derby-DERBY-4845-4e29c88d
|
DERBY-4845: Improve the dependency tracking for our build targets
Remove dependency on EmbedConnection40 from BrokeredConnection40.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1205195 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java",
"hunks": [
{
"added": [],
"header": "@@ -24,7 +24,6 @@ package org.apache.derby.iapi.jdbc;",
"removed": [
"import java.sql.Connection;"
]
},
{
"added": [
"public class BrokeredConnection40",
" extends BrokeredConnection30 implements EngineConnection40 {"
],
"header": "@@ -33,12 +32,11 @@ import java.sql.Struct;",
"removed": [
"//import org.apache.derby.impl.jdbc.EmbedConnection40;",
"import org.apache.derby.impl.jdbc.EmbedConnection40;",
"public class BrokeredConnection40 extends BrokeredConnection30 {"
]
},
{
"added": [
" ((EngineConnection40) getRealConnection()).abort(executor);",
" return",
" ((EngineConnection40) getRealConnection()).getNetworkTimeout();"
],
"header": "@@ -356,14 +354,15 @@ public class BrokeredConnection40 extends BrokeredConnection30 {",
"removed": [
" ((EmbedConnection40) getRealConnection()).abort( executor );",
" return ((EmbedConnection40) getRealConnection()).getNetworkTimeout();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.EngineConnection40;",
"public class EmbedConnection40",
" extends EmbedConnection30 implements EngineConnection40 {"
],
"header": "@@ -34,9 +34,11 @@ import java.util.concurrent.Executor;",
"removed": [
"public class EmbedConnection40 extends EmbedConnection30 {"
]
}
]
}
] |
derby-DERBY-4845-70a4f2da
|
DERBY-4845: Improve the dependency tracking for our build targets
Don't use impl class StatementNode in iapi classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1196560 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/Parser.java",
"hunks": [
{
"added": [],
"header": "@@ -23,12 +23,6 @@ package org.apache.derby.iapi.sql.compile;",
"removed": [
"/* Strictly speaking we shouldn't import classes under the impl hierarchy here",
" * but this is work in progress.",
" * manish - Wed Mar 28 13:05:19 PST 2001",
" */",
"import org.apache.derby.impl.sql.compile.StatementNode;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -28,6 +28,7 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": []
},
{
"added": [],
"header": "@@ -38,8 +39,6 @@ import org.apache.derby.catalog.TypeDescriptor;",
"removed": [
"import org.apache.derby.impl.sql.compile.StatementNode;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -41,7 +41,7 @@ import org.apache.derby.iapi.services.context.ContextService;",
"removed": [
"import org.apache.derby.impl.sql.compile.StatementNode;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -27,6 +27,7 @@ import org.apache.derby.iapi.reference.JDBC30Translation;",
"removed": []
},
{
"added": [],
"header": "@@ -72,9 +73,6 @@ import org.apache.derby.iapi.sql.depend.DependencyManager;",
"removed": [
"import org.apache.derby.impl.sql.compile.FromBaseTable;",
"import org.apache.derby.impl.sql.compile.QueryTreeNode;",
"import org.apache.derby.impl.sql.compile.StatementNode;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,10 +21,8 @@",
"removed": [
"import java.lang.reflect.Modifier;",
"import java.util.HashSet;"
]
},
{
"added": [
"\t\tVisitable qt = p.parseStatement(select);"
],
"header": "@@ -546,7 +544,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\tStatementNode qt = p.parseStatement(select);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,8 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
""
]
},
{
"added": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -30,20 +28,16 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Parser;",
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -21,14 +21,12 @@",
"removed": [
"import org.apache.derby.impl.sql.compile.QueryTreeNode;",
"import org.apache.derby.iapi.sql.compile.Parser;",
"import org.apache.derby.iapi.sql.Statement;",
"import org.apache.derby.iapi.services.sanity.SanityManager;"
]
},
{
"added": [
"\tpublic Visitable parseStatement(String statementSQLText)"
],
"header": "@@ -73,7 +71,7 @@ public class ParserImpl implements Parser",
"removed": [
"\tpublic StatementNode parseStatement(String statementSQLText) "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [],
"header": "@@ -37,7 +37,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.iapi.services.io.StoredFormatIds;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,8 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
""
]
},
{
"added": [],
"header": "@@ -34,7 +32,6 @@ import org.apache.derby.iapi.sql.compile.Parser;",
"removed": [
"import org.apache.derby.iapi.sql.compile.RowOrdering;"
]
},
{
"added": [],
"header": "@@ -44,35 +41,22 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": [
"import org.apache.derby.iapi.sql.execute.ExecutionContext;",
"",
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.sql.ResultSet;",
"",
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import java.util.Properties;"
]
}
]
},
{
"file": "java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Visitable;"
],
"header": "@@ -32,6 +32,7 @@ import org.apache.derby.iapi.services.daemon.IndexStatisticsDaemon;",
"removed": []
},
{
"added": [],
"header": "@@ -65,7 +66,6 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": [
"import org.apache.derby.impl.sql.compile.StatementNode;"
]
},
{
"added": [
"\t\t\tVisitable actionStmt,"
],
"header": "@@ -489,7 +489,7 @@ public class EmptyDictionary implements DataDictionary, ModuleSupportable {",
"removed": [
"\t\t\tStatementNode actionStmt,"
]
}
]
}
] |
derby-DERBY-4845-999e32af
|
DERBY-4845: Improve the dependency tracking for our build targets
Use DependableFinder interface instead of impl classes in iapi code.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1196562 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ColPermsDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -26,10 +26,8 @@ import org.apache.derby.catalog.DependableFinder;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.DependableFinder;"
],
"header": "@@ -35,6 +35,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/PermDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -29,8 +29,6 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": [
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;",
"import org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/RoleGrantDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -30,7 +30,6 @@ import org.apache.derby.iapi.services.io.StoredFormatIds;",
"removed": [
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/RoutinePermsDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -27,8 +27,6 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -34,7 +34,6 @@ import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"removed": [
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/TablePermsDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -26,9 +26,7 @@ import org.apache.derby.catalog.DependableFinder;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/TupleDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -21,18 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"import org.apache.derby.iapi.error.StandardException;",
"",
"import org.apache.derby.iapi.reference.SQLState;",
"",
"// is it OK to do this?",
"import org.apache.derby.impl.sql.catalog.DDdependableFinder;",
"import org.apache.derby.impl.sql.catalog.DDColumnDependableFinder;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.DependableFinder;"
],
"header": "@@ -139,6 +139,7 @@ import org.apache.derby.impl.services.locks.Timeout;",
"removed": []
}
]
},
{
"file": "java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.DependableFinder;"
],
"header": "@@ -24,6 +24,7 @@ import java.util.Hashtable;",
"removed": []
},
{
"added": [
"",
" public DependableFinder getDependableFinder(int formatId) {",
" return null;",
" }",
"",
" public DependableFinder getColumnDependableFinder(",
" int formatId, byte[] columnBitMap) {",
" return null;",
" }"
],
"header": "@@ -897,4 +898,13 @@ public class EmptyDictionary implements DataDictionary, ModuleSupportable {",
"removed": []
}
]
}
] |
derby-DERBY-4845-9eb1bd12
|
DERBY-4845: Improve the dependency tracking for our build targets
Move getCreateAliasNode() and mapTableAsVTI() out of NodeFactory to
prevent that they expose impl classes to iapi code.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1198695 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -21,13 +21,8 @@",
"removed": [
"import java.util.Properties;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
""
]
},
{
"added": [],
"header": "@@ -35,8 +30,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.impl.sql.compile.ResultColumnList;",
"import org.apache.derby.impl.sql.compile.ResultSetNode;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
"import java.util.*;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.services.context.ContextManager;"
],
"header": "@@ -35,6 +36,7 @@ import org.apache.derby.iapi.util.ReuseFactory;",
"removed": []
},
{
"added": [],
"header": "@@ -78,12 +80,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import java.util.Enumeration;",
"import java.util.Properties;",
"import java.util.Vector;",
"import java.util.HashSet;",
"import java.util.Iterator;",
"import java.util.Set;"
]
},
{
"added": [
"\t\t\tResultSetNode vtiNode = mapTableAsVTI("
],
"header": "@@ -2192,7 +2188,7 @@ public class FromBaseTable extends FromTable",
"removed": [
"\t\t\tResultSetNode vtiNode = getNodeFactory().mapTableAsVTI("
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java",
"hunks": [
{
"added": [],
"header": "@@ -29,13 +29,9 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"",
"import org.apache.derby.iapi.sql.compile.Visitable;"
]
},
{
"added": [
"import java.util.List;"
],
"header": "@@ -55,14 +51,13 @@ import org.apache.derby.iapi.store.access.Qualifier;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"import java.lang.reflect.Modifier;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java",
"hunks": [
{
"added": [
"import java.util.List;"
],
"header": "@@ -54,6 +54,7 @@ import java.lang.reflect.Modifier;",
"removed": []
},
{
"added": [
"\t\taddParms((List) params);"
],
"header": "@@ -85,7 +86,7 @@ public class NewInvocationNode extends MethodCallNode",
"removed": [
"\t\taddParms((Vector) params);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [],
"header": "@@ -34,7 +33,6 @@ import org.apache.derby.iapi.sql.compile.Optimizer;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;"
]
},
{
"added": [],
"header": "@@ -43,9 +41,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.catalog.AliasInfo;",
"import org.apache.derby.iapi.util.StringUtil;"
]
},
{
"added": [],
"header": "@@ -75,8 +71,6 @@ public class NodeFactoryImpl extends NodeFactory implements ModuleControl, Modul",
"removed": [
"\tprivate static final Vector emptyVector = new Vector(0);",
""
]
}
]
}
] |
derby-DERBY-4845-a6532d02
|
DERBY-4845: Improve the dependency tracking for our build targets
Don't call code that only works on Java SE platforms from code that's
supposed to work on CDC/Foundation Profile platforms.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1200293 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/db/SlaveDatabase.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.PublicAPI;",
"removed": [
"import org.apache.derby.iapi.error.ExceptionSeverity;"
]
},
{
"added": [
"import org.apache.derby.jdbc.InternalDriver;",
""
],
"header": "@@ -34,8 +33,8 @@ import org.apache.derby.iapi.util.InterruptStatus;",
"removed": [
"import java.sql.Driver;",
"import java.sql.DriverManager;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/LOBStoredProcedure.java",
"hunks": [
{
"added": [],
"header": "@@ -23,8 +23,6 @@ package org.apache.derby.impl.jdbc;",
"removed": [
"import java.sql.Connection;",
"import java.sql.DriverManager;"
]
},
{
"added": [],
"header": "@@ -38,30 +36,6 @@ import org.apache.derby.jdbc.InternalDriver;",
"removed": [
" /**",
" * The maximum length of the data returned from the BLOB stored procedures.",
" * <p>",
" * This value is currently dictated by the maximum length of",
" * VARCHAR/VARBINARY, because these are the return types of the stored",
" * procedures.",
" */",
" public static final int MAX_BLOB_RETURN_LEN = Limits.DB2_VARCHAR_MAXWIDTH;",
"",
" /**",
" * The maximum length of the data returned from the CLOB stored procedures.",
" * <p>",
" * This value is currently dictated by the maximum length of",
" * VARCHAR/VARBINARY, because these are the return types of the stored",
" * procedures, and the modified UTF8 encoding used for CLOB data. This",
" * threshold value could be higher (equal to {@code MAX_BLOB_RETURN_LEN}),",
" * but then the procedure fetching data from the CLOB must be rewritten to",
" * have more logic.",
" * <p>",
" * For now we use the defensive assumption that all characters are",
" * represented by three bytes.",
" */",
" public static final int MAX_CLOB_RETURN_LEN = MAX_BLOB_RETURN_LEN / 3;",
""
]
},
{
"added": [
" len = Math.min(len, Limits.MAX_CLOB_RETURN_LEN);"
],
"header": "@@ -174,7 +148,7 @@ public class LOBStoredProcedure {",
"removed": [
" len = Math.min(len, MAX_CLOB_RETURN_LEN);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -175,9 +175,6 @@ import java.security.NoSuchAlgorithmException;",
"removed": [
"// LOBStoredProcedure is imported only to get hold of a constant.",
"import org.apache.derby.impl.jdbc.LOBStoredProcedure;",
""
]
},
{
"added": [
" TypeDescriptor newReturnType = DataTypeDescriptor.getCatalogType( Types.VARCHAR, Limits.MAX_CLOB_RETURN_LEN );"
],
"header": "@@ -2583,7 +2580,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" TypeDescriptor newReturnType = DataTypeDescriptor.getCatalogType( Types.VARCHAR, LOBStoredProcedure.MAX_CLOB_RETURN_LEN );"
]
},
{
"added": [
" Limits.MAX_CLOB_RETURN_LEN),"
],
"header": "@@ -12308,7 +12305,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" LOBStoredProcedure.MAX_CLOB_RETURN_LEN),"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/AutoloadedDriver.java",
"hunks": [
{
"added": [],
"header": "@@ -66,9 +66,6 @@ public class AutoloadedDriver implements Driver",
"removed": [
" // This flag is true unless the deregister attribute has been set to",
" // false by the user (DERBY-2905)",
" private static boolean deregister = true;"
]
},
{
"added": [
" if (InternalDriver.getDeregister() && _autoloadedDriver != null) {",
" InternalDriver.setDeregister(true);"
],
"header": "@@ -249,13 +246,13 @@ public class AutoloadedDriver implements Driver",
"removed": [
" if (deregister && _autoloadedDriver != null) {",
" deregister = true;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/InternalDriver.java",
"hunks": [
{
"added": [
" /**",
" * Tells whether or not {@code AutoloadedDriver} should deregister itself",
" * on shutdown. This flag is true unless the deregister attribute has been",
" * set to false by the user (DERBY-2905).",
" */",
" private static boolean deregister = true;",
""
],
"header": "@@ -77,6 +77,13 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": []
},
{
"added": [
" InternalDriver.setDeregister(deregister);"
],
"header": "@@ -230,7 +237,7 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
" AutoloadedDriver.setDeregister(deregister);"
]
},
{
"added": [
" /**",
" * Indicate to {@code AutoloadedDriver} whether it should deregister",
" * itself on shutdown.",
" *",
" * @param deregister whether or not {@code AutoloadedDriver} should",
" * deregister itself",
" */",
" static void setDeregister(boolean deregister) {",
" InternalDriver.deregister = deregister;",
" }",
" /**",
" * Check whether {@code AutoloadedDriver} should deregister itself on",
" * shutdown.",
" *",
" * @return the deregister value",
" */",
" static boolean getDeregister() {",
" return InternalDriver.deregister;",
" }",
"}"
],
"header": "@@ -634,7 +641,25 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
"}",
""
]
}
]
}
] |
derby-DERBY-4845-ba954df7
|
DERBY-4845: Improve the dependency tracking for our build targets
Remove dependency on EmbedCallableStatement40 from
BrokeredCallableStatement40.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1205378 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java",
"hunks": [
{
"added": [
"public class BrokeredCallableStatement40 extends BrokeredCallableStatement30",
" implements EngineCallableStatement40 {"
],
"header": "@@ -31,9 +31,9 @@ import java.sql.SQLException;",
"removed": [
"import org.apache.derby.impl.jdbc.EmbedCallableStatement40;",
"public class BrokeredCallableStatement40 extends BrokeredCallableStatement30{"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.EngineCallableStatement40;",
"public class EmbedCallableStatement40",
" extends EmbedCallableStatement30",
" implements EngineCallableStatement40 {"
],
"header": "@@ -35,10 +35,12 @@ import java.sql.SQLXML;",
"removed": [
"public class EmbedCallableStatement40 extends EmbedCallableStatement30 {",
" "
]
}
]
}
] |
derby-DERBY-4845-c9ec6b98
|
DERBY-4845: Improve the dependency tracking for our build targets
Get rid of a call to Util.notImplemented() from BrokeredStatement by
pulling the isClosed() method up from BrokeredStatement40,
BrokeredPreparedStatement40 and BrokeredCallableStatement40 to their
common super-class.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1204934 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java",
"hunks": [
{
"added": [],
"header": "@@ -21,12 +21,8 @@",
"removed": [
"import org.apache.derby.iapi.reference.JDBC30Translation;",
"import org.apache.derby.iapi.error.StandardException;",
"import org.apache.derby.iapi.error.PublicAPI;",
"import org.apache.derby.iapi.services.info.JVMInfo;"
]
},
{
"added": [],
"header": "@@ -35,8 +31,6 @@ import java.sql.SQLException;",
"removed": [
"import java.lang.reflect.*;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java",
"hunks": [
{
"added": [
"",
" /**",
" * Identical to the JDBC 4 isClosed() method.",
" */",
" public boolean isClosed() throws SQLException;"
],
"header": "@@ -46,6 +46,11 @@ public interface EngineStatement extends Statement {",
"removed": []
}
]
}
] |
derby-DERBY-4845-e6a99982
|
DERBY-4845: Improve the dependency tracking for our build targets
Make NodeFactory return nodes of type Node (in an iapi package) instead
of QueryTreeNode (which lives in an impl packages) to remove dependencies
on implementation code in iapi code.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1199160 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -25,12 +25,6 @@ import org.apache.derby.iapi.services.context.ContextManager;",
"removed": [
"/* Strictly speaking we shouldn't import classes under the impl hierarchy here",
" * but this is work in progress.",
" * manish - Wed Mar 28 13:05:19 PST 2001",
" */",
"import\torg.apache.derby.impl.sql.compile.QueryTreeNode;",
""
]
},
{
"added": [
"\tpublic abstract Node getNode(int nodeType,"
],
"header": "@@ -63,7 +57,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic abstract QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType, Object arg1, ContextManager cm)",
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -77,10 +71,10 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType, Object arg1, ContextManager cm)",
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,",
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -99,13 +93,13 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,",
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,",
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -125,14 +119,14 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,",
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic Node getNode(int nodeType,"
],
"header": "@@ -153,7 +147,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -161,7 +155,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic Node getNode(int nodeType,"
],
"header": "@@ -184,7 +178,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -193,7 +187,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -216,7 +210,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -226,7 +220,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -250,7 +244,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -261,7 +255,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -285,7 +279,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -297,7 +291,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -322,7 +316,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -335,7 +329,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -361,7 +355,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -375,7 +369,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -403,7 +397,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -418,7 +412,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -447,7 +441,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -463,7 +457,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -493,7 +487,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
},
{
"added": [
"\t\tNode retval = getNode(nodeType, cm);"
],
"header": "@@ -510,7 +504,7 @@ public abstract class NodeFactory",
"removed": [
"\t\tQueryTreeNode retval = getNode(nodeType, cm);"
]
},
{
"added": [
"\tpublic final Node getNode(int nodeType,"
],
"header": "@@ -541,7 +535,7 @@ public abstract class NodeFactory",
"removed": [
"\tpublic final QueryTreeNode getNode(int nodeType,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java",
"hunks": [
{
"added": [
"\t\treturn (QueryTreeNode) getNodeFactory().getNode("
],
"header": "@@ -354,12 +354,11 @@ public class ConditionalNode extends ValueNode",
"removed": [
"\t\tQueryTreeNode cast = getNodeFactory().getNode(",
"\t\treturn cast;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" QueryTreeNode newNode = (QueryTreeNode) getNodeFactory().getNode(",
" C_NodeTypes.NEW_INVOCATION_NODE,"
],
"header": "@@ -2409,8 +2409,8 @@ public class FromBaseTable extends FromTable",
"removed": [
" QueryTreeNode newNode =",
" getNodeFactory().getNode(C_NodeTypes.NEW_INVOCATION_NODE,"
]
},
{
"added": [
" vtiNode = (QueryTreeNode) getNodeFactory().getNode(",
" C_NodeTypes.FROM_VTI,"
],
"header": "@@ -2420,7 +2420,8 @@ public class FromBaseTable extends FromTable",
"removed": [
" vtiNode = getNodeFactory().getNode(C_NodeTypes.FROM_VTI,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java",
"hunks": [
{
"added": [
" (QueryTreeNode) getNodeFactory().getNode("
],
"header": "@@ -673,7 +673,7 @@ public final class LikeEscapeOperatorNode extends TernaryOperatorNode",
"removed": [
" getNodeFactory().getNode("
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Node;"
],
"header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.monitor.Monitor;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.Node;"
],
"header": "@@ -43,6 +43,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": []
}
]
}
] |
derby-DERBY-4845-ec600145
|
DERBY-4845: Improve the dependency tracking for our build targets
Don't use impl.jdbc.Util from the iapi.jdbc package.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1205753 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -29,8 +29,6 @@ import java.sql.NClob;",
"removed": [
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.impl.jdbc.Util;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java",
"hunks": [
{
"added": [],
"header": "@@ -30,8 +30,6 @@ import java.sql.DatabaseMetaData;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;",
""
]
},
{
"added": [
" /** Exception factory for the underlying connection. */",
" private final ExceptionFactory exceptionFactory;",
""
],
"header": "@@ -49,6 +47,9 @@ public abstract class BrokeredConnection implements EngineConnection",
"removed": []
},
{
"added": [
" throws SQLException",
" this.exceptionFactory =",
" control.getRealConnection().getExceptionFactory();"
],
"header": "@@ -64,8 +65,11 @@ public abstract class BrokeredConnection implements EngineConnection",
"removed": []
},
{
"added": [
" /**",
" * Generate an exception reporting that there is no current connection.",
" * @return a no-current-connection exception",
" */",
" final SQLException noCurrentConnection() {",
" return exceptionFactory.getSQLException(",
" SQLState.NO_CURRENT_CONNECTION, null, null, null);",
" }",
""
],
"header": "@@ -364,6 +368,15 @@ public abstract class BrokeredConnection implements EngineConnection",
"removed": []
},
{
"added": [
"\t\t\tthrow noCurrentConnection();"
],
"header": "@@ -371,7 +384,7 @@ public abstract class BrokeredConnection implements EngineConnection",
"removed": [
"\t\t\tthrow Util.noCurrentConnection();"
]
},
{
"added": [],
"header": "@@ -496,18 +509,6 @@ public abstract class BrokeredConnection implements EngineConnection",
"removed": [
" ",
" /**",
" * Checks if the connection is closed and throws an exception if",
" * it is.",
" *",
" * @exception SQLException if the connection is closed",
" */",
" protected final void checkIfClosed() throws SQLException {",
" if (isClosed()) {",
" throw Util.noCurrentConnection();",
" }",
" }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java",
"hunks": [
{
"added": [],
"header": "@@ -26,7 +26,6 @@ import java.sql.PreparedStatement;",
"removed": [
"import org.apache.derby.iapi.reference.JDBC30Translation;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java",
"hunks": [
{
"added": [],
"header": "@@ -31,7 +31,6 @@ import java.sql.SQLXML;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
},
{
"added": [
" public BrokeredConnection40(BrokeredConnectionControl control)",
" throws SQLException {"
],
"header": "@@ -39,7 +38,8 @@ public class BrokeredConnection40",
"removed": [
" public BrokeredConnection40(BrokeredConnectionControl control) {"
]
},
{
"added": [
" throw noCurrentConnection();"
],
"header": "@@ -309,7 +309,7 @@ public class BrokeredConnection40",
"removed": [
" throw Util.noCurrentConnection();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -27,8 +27,6 @@ import java.sql.NClob;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;",
"import org.apache.derby.iapi.reference.SQLState;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java",
"hunks": [
{
"added": [],
"header": "@@ -23,8 +23,6 @@ package org.apache.derby.iapi.jdbc;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;",
""
]
},
{
"added": [],
"header": "@@ -62,7 +60,6 @@ public class BrokeredStatement implements EngineStatement",
"removed": [
""
]
},
{
"added": [
" * is."
],
"header": "@@ -558,8 +555,7 @@ public class BrokeredStatement implements EngineStatement",
"removed": [
" * is. This method relies on the <code>isClosed()</code> method",
" * and therefore only works with JDBC 4.0."
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import org.apache.derby.impl.jdbc.Util;",
"import org.apache.derby.iapi.reference.SQLState;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.error.ExceptionSeverity;"
]
},
{
"added": [],
"header": "@@ -54,8 +53,6 @@ import org.apache.derby.iapi.store.access.TransactionController;",
"removed": [
"import org.apache.derby.iapi.util.IdUtil;",
""
]
},
{
"added": [
"import org.apache.derby.iapi.jdbc.ExceptionFactory;"
],
"header": "@@ -83,6 +80,7 @@ import java.util.Properties;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/SQLExceptionFactory.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.ExceptionFactory;"
],
"header": "@@ -21,12 +21,9 @@",
"removed": [
"import java.io.IOException;",
"import org.apache.derby.iapi.error.ExceptionSeverity;",
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.iapi.reference.MessageId;"
]
},
{
"added": [
"public class SQLExceptionFactory implements ExceptionFactory {"
],
"header": "@@ -34,7 +31,7 @@ import java.sql.SQLException;",
"removed": [
"public class SQLExceptionFactory {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/Driver20.java",
"hunks": [
{
"added": [],
"header": "@@ -24,11 +24,7 @@ package org.apache.derby.jdbc;",
"removed": [
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.impl.jdbc.EmbedConnection;",
"",
"import org.apache.derby.iapi.services.sanity.SanityManager;"
]
},
{
"added": [],
"header": "@@ -40,10 +36,8 @@ import org.apache.derby.iapi.security.SecurityUtil;",
"removed": [
"import java.sql.Connection;",
"import java.sql.DriverManager;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/XAStatementControl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.ExceptionFactory;"
],
"header": "@@ -26,7 +26,7 @@ import org.apache.derby.iapi.jdbc.BrokeredStatementControl;",
"removed": [
"import org.apache.derby.iapi.jdbc.EngineStatement;"
]
},
{
"added": [
"",
" /**",
" * Return the exception factory for the underlying connection.",
" */",
" public ExceptionFactory getExceptionFactory() {",
" return applicationConnection.getExceptionFactory();",
" }"
],
"header": "@@ -241,4 +241,11 @@ final class XAStatementControl implements BrokeredStatementControl {",
"removed": []
}
]
}
] |
derby-DERBY-4849-b4885a64
|
DERBY-4849: Re-compilation may cause duplicate entries in the XPLAIN table
Avoid writing XPLAIN data if result set is being closed due to invalidation.
Patch file: derby-4849-2c-broad_fix_with_test.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1028716 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/conn/StatementContext.java",
"hunks": [
{
"added": [],
"header": "@@ -28,16 +28,11 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.PreparedStatement;",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.iapi.sql.LanguageFactory;",
"import org.apache.derby.iapi.sql.conn.SQLSessionContext;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java",
"hunks": [
{
"added": [],
"header": "@@ -44,8 +44,6 @@ import org.apache.derby.iapi.sql.Activation;",
"removed": [
"import org.apache.derby.iapi.store.access.TransactionController;",
""
]
},
{
"added": [],
"header": "@@ -54,7 +52,6 @@ import java.util.ArrayList;",
"removed": [
"import java.sql.SQLException;"
]
},
{
"added": [
" private boolean statementWasInvalidated;"
],
"header": "@@ -90,6 +87,7 @@ final class GenericStatementContext",
"removed": []
},
{
"added": [
" statementWasInvalidated = false;"
],
"header": "@@ -232,6 +230,7 @@ final class GenericStatementContext",
"removed": []
},
{
"added": [
" int severity = ExceptionSeverity.SESSION_SEVERITY;",
" if (error instanceof StandardException) {",
" StandardException se = (StandardException)error;",
" // Update the severity.",
" severity = se.getSeverity();",
" // DERBY-4849: Remember that the plan was invalidated, such that",
" // we can avoid performing certain actions more than once",
" // (for correctness, not optimization).",
" if (SQLState.LANG_STATEMENT_NEEDS_RECOMPILE.equals(",
" se.getMessageId())) {",
" statementWasInvalidated = true;",
" }",
" }"
],
"header": "@@ -511,9 +510,19 @@ final class GenericStatementContext",
"removed": [
"\t\tint severity = (error instanceof StandardException) ?",
"\t\t\t((StandardException) error).getSeverity() :",
"\t\t\tExceptionSeverity.SESSION_SEVERITY;"
]
}
]
}
] |
derby-DERBY-485-2542f1dd
|
DERBY-485 Catch SecurityExceptions and LinkageExceptions consistently when loading application
classes (e.g. procedures, functions) and report as a ClassNotFoundException with the text of
the underlying exception. Enhance the test lang/dcl.jar to have a signed jar file as a database
jar, a hacked version of the jar file and a jar file with an invalid class (for a LinkageError).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@230183 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/loader/ClassFactory.java",
"hunks": [
{
"added": [
"\t\t@exception ClassNotFoundException Class cannot be found, or",
"\t\ta SecurityException or LinkageException was thrown loading the class."
],
"header": "@@ -51,7 +51,8 @@ public interface ClassFactory {",
"removed": [
"\t\t@exception ClassNotFoundException Class cannot be found"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java",
"hunks": [
{
"added": [
"abstract class DatabaseClasses"
],
"header": "@@ -76,7 +76,7 @@ import java.io.Serializable;",
"removed": [
"public abstract class DatabaseClasses"
]
},
{
"added": [
"\tDatabaseClasses() {"
],
"header": "@@ -92,7 +92,7 @@ public abstract class DatabaseClasses",
"removed": [
"\tpublic DatabaseClasses() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java",
"hunks": [
{
"added": [
"\tprivate int action = -1;"
],
"header": "@@ -31,7 +31,7 @@ public final class ReflectClassesJava2 extends DatabaseClasses",
"removed": [
"\tprivate int action;"
]
},
{
"added": [
"",
"\t\ttry {",
"\t\t\t// SECURITY PERMISSION - MP2",
"\t\t\tswitch (action) {",
"\t\t\tcase 1:",
"\t\t\t\treturn new ReflectLoaderJava2(getClass().getClassLoader(), this);",
"\t\t\tcase 2:",
"\t\t\t\treturn Thread.currentThread().getContextClassLoader();",
"\t\t\tdefault:",
"\t\t\t\treturn null;",
"\t\t\t}",
"\t\t} finally {",
"\t\t\taction = -1;",
"\t\t",
"\tClass loadClassNotInDatabaseJar(String name) throws ClassNotFoundException {",
"\t\t"
],
"header": "@@ -62,21 +62,27 @@ public final class ReflectClassesJava2 extends DatabaseClasses",
"removed": [
"\t\t// SECURITY PERMISSION - MP2",
"\t\tswitch (action) {",
"\t\tcase 1:",
"\t\t\treturn new ReflectLoaderJava2(getClass().getClassLoader(), this);",
"\t\tcase 2:",
"\t\t\treturn Thread.currentThread().getContextClassLoader();",
"\t\tdefault:",
"\t\t\treturn null;",
"\tsynchronized Class loadClassNotInDatabaseJar(String name) throws ClassNotFoundException {",
"\t\taction = 2;"
]
}
]
}
] |
derby-DERBY-4853-2e1d391a
|
Derby DERBY-4853 log derby.properties location and derby.log location to derby.log
With this change,we will log additional information in derby.log to make it easier for the support group to work with customer problems.
Following 2 additional properties will now always be put in derby.log (every time a database is booted)
user.dir
derby.system.home
user.dir is the system property which gives the user working directory.
If the user has not specified derby,system.home, then Derby will look for optional derby.properties file in user.dir . If user has provided derby.system.home, then the optional derby.properties will be looked in derby.system.home rather than user.dir
If user has not provided derby.system.home, then a sample of the 2 properties on derby.log looks as follows on my machine
user.dir=C:\p4clients\svnmain\client2\trunk\systest\out142
derby.system.home=null
If user has set derby.system.home to c:./temp, then a sample of the 2 properties on derby.log looks as follows on my machine
user.dir=C:\p4clients\svnmain\client2\trunk\systest\out142
derby.system.home=c:/temp
In addition to the above 2 properties, there can be following 3 optional properties in the log (following the 2 properties mentioned above)
derby.stream.error.file
derby.stream.error.method
derby.stream.error.field
The above 3 properties provide a way to alter where error messages get logged rather than tranditional derby.log file. In the absence of the above 3 optional properties, the location of derby.log follows the same logic as derby.properties. But if the user has set any or all of the 3 optional properties, then derby.log will not be in same location as derby.properties. In the Derby code, derby.stream.error.file takes precedence over the other 2 properties and derby.stream.error.method take precedence over the last property.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1071886 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java",
"hunks": [
{
"added": [
"\t\t//Log derby.system.home It will have null value if user didn't set it",
"\t\tlogMsg(Property.SYSTEM_HOME_PROPERTY+\"=\" + ",
"\t\t\t\tPropertyUtil.getSystemProperty(Property.SYSTEM_HOME_PROPERTY));",
"\t\t",
"\t\t//Log properties related to redirection of derby.log ",
"\t\tString target = ",
"\t\t\tPropertyUtil.getSystemProperty(Property.ERRORLOG_FILE_PROPERTY);",
"\t\tif (target != null)",
"\t\t\tlogMsg(Property.ERRORLOG_FILE_PROPERTY+\"=\" + target);",
"\t\t",
"\t\ttarget = ",
"\t\t\tPropertyUtil.getSystemProperty(Property.ERRORLOG_METHOD_PROPERTY);",
"\t\tif (target != null)",
"\t\t\tlogMsg(Property.ERRORLOG_METHOD_PROPERTY+\"=\" + target);",
"\t\t",
"\t\ttarget = ",
"\t\t\tPropertyUtil.getSystemProperty(Property.ERRORLOG_FIELD_PROPERTY);",
"\t\tif (target != null)",
"\t\t\tlogMsg(Property.ERRORLOG_FIELD_PROPERTY+\"=\" + target);",
""
],
"header": "@@ -370,6 +370,26 @@ public class BaseDataFileFactory",
"removed": []
},
{
"added": [
" if ((currentProp = PropertyUtil.getSystemProperty(\"user.dir\")) != null)",
" jvmversion += \"\\nuser.dir=\" + currentProp ; "
],
"header": "@@ -2203,6 +2223,8 @@ public class BaseDataFileFactory",
"removed": []
}
]
}
] |
derby-DERBY-4855-f22d75de
|
DERBY-4855: Add pointer to download page to cli.xconf as part of creating the download page from the release notes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1035700 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/build/org/apache/derbyBuild/ReleaseNotesTransformer.java",
"hunks": [
{
"added": [
" *",
" * <p>",
" * In addition, this task adds a pointer to the download page to src/documentation/conf/cli.xconf. This causes",
" * the site-building scripts to pull the download page into the build.",
" * </p>",
" *"
],
"header": "@@ -43,6 +43,12 @@ import org.apache.tools.ant.Task;",
"removed": []
},
{
"added": [
" private File _cliXconfFile;",
" private String _cliXconfFileName;"
],
"header": "@@ -140,9 +146,11 @@ public class ReleaseNotesTransformer extends Task",
"removed": []
},
{
"added": [
" /**",
" * Ant accessor to set the name of the cli.xconf file which pulls the download page",
" * into the built site.",
" */",
" public void setCliXconfFileName(String cliXconfFileName) throws Exception",
" {",
" _cliXconfFileName = cliXconfFileName;",
" _cliXconfFile = new File(_cliXconfFileName);",
"",
" println( \"Writing import instructions to to \" + cliXconfFileName + \"...\" );",
" }",
""
],
"header": "@@ -184,6 +192,18 @@ public class ReleaseNotesTransformer extends Task",
"removed": []
},
{
"added": [
"",
" wireIntoBuild();"
],
"header": "@@ -203,6 +223,8 @@ public class ReleaseNotesTransformer extends Task",
"removed": []
},
{
"added": [
" /**",
" * <p>",
" * Wire the download page into the build instructions.",
" * </p>",
" */",
" private void wireIntoBuild()",
" throws Exception",
" {",
" String contents = readFileIntoString( _cliXconfFile );",
" int insertPoint = contents.indexOf( \" </uris>\" );",
" String insertion = \" <uri type=\\\"append\\\" src=\\\"releases/release-\" + _releaseID + \".html\\\"/>\\n\";",
" String result = contents.substring( 0, insertPoint ) + insertion + contents.substring( insertPoint );",
"",
" writeStringIntoFile( result, _cliXconfFile );",
" }",
" "
],
"header": "@@ -472,6 +494,22 @@ public class ReleaseNotesTransformer extends Task",
"removed": []
}
]
}
] |
derby-DERBY-4856-022cb5be
|
DERBY-4856: Set svn:eol-style on new files
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1043334 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/error/ThreadDump.java",
"hunks": [
{
"added": [
"/*",
"",
" Derby - Class org.apache.derby.iapi.error.ThreadDump",
"",
" Licensed to the Apache Software Foundation (ASF) under one or more",
" contributor license agreements. See the NOTICE file distributed with",
" this work for additional information regarding copyright ownership.",
" The ASF licenses this file to you under the Apache License, Version 2.0",
" (the \"License\"); you may not use this file except in compliance with",
" the License. You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
" Unless required by applicable law or agreed to in writing, software",
" distributed under the License is distributed on an \"AS IS\" BASIS,",
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" See the License for the specific language governing permissions and",
" limitations under the License.",
"",
" */",
"",
"package org.apache.derby.iapi.error;",
"",
"/* Until DERBY-289 related issue settle for shared code",
" * Engine have similar code as client code even though some of ",
" * code is potentially sharable. If you fix a bug in ThreadDump for engine, ",
" * please also change the code in ",
" * java/shared/org/apache/derby/shared/common/sanity/ThreadDump.java for ",
" * client if necessary.",
" */",
"",
"import java.util.Map;",
"",
"public class ThreadDump {",
"",
" /**",
" * ",
" * @return A string representation of a full thread dump",
" */",
" public static String getStackDumpString() {",
" StringBuffer sb = new StringBuffer();",
" Map<Thread, StackTraceElement[]> st = Thread.getAllStackTraces();",
" for (Map.Entry<Thread, StackTraceElement[]> e : st.entrySet()) {",
" StackTraceElement[] lines = e.getValue();",
" Thread t = e.getKey();",
" sb.append(\"Thread name=\" + t.getName() + \" id=\" + t.getId()",
" + \" priority=\" + t.getPriority() + \" state=\" + t.getState()",
" + \" isdaemon=\" + t.isDaemon() + \"\\n\");",
" for (int i = 0; i < lines.length; i++) {",
" sb.append(\"\\t\" + lines[i] + \"\\n\");",
"",
" }",
" sb.append(\"\\n\");",
" }",
" return sb.toString();",
" }",
"",
"}"
],
"header": "@@ -1,58 +1,58 @@",
"removed": [
"/*",
"",
" Derby - Class org.apache.derby.iapi.error.ThreadDump",
"",
" Licensed to the Apache Software Foundation (ASF) under one or more",
" contributor license agreements. See the NOTICE file distributed with",
" this work for additional information regarding copyright ownership.",
" The ASF licenses this file to you under the Apache License, Version 2.0",
" (the \"License\"); you may not use this file except in compliance with",
" the License. You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
" Unless required by applicable law or agreed to in writing, software",
" distributed under the License is distributed on an \"AS IS\" BASIS,",
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" See the License for the specific language governing permissions and",
" limitations under the License.",
"",
" */",
"",
"package org.apache.derby.iapi.error;",
"",
"/* Until DERBY-289 related issue settle for shared code",
" * Engine have similar code as client code even though some of ",
" * code is potentially sharable. If you fix a bug in ThreadDump for engine, ",
" * please also change the code in ",
" * java/shared/org/apache/derby/shared/common/sanity/ThreadDump.java for ",
" * client if necessary.",
" */",
"",
"import java.util.Map;",
"",
"public class ThreadDump {",
"",
" /**",
" * ",
" * @return A string representation of a full thread dump",
" */",
" public static String getStackDumpString() {",
" StringBuffer sb = new StringBuffer();",
" Map<Thread, StackTraceElement[]> st = Thread.getAllStackTraces();",
" for (Map.Entry<Thread, StackTraceElement[]> e : st.entrySet()) {",
" StackTraceElement[] lines = e.getValue();",
" Thread t = e.getKey();",
" sb.append(\"Thread name=\" + t.getName() + \" id=\" + t.getId()",
" + \" priority=\" + t.getPriority() + \" state=\" + t.getState()",
" + \" isdaemon=\" + t.isDaemon() + \"\\n\");",
" for (int i = 0; i < lines.length; i++) {",
" sb.append(\"\\t\" + lines[i] + \"\\n\");",
"",
" }",
" sb.append(\"\\n\");",
" }",
" return sb.toString();",
" }",
"",
"}"
]
}
]
}
] |
derby-DERBY-4856-4c5c16b6
|
DERBY-4856 this is part three of thread dump and diagnostic information check in. With this check in, user can use derby.stream.error.extendedDiagSeverityLevel to turn on more tracing or turn it off. I am assuming in the code whether database is up or not based on the information. Also modify tests that affected by this fix.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1058404 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/context/ContextManager.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.info.JVMInfo;"
],
"header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.services.property.PropertyUtil;",
"removed": []
},
{
"added": [
" ",
" /**",
" * clean up error and print it to derby.log. Extended diagnosis including",
" * thread dump to derby.log and javaDump if available, will print if the",
" * database is active and severity is greater than or equals to",
" * SESSTION_SEVERITY or as configured by",
" * derby.stream.error.extendedDiagSeverityLevel property",
" * ",
" * @param error the error we want to clean up",
" * @param diagActive",
" * true if extended diagnostics should be considered, ",
" * false not interested of extended diagnostic information",
" * @return true if the context manager is shutdown, false otherwise.",
" */",
" public boolean cleanupOnError(Throwable error, boolean diagActive)"
],
"header": "@@ -236,12 +237,21 @@ public class ContextManager",
"removed": [
"",
"",
"\t/**",
"\t\t@return true if the context manager is shutdown, false otherwise.",
"\t */",
"\tpublic boolean cleanupOnError(Throwable error)"
]
},
{
"added": [
" //When errorSeverity greater or equals Property.EXT_DIAG_SEVERITY_LEVEL,",
" //the threadDump information will be in derby.log and ",
" //the diagnosis information will be prepared.",
" //If Property.EXT_DIAG_SEVERITY_LEVEL is not set in JVM property or",
" //derby property, we will only handle threadDump information and diagnosis",
" //information for errorSeverity = ExceptionSeverity.SESSION_SEVERITY.",
" if (reportError && diagActive",
" && (errorSeverity >= extDiagSeverityLevel)) {"
],
"header": "@@ -331,8 +341,14 @@ cleanup:\tfor (int index = holder.size() - 1; index >= 0; index--) {",
"removed": [
" if (reportError",
" && errorSeverity >= ExceptionSeverity.SESSION_SEVERITY) {"
]
},
{
"added": [
" if (threadDump != null) {",
" JVMInfo.javaDump();",
" }",
""
],
"header": "@@ -407,8 +423,11 @@ cleanup:\tfor (int index = holder.size() - 1; index >= 0; index--) {",
"removed": [
" if (threadDump != null)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/info/JVMInfo.java",
"hunks": [
{
"added": [
"import java.lang.reflect.InvocationTargetException;",
"import java.lang.reflect.Method;",
"import java.net.MalformedURLException;",
"import java.security.AccessController;",
"import java.security.PrivilegedExceptionAction;",
"",
"import org.apache.derby.shared.common.sanity.SanityManager;",
""
],
"header": "@@ -21,6 +21,14 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [
" //DERBY-4856, assume database is not up",
" tr.cleanupOnError(t, false);"
],
"header": "@@ -628,7 +628,8 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": [
"\t\t\ttr.cleanupOnError(t);"
]
},
{
"added": [
" // DERBY-4856, assume database is not up",
" tr.cleanupOnError(e, false);"
],
"header": "@@ -1912,7 +1913,8 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": [
"\t\t\t\t\t\t\ttr.cleanupOnError(e);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java",
"hunks": [
{
"added": [
"\t\t\t\tboolean isShutdown = cleanupOnError(thrownException, database != null ? database.isActive() : false);"
],
"header": "@@ -336,7 +336,7 @@ public final class TransactionResourceImpl",
"removed": [
"\t\t\t\tboolean isShutdown = cleanupOnError(thrownException);"
]
},
{
"added": [
" if (cm != null) { // something to let us cleanup?",
" cm.cleanupOnError(t, database != null ? isActive() : false);"
],
"header": "@@ -349,8 +349,8 @@ public final class TransactionResourceImpl",
"removed": [
"\t\t\tif (cm!=null) { // something to let us cleanup?",
"\t\t\t\tcm.cleanupOnError(t);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java",
"hunks": [
{
"added": [
"",
" //Assume database is not active. DERBY-4856 thread dump",
" cm.cleanupOnError(e, false);"
],
"header": "@@ -356,7 +356,9 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": [
"\t\t\tcm.cleanupOnError(e);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java",
"hunks": [
{
"added": [
" ctxMgr.cleanupOnError(se, db.isActive());"
],
"header": "@@ -758,7 +758,7 @@ public class IndexStatisticsDaemonImpl",
"removed": [
" ctxMgr.cleanupOnError(se);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java",
"hunks": [
{
"added": [
" if (cm != previousCM) {",
" //Assume database is not active. DERBY-4856 thread dump",
" cm.cleanupOnError(StandardException.closeException(), false);",
" }"
],
"header": "@@ -1822,8 +1822,10 @@ nextModule:",
"removed": [
" if (cm != previousCM)",
" cm.cleanupOnError(StandardException.closeException());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.db.Database;"
],
"header": "@@ -20,6 +20,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbedXAResource.java",
"hunks": [
{
"added": [
" // be used again. DERBY-4856 No extended diagnostic information needed.",
" inDoubtCM.cleanupOnError(StandardException.closeException(),",
" false);",
" inDoubtCM.cleanupOnError(se, con.isActive());"
],
"header": "@@ -100,14 +100,15 @@ class EmbedXAResource implements XAResource {",
"removed": [
" // be used again.",
" inDoubtCM.cleanupOnError(StandardException.closeException());",
" inDoubtCM.cleanupOnError(se);"
]
},
{
"added": [
" inDoubtCM.cleanupOnError(StandardException.closeException(),",
" false);",
" inDoubtCM.cleanupOnError(se, con.isActive());"
],
"header": "@@ -404,13 +405,14 @@ class EmbedXAResource implements XAResource {",
"removed": [
" inDoubtCM.cleanupOnError(StandardException.closeException());",
" inDoubtCM.cleanupOnError(se);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_FileSystemData.java",
"hunks": [
{
"added": [
" //Assume database is not active. DERBY-4856 thread dump",
" cm1.cleanupOnError(se, false);"
],
"header": "@@ -183,7 +183,8 @@ public class T_FileSystemData extends T_MultiThreadedIterations {",
"removed": [
"\t\t\tcm1.cleanupOnError(se);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_RawStoreFactory.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.db.Database;"
],
"header": "@@ -34,6 +35,7 @@ import org.apache.derby.iapi.services.monitor.Monitor;",
"removed": []
},
{
"added": [
" //Assume database is not active. DERBY-4856 thread dump",
" cm1.cleanupOnError(se, false);"
],
"header": "@@ -258,7 +260,8 @@ public class T_RawStoreFactory extends T_MultiThreadedIterations {",
"removed": [
"\t\t\tcm1.cleanupOnError(se);"
]
},
{
"added": [
" //Assume database is not active. DERBY-4856 thread dump",
" cm1.cleanupOnError(se, false);"
],
"header": "@@ -5480,7 +5483,8 @@ public class T_RawStoreFactory extends T_MultiThreadedIterations {",
"removed": [
"\t\t\t\tcm1.cleanupOnError(se);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_StreamFile.java",
"hunks": [
{
"added": [
" //Assume database is not active. DERBY-4856 thread dump",
" cm1.cleanupOnError(se, false);"
],
"header": "@@ -216,7 +216,8 @@ public class T_StreamFile extends T_MultiThreadedIterations {",
"removed": [
"\t\t\tcm1.cleanupOnError(se);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_b2i.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.db.Database;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;"
],
"header": "@@ -43,7 +43,9 @@ import org.apache.derby.iapi.services.context.ContextService;",
"removed": []
},
{
"added": [
" cm1.cleanupOnError(e, isdbActive());"
],
"header": "@@ -208,7 +210,7 @@ public class T_b2i extends T_MultiIterations",
"removed": [
" cm1.cleanupOnError(e);"
]
},
{
"added": [
" cm1.cleanupOnError(t, isdbActive());"
],
"header": "@@ -220,7 +222,7 @@ public class T_b2i extends T_MultiIterations",
"removed": [
" cm1.cleanupOnError(t);"
]
},
{
"added": [
" cm.cleanupOnError(e, isdbActive());"
],
"header": "@@ -861,7 +863,7 @@ public class T_b2i extends T_MultiIterations",
"removed": [
" cm.cleanupOnError(e);"
]
},
{
"added": [
" cm.cleanupOnError(e, isdbActive());"
],
"header": "@@ -3267,7 +3269,7 @@ public class T_b2i extends T_MultiIterations",
"removed": [
" cm.cleanupOnError(e);"
]
},
{
"added": [
" ",
" /** Check wheather the database is active or not",
" * @return {@code true} if the database is active, {@code false} otherwise",
" */",
" public boolean isdbActive() {",
" LanguageConnectionContext lcc = (LanguageConnectionContext) ContextService",
" .getContextOrNull(LanguageConnectionContext.CONTEXT_ID);",
" Database db = (Database) (lcc != null ? lcc.getDatabase() : null);",
" return (db != null ? db.isActive() : false);",
" }"
],
"header": "@@ -5089,6 +5091,16 @@ public class T_b2i extends T_MultiIterations",
"removed": []
}
]
}
] |
derby-DERBY-4856-b175fd27
|
DERBY-4856 DERBY-4929 Add thread dump information for error StandardException and SQLException. Due to DERBY-289, ThreadDump.java and ExceptionUtil.java should go to iapi/error for engine. Currently, all thread dump information goes to derby.log
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1043290 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/context/ContextManager.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.error.ExceptionUtil;"
],
"header": "@@ -29,6 +29,7 @@ import org.apache.derby.iapi.error.PassThroughException;",
"removed": []
},
{
"added": [
"import java.sql.SQLException;"
],
"header": "@@ -37,6 +38,7 @@ import org.apache.derby.iapi.services.property.PropertyUtil;",
"removed": []
},
{
"added": [
" int errorSeverity = getErrorSeverity(error);"
],
"header": "@@ -302,9 +304,7 @@ public class ContextManager",
"removed": [
"\t\t\tint errorSeverity = error instanceof StandardException ?",
"\t\t\t\t((StandardException) error).getSeverity() :",
"\t\t\t\tExceptionSeverity.NO_APPLICABLE_SEVERITY;"
]
},
{
"added": [
" if (reportError",
" && errorSeverity >= ExceptionSeverity.SESSION_SEVERITY) {",
" threadDump = ExceptionUtil.dumpThreads();",
" } else {",
" threadDump = null;",
" }"
],
"header": "@@ -331,6 +331,12 @@ cleanup:\tfor (int index = holder.size() - 1; index >= 0; index--) {",
"removed": []
},
{
"added": [
" if (threadDump != null)",
" errorStream.println(threadDump);"
],
"header": "@@ -401,6 +407,8 @@ cleanup:\tfor (int index = holder.size() - 1; index >= 0; index--) {",
"removed": []
},
{
"added": [
" ",
" /**",
" * return the severity of the exception. Currently, this method ",
" * does not determine a severity that is not StandardException ",
" * or SQLException.",
" * @param error - Throwable error",
" * ",
" * @return int vendorcode/severity for the Throwable error",
" * - error/exception to extract vendorcode/severity. ",
" * For error that we can not get severity, ",
" * NO_APPLICABLE_SEVERITY will return.",
" */",
" public int getErrorSeverity(Throwable error) {",
" ",
" if (error instanceof StandardException) {",
" return ((StandardException) error).getErrorCode();",
" }",
" ",
" if (error instanceof SQLException) {",
" return ((SQLException) error).getErrorCode();",
" }",
" return ExceptionSeverity.NO_APPLICABLE_SEVERITY;",
" }"
],
"header": "@@ -504,6 +512,29 @@ cleanup:\tfor (int index = holder.size() - 1; index >= 0; index--) {",
"removed": []
}
]
}
] |
derby-DERBY-4857-0a218e3a
|
DERBY-4857: Utilize the SOAP API to fetch JIRA issue list for release notes generation
Fixed bug in the ancestry chain computation logic.
Moved date formatting code into DerbyVersion, added getFormattedReleaseDate()
and modified toString().
Fixed typo(s).
Renamed variable.
Patch file: derby-4857-6a-client_tweaks.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1030471 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "tools/release/jirasoap/src/main/java/org/apache/derbyBuild/jirasoap/DerbyVersion.java",
"hunks": [
{
"added": [
"import java.util.Calendar;",
"import java.util.GregorianCalendar;",
"",
"//@Immutable",
" /**",
" * Shard static calendar used to format release date (this is not a",
" * erformance critical class).",
" */",
" // GuardedBy(\"CAL\")",
" private static final Calendar CAL = GregorianCalendar.getInstance();",
"",
" /** Constant telling that a version hasn't been released. */",
" public static final long NOT_RELEASED = -1;"
],
"header": "@@ -21,16 +21,27 @@",
"removed": [
" /** Constant for version which haven't been released. */",
" private static final long NOT_RELEASED = -1;"
]
},
{
"added": [
" private final String releaseDateStr;"
],
"header": "@@ -39,6 +50,7 @@ class DerbyVersion",
"removed": []
},
{
"added": [
" if (relDate == NOT_RELEASED) {",
" releaseDateStr = \"n/a\";",
" } else {",
" synchronized (CAL) {",
" CAL.setTimeInMillis(relDate);",
" releaseDateStr = CAL.get(Calendar.YEAR) + \"-\" +",
" padZero(CAL.get(Calendar.MONTH) +1) + \"-\" +",
" padZero(CAL.get(Calendar.DAY_OF_MONTH));",
" }",
" }"
],
"header": "@@ -62,6 +74,16 @@ class DerbyVersion",
"removed": []
},
{
"added": [
" * @return Release date as milliseconds since the Epoch."
],
"header": "@@ -76,7 +98,7 @@ class DerbyVersion",
"removed": [
" * @return Milliseconds since the Epoch."
]
},
{
"added": [
" /**",
" * Returns the release date formatted as a string (YYYY-MM-DD).",
" *",
" * @return The release date, or \"n/a\" if not released.",
" */",
" public String getFormattedReleaseDate() {",
" return releaseDateStr;",
" }",
""
],
"header": "@@ -86,6 +108,15 @@ class DerbyVersion",
"removed": []
}
]
},
{
"file": "tools/release/jirasoap/src/main/java/org/apache/derbyBuild/jirasoap/FilteredIssueLister.java",
"hunks": [
{
"added": [
" private final DerbyVersion ancestorCutoff;"
],
"header": "@@ -118,7 +118,7 @@ public class FilteredIssueLister {",
"removed": [
" private final DerbyVersion ancestorCutOff;"
]
},
{
"added": [
" ancestorCutoff = getVersion(System.getProperty("
],
"header": "@@ -158,7 +158,7 @@ public class FilteredIssueLister {",
"removed": [
" ancestorCutOff = getVersion(System.getProperty("
]
},
{
"added": [
" // Expected format: release version, release date (YYYY-MM-DD, or null)",
" versions[i][0], versions[i][1] == null",
" ? DerbyVersion.NOT_RELEASED",
" : parseDate(versions[i][1]));",
" ancestorCutoff = getVersion(System.getProperty(",
" \"invalid ancestor cutoff version\", iae);"
],
"header": "@@ -189,18 +189,20 @@ public class FilteredIssueLister {",
"removed": [
" // Expected format: release version, release date (YYYY-MM-DD)",
" versions[i][0], parseDate(versions[i][1]));",
" ancestorCutOff = getVersion(System.getProperty(",
" \"invaild ancestor cutoff version\", iae);"
]
},
{
"added": [
" if (parent.compareTo(ancestorCutoff) < 0) {",
" ancestorCutoff.getVersion());",
" System.out.println(ancestors[i]);",
" System.out.println(\"(cutoff=\" + ancestorCutoff.getVersion() + \")\");"
],
"header": "@@ -258,29 +260,23 @@ public class FilteredIssueLister {",
"removed": [
" if (parent.compareTo(ancestorCutOff) < 0) {",
" ancestorCutOff.getVersion());",
" DerbyVersion a = ancestors[i];",
" Calendar cal = GregorianCalendar.getInstance();",
" cal.setTimeInMillis(a.getReleaseDateMillis());",
" System.out.println(a.getVersion() + \", \" +",
" cal.get(Calendar.YEAR) + \"-\" +",
" padZero(cal.get(Calendar.MONTH) +1) + \"-\" +",
" padZero(cal.get(Calendar.DAY_OF_MONTH)));",
" System.out.println(\"(cutoff=\" + ancestorCutOff.getVersion() + \")\");"
]
},
{
"added": [
" System.out.println(relIter.next());"
],
"header": "@@ -308,14 +304,7 @@ public class FilteredIssueLister {",
"removed": [
" DerbyVersion dv = (DerbyVersion)relIter.next();",
" Calendar cal = GregorianCalendar.getInstance();",
" cal.setTimeInMillis(dv.getReleaseDateMillis());",
" System.out.println(dv.getVersion() + \", \" +",
" cal.get(Calendar.YEAR) + \"-\" +",
" padZero(cal.get(Calendar.MONTH) +1) + \"-\" +",
" padZero(cal.get(Calendar.DAY_OF_MONTH)));",
""
]
},
{
"added": [
" log(\"dump file: \" + new File(destFile).getCanonicalPath());"
],
"header": "@@ -465,7 +454,7 @@ public class FilteredIssueLister {",
"removed": [
" log(\"dump file: \" + new File(destFile).getAbsolutePath());"
]
},
{
"added": [
" while (dv.length > 1 && dv[0].compareTo(ancestorCutoff) >= 0) {"
],
"header": "@@ -499,10 +488,7 @@ public class FilteredIssueLister {",
"removed": [
" if (!parent.isReleased() && dv.length > 0) {",
" ancestors.add(dv[0]);",
" }",
" while (dv.length > 1 && dv[0].compareTo(ancestorCutOff) >= 0) {"
]
},
{
"added": [
" * <p>",
" * The target version will always be found at index zero."
],
"header": "@@ -519,9 +505,8 @@ public class FilteredIssueLister {",
"removed": [
" * If the target version has been released, it will be placed at index zero.",
" * If the target version hasn't been released, it will not be included in",
" * the list."
]
},
{
"added": [
" if (!dv.isReleased() && !dv.equals(target)) {"
],
"header": "@@ -536,7 +521,7 @@ public class FilteredIssueLister {",
"removed": [
" if (!dv.isReleased()) {"
]
},
{
"added": [],
"header": "@@ -558,15 +543,6 @@ public class FilteredIssueLister {",
"removed": [
" /** Adds a leading zero if the value is less than ten. */",
" private static String padZero(int val) {",
" if (val < 10) {",
" return \"0\" + Integer.toString(val);",
" } else {",
" return Integer.toString(val);",
" }",
" }",
""
]
}
]
}
] |
derby-DERBY-4857-1d8d2017
|
DERBY-4857: Utilize the SOAP API to fetch JIRA issue list for release notes generation
Integrated the JIRA SOAP tool with the ant genrelnotes target, which now:
o checks if the required properties have been set
o builds the JIRA SOAP tool using Maven 2
o executes the JIRA SOAP tool to generate the issue list
o executes the ReleaseNotesGenerator
The target is started from the directory tools/release.
Try 'ant -p' or see JavaDoc for ReleaseNotesGenerator for help on usage.
Patch file: derby-4857-4b-jirasoap_ant_integration.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1027882 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "tools/release/jirasoap/src/main/java/org/apache/derbyBuild/jirasoap/FilteredIssueListerAntWrapper.java",
"hunks": [
{
"added": [
"/*",
"",
" Derby - Class org.apache.derbyBuild.jirasoap.FilteredIssueListerAntWrapper",
"",
" Licensed to the Apache Software Foundation (ASF) under one or more",
" contributor license agreements. See the NOTICE file distributed with",
" this work for additional information regarding copyright ownership.",
" The ASF licenses this file to you under the Apache License, Version 2.0",
" (the \"License\"); you may not use this file except in compliance with",
" the License. You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
" Unless required by applicable law or agreed to in writing, software",
" distributed under the License is distributed on an \"AS IS\" BASIS,",
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" See the License for the specific language governing permissions and",
" limitations under the License.",
"",
" */",
"",
"package org.apache.derbyBuild.jirasoap;",
"",
"import org.apache.tools.ant.BuildException;",
"",
"/**",
" * Wrapper for invoking {@code FilteredIssueLister} from ant.",
" */",
"public class FilteredIssueListerAntWrapper {",
"",
" private String user;",
" private String password;",
" private String releaseVersion;",
" private long filterId;",
" private String output;",
"",
" public FilteredIssueListerAntWrapper() {};",
"",
" public void setUser(String user) {",
" this.user = user;",
" }",
"",
" public void setPassword(String password) {",
" this.password = password;",
" }",
"",
" public void setReleaseVersion(String releaseVersion) {",
" this.releaseVersion = releaseVersion;",
" }",
"",
" public void setFilterId(String id)",
" throws BuildException {",
" try {",
" filterId = Long.parseLong(id);",
" } catch (NumberFormatException nfe) {",
" throw new BuildException(",
" \"invalid JIRA filter id (only digits allowed): \" + id, nfe);",
" }",
" }",
"",
" public void setOutputFile(String output) {",
" this.output = output;",
" }",
"",
" public void execute()",
" throws BuildException {",
" try {",
" FilteredIssueLister issueLister =",
" new FilteredIssueLister(user, password);",
" issueLister.prepareReleaseNotes(",
" releaseVersion, filterId, output, null);",
" } catch (Exception e) {",
" throw new BuildException(e);",
" }",
"",
" }",
"}"
],
"header": "@@ -0,0 +1,77 @@",
"removed": []
}
]
}
] |
derby-DERBY-4859-44454b6d
|
DERBY-4859: Missing doPrivileged in DatabaseClasses.WriteClassFile()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1025888 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java",
"hunks": [
{
"added": [
"import java.security.AccessController;",
"import java.security.PrivilegedActionException;",
"import java.security.PrivilegedExceptionAction;"
],
"header": "@@ -57,6 +57,9 @@ import java.io.File;",
"removed": []
},
{
"added": [
"\t\tfinal File classFile = FileUtil.newFile(dir,filename);",
" FileOutputStream fis;",
" try {",
" fis = (FileOutputStream) AccessController.doPrivileged(",
" new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" return new FileOutputStream(classFile);",
" }",
" });",
" } catch (PrivilegedActionException pae) {",
" throw (IOException) pae.getCause();",
" }"
],
"header": "@@ -181,13 +184,23 @@ abstract class DatabaseClasses",
"removed": [
"\t\tFile classFile = FileUtil.newFile(dir,filename);",
"\t\t\tFileOutputStream fis = new FileOutputStream(classFile);"
]
},
{
"added": [
"\t\t\t\tSanityManager.THROWASSERT(\"Unable to write .class file\", e);"
],
"header": "@@ -197,7 +210,7 @@ abstract class DatabaseClasses",
"removed": [
"\t\t\t\tSanityManager.THROWASSERT(\"Unable to write .class file\");"
]
}
]
}
] |
derby-DERBY-4860-adc593f7
|
DERBY-4860 RunSuite on derbylang and other subsuites fails with java.lang.NoClassDefFoundError because of prepended ^
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1025795 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java",
"hunks": [
{
"added": [
"\t\tif (jvmflags != null && jvmflags.length() > 0)",
"\t\t //DERBY-4680 Make sure ^ does not get appended to jvmflags",
"\t\t if (jflags != null && jflags.length() > 0)",
"\t\t\tif (jflags != null && jflags.length() >0)",
"\t\t if (testJavaFlags == null || testJavaFlags.length() == 0)"
],
"header": "@@ -392,22 +392,23 @@ public class RunSuite",
"removed": [
"\t\tif (jvmflags != null)",
"\t\t\tif (jflags != null)",
"\t\t\tif (jflags != null)",
"\t\t if (testJavaFlags == null)"
]
}
]
}
] |
derby-DERBY-4868-c769b622
|
DERBY-4868: Remove Types.BIT/Types.BOOLEAN switch in JVMInfo
Only needed for Java versions 1.3 and earlier, which are no longer
supported.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1028645 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -27,28 +27,19 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.services.io.StreamStorable;",
"",
"import org.apache.derby.iapi.services.i18n.MessageService;",
"",
"import org.apache.derby.iapi.services.info.JVMInfo;",
"import java.io.InputStream;",
"import java.io.ByteArrayInputStream;",
"import java.io.EOFException;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/info/JVMInfo.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import java.sql.Types;",
"",
""
]
},
{
"added": [],
"header": "@@ -50,11 +47,6 @@ public abstract class JVMInfo",
"removed": [
"\t/**",
" JDBC Boolean type - Types.BIT in JDK1.1 & 1.2 & 1.3, Types.BOOLEAN in JDK1.4",
"\t*/",
"\tpublic static final int JAVA_SQL_TYPES_BOOLEAN;",
""
]
},
{
"added": [
"\t\t// If we don't recognize that, or if the property is not set, assume",
"\t\t// version 1.4."
],
"header": "@@ -67,8 +59,8 @@ public abstract class JVMInfo",
"removed": [
"\t\t// If we don't recoginze that, or if the property is not set, assume",
"\t\t// version 1.3."
]
},
{
"added": [],
"header": "@@ -143,8 +135,6 @@ public abstract class JVMInfo",
"removed": [
"\t\tJAVA_SQL_TYPES_BOOLEAN = (isJ2ME || id >= J2SE_14) ?",
"\t\t\tTypes.BOOLEAN :java.sql.Types.BIT;"
]
}
]
}
] |
derby-DERBY-4869-08904579
|
DERBY-4869: Correct error messages returned by ResultSet.getObject(int,Class).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1052044 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/NetResultSet40.java",
"hunks": [
{
"added": [
" throw mismatchException( \"NULL\", columnIndex, null );",
" "
],
"header": "@@ -275,11 +275,11 @@ public class NetResultSet40 extends NetResultSet{",
"removed": [
" throw new SQLException( \"NULL\", SQLState.LANG_DATA_TYPE_GET_MISMATCH );",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java",
"hunks": [
{
"added": [
" throw mismatchException( \"NULL\", columnIndex );"
],
"header": "@@ -258,11 +258,9 @@ public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet2",
"removed": [
" throw new SQLException( \"NULL\", SQLState.LANG_DATA_TYPE_GET_MISMATCH );",
" Exception ex = null;",
""
]
},
{
"added": [
" else",
" {",
" Object result = getObject( columnIndex );",
" if ( !type.isInstance( result ) ) { throw new ClassCastException( type.getName() ); }",
" return (T) result;",
" }",
" catch (ClassCastException e) {}",
" throw mismatchException( type.getName(), columnIndex );",
" }",
" private SQLException mismatchException( String targetTypeName, int columnIndex )",
" throws SQLException",
" {",
" String sourceTypeName = getMetaData().getColumnTypeName( columnIndex );",
" SQLException se = newSQLException( SQLState.LANG_DATA_TYPE_GET_MISMATCH, targetTypeName, sourceTypeName );",
"",
" return se;"
],
"header": "@@ -279,11 +277,24 @@ public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet2",
"removed": [
" else { return (T) getObject( columnIndex ); }",
" catch (ClassCastException e) { ex = e; }",
" throw new SQLException( type.getName(), SQLState.LANG_DATA_TYPE_GET_MISMATCH, ex );"
]
}
]
}
] |
derby-DERBY-4869-09869c6d
|
DERBY-4869: Add JDBC 4.1 getParentLogger() method to Derby's implementations of Driver and CommonDataSource.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1067954 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -22,6 +22,8 @@",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -22,6 +22,8 @@",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDriver.java",
"hunks": [
{
"added": [
"\tstatic",
"\t{",
" try {",
" //",
" // We'd rather load this slightly more capable driver.",
" // But if the vm level doesn't support it, then we fall",
" // back on the JDBC3 level driver.",
" //",
" Class.forName( \"org.apache.derby.jdbc.ClientDriver40\" );",
" }",
" catch (Throwable e)",
" {",
" registerMe( new ClientDriver() );",
" }",
"\t}",
"",
"\tprotected static void registerMe( ClientDriver me )",
"\t{"
],
"header": "@@ -47,7 +47,24 @@ public class ClientDriver implements java.sql.Driver {",
"removed": [
" static {"
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientXADataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -22,6 +22,8 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedConnectionPoolDataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedDataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -22,6 +22,8 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedXADataSource40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -24,6 +24,8 @@ package org.apache.derby.jdbc;",
"removed": []
}
]
}
] |
derby-DERBY-4869-16bb01f1
|
DERBY-4869: Make new getObject() overloads return null for null values; also, rework the getObject() methods to remove the SuppressWarnings annotation.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1055872 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/CallableStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -331,7 +331,6 @@ public class CallableStatement40 extends org.apache.derby.client.am.CallableStat",
"removed": [
" @SuppressWarnings(\"unchecked\")"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetResultSet40.java",
"hunks": [
{
"added": [],
"header": "@@ -262,7 +262,6 @@ public class NetResultSet40 extends NetResultSet{",
"removed": [
" @SuppressWarnings(\"unchecked\")"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -334,7 +334,6 @@ public class EmbedCallableStatement40 extends EmbedCallableStatement30 {",
"removed": [
" @SuppressWarnings(\"unchecked\")"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java",
"hunks": [
{
"added": [],
"header": "@@ -250,7 +250,6 @@ public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet2",
"removed": [
" @SuppressWarnings(\"unchecked\")"
]
}
]
}
] |
derby-DERBY-4869-18378229
|
DERBY-4869: Add Connection.getSchema() and setSchema() per JDBC 4.1.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1063723 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-20bc4615
|
DERBY-4869: Attempt to fix problem in tinderbox tests introduced by a previous commit today.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1068073 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/jdbc/Driver40.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -45,7 +45,9 @@ import java.sql.Connection;",
"removed": []
}
]
}
] |
derby-DERBY-4869-226afe36
|
DERBY-4869: Attempt to reduce instability in StatementTest.test_jdbc4_1_queryTimeoutException().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1064281 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-2add32c4
|
DERBY-4869 Implement JDBC 4.1, th api increment introduced by Java 7. Add tests for Connection.setTypeMap(Map) when Map is not null. Add extra tests for case in Connection.abort(executor) when executor is null
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1083094 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-48aecee6
|
DERBY-4869: Another attempt to reduce the timeout-related instability in StatementTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1070504 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-4eb3fedd
|
DERBY-4869: Wrap query timeout SQLState in a SQLTimeoutException per the JDBC 4.1 spec clarification.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1063295 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/SQLExceptionFactory40.java",
"hunks": [
{
"added": [
"import java.sql.SQLTimeoutException;"
],
"header": "@@ -30,6 +30,7 @@ import java.sql.SQLIntegrityConstraintViolationException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/SQLExceptionFactory40.java",
"hunks": [
{
"added": [
"import java.sql.SQLTimeoutException;"
],
"header": "@@ -27,6 +27,7 @@ import java.sql.SQLIntegrityConstraintViolationException;",
"removed": []
}
]
}
] |
derby-DERBY-4869-4f2e50da
|
DERBY-4869: Implement JDBC 4.1, the api increment introduced by Java 7
Calculate expected time and timestamp strings in a way that takes the
time zone into consideration.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1054933 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-53389ca5
|
DERBY-4869: Eliminate a try-catch block in the getObject(Class) overloads.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1058554 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java",
"hunks": [
{
"added": [
" Object retval;",
" if ( String.class.equals( type ) ) { retval = getString( columnIndex ); }",
" else if ( BigDecimal.class.equals( type ) ) { retval = getBigDecimal( columnIndex ); }",
" else if ( Boolean.class.equals( type ) ) { retval = Boolean.valueOf( getBoolean(columnIndex ) ); }",
" else if ( Byte.class.equals( type ) ) { retval = Byte.valueOf( getByte( columnIndex ) ); }",
" else if ( Short.class.equals( type ) ) { retval = Short.valueOf( getShort( columnIndex ) ); }",
" else if ( Integer.class.equals( type ) ) { retval = Integer.valueOf( getInt( columnIndex ) ); }",
" else if ( Long.class.equals( type ) ) { retval = Long.valueOf( getLong( columnIndex ) ); }",
" else if ( Float.class.equals( type ) ) { retval = Float.valueOf( getFloat( columnIndex ) ); }",
" else if ( Double.class.equals( type ) ) { retval = Double.valueOf( getDouble( columnIndex ) ); }",
" else if ( Date.class.equals( type ) ) { retval = getDate( columnIndex ); }",
" else if ( Time.class.equals( type ) ) { retval = getTime( columnIndex ); }",
" else if ( Timestamp.class.equals( type ) ) { retval = getTimestamp( columnIndex ); }",
" else if ( Blob.class.equals( type ) ) { retval = getBlob( columnIndex ); }",
" else if ( Clob.class.equals( type ) ) { retval = getClob( columnIndex ); }",
" else if ( type.isArray() && type.getComponentType().equals( byte.class ) ) { retval = getBytes( columnIndex ); }",
" else { retval = getObject( columnIndex ); }",
" if ( wasNull() ) { retval = null; }",
" if ( (retval == null) || (type.isInstance( retval )) ) { return type.cast( retval ); }"
],
"header": "@@ -260,34 +260,28 @@ public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet2",
"removed": [
" try {",
" Object retval;",
" if ( String.class.equals( type ) ) { retval = getString( columnIndex ); }",
" else if ( BigDecimal.class.equals( type ) ) { retval = getBigDecimal( columnIndex ); }",
" else if ( Boolean.class.equals( type ) ) { retval = Boolean.valueOf( getBoolean(columnIndex ) ); }",
" else if ( Byte.class.equals( type ) ) { retval = Byte.valueOf( getByte( columnIndex ) ); }",
" else if ( Short.class.equals( type ) ) { retval = Short.valueOf( getShort( columnIndex ) ); }",
" else if ( Integer.class.equals( type ) ) { retval = Integer.valueOf( getInt( columnIndex ) ); }",
" else if ( Long.class.equals( type ) ) { retval = Long.valueOf( getLong( columnIndex ) ); }",
" else if ( Float.class.equals( type ) ) { retval = Float.valueOf( getFloat( columnIndex ) ); }",
" else if ( Double.class.equals( type ) ) { retval = Double.valueOf( getDouble( columnIndex ) ); }",
" else if ( Date.class.equals( type ) ) { retval = getDate( columnIndex ); }",
" else if ( Time.class.equals( type ) ) { retval = getTime( columnIndex ); }",
" else if ( Timestamp.class.equals( type ) ) { retval = getTimestamp( columnIndex ); }",
" else if ( Blob.class.equals( type ) ) { retval = getBlob( columnIndex ); }",
" else if ( Clob.class.equals( type ) ) { retval = getClob( columnIndex ); }",
" else if ( type.isArray() && type.getComponentType().equals( byte.class ) ) { retval = getBytes( columnIndex ); }",
" else",
" {",
" retval = type.cast( getObject( columnIndex ) );",
" }",
" if ( wasNull() ) { retval = null; }",
" return type.cast( retval );",
" }",
" catch (ClassCastException e) {}"
]
}
]
}
] |
derby-DERBY-4869-5cb4c04d
|
DERBY-4869: Hook up implicitly closed ResultSets to the Statement.closeOnCompletion() logic.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1066127 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/ResultSet.java",
"hunks": [
{
"added": [
" ",
" nullDataForGC();",
" }",
" /** Close Statement if it is set to closeOnCompletion */",
" private void closeStatementOnCompletion()",
" {"
],
"header": "@@ -460,12 +460,16 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": [
"",
" nullDataForGC();"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" closeEverythingExceptResultSets( removeListener );",
" }",
"",
" /**",
" * Close all resources except for ResultSets. This code was factored out",
" * of markClosed() so that closeMeOnCompletion() could close the",
" * Statement without having to re-close the already closed ResultSets.",
" */",
" private void closeEverythingExceptResultSets( boolean removeListener )",
" {"
],
"header": "@@ -1892,6 +1892,16 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [
"\t\t\t\tmarkClosed();",
" /**",
" * Mark this ResultSet as closed and trigger the closing of the Statement",
" * if necessary.",
" */",
" private void markClosed()",
" {",
" if ( isClosed ) { return; }",
" ",
" isClosed = true;",
"",
" // to prevent infinite looping, tell our parent Statement",
" // that we have closed AFTER",
" // we have marked ourself as closed",
" if ( stmt != null) { stmt.closeMeOnCompletion(); }",
" if ( (owningStmt != null) && (owningStmt != stmt) ) { owningStmt.closeMeOnCompletion(); }",
" }",
""
],
"header": "@@ -615,25 +615,36 @@ public abstract class EmbedResultSet extends ConnectionChild",
"removed": [
"\t\t\t\tisClosed = true;",
" // to prevent infinite looping, tell our parent Statement",
" // that we have closed AFTER",
" // we have marked ourself as closed",
" if ( stmt != null) { stmt.closeMeOnCompletion(); }",
" if ( (owningStmt != null) && (owningStmt != stmt) ) { owningStmt.closeMeOnCompletion(); }",
" "
]
},
{
"added": [
" markClosed();"
],
"header": "@@ -4325,7 +4336,7 @@ public abstract class EmbedResultSet extends ConnectionChild",
"removed": [
"\t\t\t\tisClosed = true;"
]
}
]
}
] |
derby-DERBY-4869-62a70825
|
DERBY-4869: Make AutoloadTest aware of the new driver classes introduced by the getParentLogger() work.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1068524 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-6e97c842
|
DERBY-4869: JDBC 4.1 spec clarification that addBatch(String) should fail on prepared and callable statements.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1051890 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-71e32dc4
|
DERBY-4869: Hide some behavior in the physical connections which we don't want to be visible to applications.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1060535 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
" implements java.sql.Connection, ConnectionCallbackInterface"
],
"header": "@@ -30,7 +30,7 @@ import org.apache.derby.client.net.NetXAResource;",
"removed": [
" implements java.sql.Connection, ConnectionCallbackInterface, Runnable"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [
"public abstract class EmbedConnection implements EngineConnection",
"\tprotected static final StandardException exceptionClose = StandardException.closeException();"
],
"header": "@@ -115,10 +115,10 @@ import org.apache.derby.impl.jdbc.authentication.NoneAuthenticationServiceImpl;",
"removed": [
"public abstract class EmbedConnection implements EngineConnection, Runnable",
"\tprivate static final StandardException exceptionClose = StandardException.closeException();"
]
},
{
"added": [
" protected void close(StandardException e) throws SQLException {"
],
"header": "@@ -1891,7 +1891,7 @@ public abstract class EmbedConnection implements EngineConnection, Runnable",
"removed": [
" private void close(StandardException e) throws SQLException {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java",
"hunks": [
{
"added": [
" // Now pass the Executor a Runnable which does the real work.",
" executor.execute",
" (",
" new Runnable()",
" {",
" public void run()",
" {",
" try {",
" rollback();",
" close(exceptionClose);",
" } catch (SQLException se) { Util.logSQLException( se ); }",
" }",
" }",
" );"
],
"header": "@@ -301,10 +301,21 @@ public class EmbedConnection40 extends EmbedConnection30 {",
"removed": [
" // The run() method in EmbedConnection does the",
" // actual releasing of resources.",
" executor.execute( this );"
]
}
]
}
] |
derby-DERBY-4869-795f705e
|
DERBY-4869: Implementation of Connection.abort(Executor) for JDBC 4.1.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1060422 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
"public abstract class Connection",
" implements java.sql.Connection, ConnectionCallbackInterface, Runnable",
"{"
],
"header": "@@ -29,8 +29,9 @@ import java.sql.SQLException;",
"removed": [
"public abstract class Connection implements java.sql.Connection,",
" ConnectionCallbackInterface {"
]
},
{
"added": [
" private boolean aborting_ = false;"
],
"header": "@@ -92,6 +93,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": []
},
{
"added": [
" if ( !isAborting() ) { checkForClosedConnection(); }"
],
"header": "@@ -646,7 +648,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" checkForClosedConnection();"
]
},
{
"added": [
" if (!open_ && !isAborting()) {"
],
"header": "@@ -740,7 +742,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" if (!open_) {"
]
},
{
"added": [
""
],
"header": "@@ -756,6 +758,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": []
},
{
"added": [
" aborting_ = false;"
],
"header": "@@ -793,6 +796,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/LogicalConnection40.java",
"hunks": [
{
"added": [
"import java.util.concurrent.Executor;",
"import org.apache.derby.client.net.NetConnection40;"
],
"header": "@@ -30,8 +30,10 @@ import java.sql.SQLXML;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetConnection40.java",
"hunks": [
{
"added": [
"import java.sql.SQLPermission;",
"import java.util.concurrent.Executor;"
],
"header": "@@ -32,12 +32,14 @@ import java.sql.PreparedStatement;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java",
"hunks": [
{
"added": [
"import java.util.concurrent.Executor;",
"import org.apache.derby.impl.jdbc.EmbedConnection40;"
],
"header": "@@ -31,9 +31,11 @@ import java.sql.SQLException;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [
"public abstract class EmbedConnection implements EngineConnection, Runnable"
],
"header": "@@ -115,7 +115,7 @@ import org.apache.derby.impl.jdbc.authentication.NoneAuthenticationServiceImpl;",
"removed": [
"public abstract class EmbedConnection implements EngineConnection"
]
},
{
"added": [
" private boolean aborting = false;"
],
"header": "@@ -165,6 +165,7 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": []
},
{
"added": [
"\t\t\t\tif (active || isAborting()) {"
],
"header": "@@ -1899,7 +1900,7 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": [
"\t\t\t\tif (active) {"
]
},
{
"added": [
" aborting = false;",
" "
],
"header": "@@ -1933,6 +1934,8 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": []
},
{
"added": [
"\t\t\tSanityManager.ASSERT(!isClosed() || isAborting(), \"connection is closed\");"
],
"header": "@@ -2247,7 +2250,7 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": [
"\t\t\tSanityManager.ASSERT(!isClosed(), \"connection is closed\");"
]
},
{
"added": [
"\t\tif ( !isAborting()) { checkIfClosed(); }"
],
"header": "@@ -2472,7 +2475,7 @@ public abstract class EmbedConnection implements EngineConnection",
"removed": [
"\t\tcheckIfClosed();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java",
"hunks": [
{
"added": [
"import java.sql.SQLPermission;",
"import java.util.concurrent.Executor;"
],
"header": "@@ -28,12 +28,14 @@ import java.sql.Clob;",
"removed": []
}
]
}
] |
derby-DERBY-4869-7f1559df
|
DERBY-4869: Check in a test case verifying a JDBC 4.1 spec clarification: an exception should be raised if a PreparedStatement or CallableStatement is used to compile SQL text.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1062822 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-81ee7008
|
DERBY-4869: Add JDBC 4.1 changes to DatabaseMetaData.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1064868 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-821bc130
|
DERBY-4869: Wire network ResultSet for generated keys into the machinery for Statement.closeOnCompletion().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1061977 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/ResultSet.java",
"hunks": [
{
"added": [
" Statement outerStatement_; // for auto-generated keys"
],
"header": "@@ -39,6 +39,7 @@ public abstract class ResultSet implements java.sql.ResultSet,",
"removed": []
}
]
}
] |
derby-DERBY-4869-91a8a211
|
DERBY-4869: Fixed compiler warnings and removed unnecessary try/catch in test case for getTypeMap()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1083628 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-9c8b7175
|
DERBY-4869: Uncomment the signature-matching tests on Java 7 now that all of the JDBC 4.1 methods have been added.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1068489 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-b451cabe
|
DERBY-4869: Second attempt to remove the instability in StatementTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1069070 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-d79f538e
|
DERBY-4869: Add xa and pooled connections to the tests of Connection.abort() with and without a SecurityManager.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1060570 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-dd7903b0
|
DERBY-4869: Disable signature checking tests on platforms that support JDBC 4.1
These tests will fail until the new JDBC 4.1 methods have been
implemented, so silence them for now.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1035164 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
" /**",
" * Does java.sql.ResultSet implement java.lang.AutoCloseable?",
" * Indicates JDBC 4.1.",
" */",
" private static final boolean HAVE_AUTO_CLOSEABLE_RESULT_SET;",
" static {",
" boolean autoCloseable;",
" try {",
" Class acClass = Class.forName(\"java.lang.AutoCloseable\");",
" autoCloseable = acClass.isAssignableFrom(ResultSet.class);",
" } catch (Throwable t) {",
" autoCloseable = false;",
" }",
" HAVE_AUTO_CLOSEABLE_RESULT_SET = autoCloseable;",
" }",
""
],
"header": "@@ -120,6 +120,22 @@ public class JDBC {",
"removed": []
},
{
"added": [
"",
" /**",
" * Return true if the virtual machine environment supports JDBC 4.1 or",
" * later. JDBC 4.1 is a superset of JDBC 4.0 and of JSR-169.",
" */",
" public static boolean vmSupportsJDBC41() {",
" return vmSupportsJDBC4() && HAVE_AUTO_CLOSEABLE_RESULT_SET;",
" }",
""
],
"header": "@@ -134,6 +150,15 @@ public class JDBC {",
"removed": []
}
]
}
] |
derby-DERBY-4869-de8ba180
|
DERBY-4869: Implement Statement.closeOnCompletion(), new in JDBC 4.1.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1061824 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/LogicalStatementEntity.java",
"hunks": [
{
"added": [
" /**",
" * Returns the associated physical statement.",
" *",
" * @return A statement.",
" * @throws SQLException if the logical statement has been closed",
" */",
" synchronized java.sql.Statement getPhysStmt()",
" throws SQLException",
" {",
" if ( hasCallableStmt ) { return getPhysCs(); }",
" else { return getPhysPs(); }",
" }",
""
],
"header": "@@ -146,6 +146,19 @@ abstract class LogicalStatementEntity",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" private boolean closeOnCompletion_ = false;",
" private boolean closingResultSets_ = false;",
" "
],
"header": "@@ -198,6 +198,9 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": []
},
{
"added": [
" final void markResultSetsClosed(boolean removeListener)",
" {",
" try {",
" //",
" // This prevents us from accidentally closing ourself as part",
" // of cleaning up the previous operation. This flag short-circuits the logic which enforces",
" // closeOnCompletion().",
" //",
" closingResultSets_ = true;",
" ",
" if (resultSetList_ != null) {",
" for (int i = 0; i < resultSetList_.length; i++) {",
" if (resultSetList_[i] != null) {",
" resultSetList_[i].markClosed(removeListener);",
" }",
" resultSetList_[i] = null;",
" if (generatedKeysResultSet_ != null) {",
" generatedKeysResultSet_.markClosed(removeListener);",
" }",
" if (resultSet_ != null) {",
" resultSet_.markClosed(removeListener);",
" }",
" resultSet_ = null;",
" resultSetList_ = null;",
" generatedKeysResultSet_ = null;",
" finally { closingResultSets_ = false; }"
],
"header": "@@ -1936,24 +1939,35 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" final void markResultSetsClosed(boolean removeListener) {",
" if (resultSetList_ != null) {",
" for (int i = 0; i < resultSetList_.length; i++) {",
" if (resultSetList_[i] != null) {",
" resultSetList_[i].markClosed(removeListener);",
" resultSetList_[i] = null;",
" if (generatedKeysResultSet_ != null) {",
" generatedKeysResultSet_.markClosed(removeListener);",
" }",
" if (resultSet_ != null) {",
" resultSet_.markClosed(removeListener);",
" }",
" resultSet_ = null;",
" resultSetList_ = null;",
" generatedKeysResultSet_ = null;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java",
"hunks": [
{
"added": [
" private boolean closeOnCompletion = false;",
" private boolean closingResultSets = false;",
" "
],
"header": "@@ -117,6 +117,9 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
},
{
"added": [
"\t\t // first, clear the result sets."
],
"header": "@@ -309,7 +312,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t\t //first, clear the resutl set"
]
},
{
"added": [
" closeMeOnCompletion();"
],
"header": "@@ -1064,6 +1067,7 @@ public class EmbedStatement extends ConnectionChild",
"removed": []
},
{
"added": [
"\tvoid clearResultSets() throws SQLException",
" {",
" //",
" // Try not to let closeDependentResultSet() close this Statement",
" // when we are just cleaning up before the next operation.",
" //",
" try {",
" closingResultSets = true;",
" clearResultSetsMinion();",
" }",
" finally { closingResultSets = false; }",
" }",
" // don't call this directly. call clearResultSets() instead.",
" private void clearResultSetsMinion() throws SQLException",
" {"
],
"header": "@@ -1440,8 +1444,22 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\tvoid clearResultSets() throws SQLException {"
]
}
]
}
] |
derby-DERBY-4869-e3fb83e8
|
DERBY-4869: Don't intercept all SQLExceptions in NetResultSet40.getObject(int,Class).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1052271 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/NetResultSet40.java",
"hunks": [
{
"added": [
" throw mismatchException( \"NULL\", columnIndex );"
],
"header": "@@ -275,11 +275,9 @@ public class NetResultSet40 extends NetResultSet{",
"removed": [
" throw mismatchException( \"NULL\", columnIndex, null );",
" Exception ex = null;",
" "
]
},
{
"added": [
" catch (ClassCastException e) {}",
" throw mismatchException( type.getName(), columnIndex );",
" private SQLException mismatchException( String targetTypeName, int columnIndex )",
" SqlException se = new SqlException( agent_.logWriter_, cmi, targetTypeName, sourceTypeName );"
],
"header": "@@ -301,16 +299,16 @@ public class NetResultSet40 extends NetResultSet{",
"removed": [
" catch (Exception e) { ex = e; }",
" throw mismatchException( type.getName(), columnIndex, ex );",
" private SQLException mismatchException( String targetTypeName, int columnIndex, Throwable t )",
" SqlException se = new SqlException( agent_.logWriter_, cmi, targetTypeName, sourceTypeName, t );"
]
}
]
}
] |
derby-DERBY-4869-e749e124
|
DERBY-4869: Add exception-raising stubs for Connection.get/setNetworkTimeout(), new methods introduced by JDBC 4.1.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1063822 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4869-f8cb3d70
|
DERBY-4869: Add tests for abort() on pooled and xa connections, and fix some bugs in the forwarding of the abort() call.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1060557 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
" public final String getPassword(String user)"
],
"header": "@@ -1888,7 +1888,7 @@ public final class TestConfiguration {",
"removed": [
" final String getPassword(String user)"
]
}
]
}
] |
derby-DERBY-4874-374d58fe
|
DERBY-6383(Update trigger defined on one column fires on update of other columns).
This regression is caused by DERBY-4874(Trigger does not recognize new size of VARCHAR column expanded with ALTER TABLE. It fails with ERROR 22001: A truncation error was
encountered trying to shrink VARCHAR)
The regression is for Statement level triggers. The statement trigger gets fired incorrectly for any column update rather than just the column specified in the UPDATE of column clause. The fix is going to ensure that SYSTRIGGERS has the correct list of columns on which trigger should be fired. Row level triggers work fine. The only workaround at this point is to drop and recreate the statement triggers.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1537593 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java",
"hunks": [
{
"added": [
"\t\t\t//then it means that a set of trigger columns are specified",
"\t\t\t//in the CREATE TRIGGER statement. This can only happen for",
"\t\t\t//an UPDATE trigger."
],
"header": "@@ -538,10 +538,9 @@ class CreateTriggerNode extends DDLStatementNode",
"removed": [
"\t\t\t//then it means that the trigger is defined at the row level",
"\t\t\t//and a set of trigger columns are specified in the CREATE",
"\t\t\t//TRIGGER statement. This can only happen for an UPDATE",
"\t\t\t//trigger."
]
}
]
}
] |
derby-DERBY-4874-50734d82
|
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements
Make the code in TriggerDescriptor.getActionSPS() reusable for
TriggerDescriptor.getWhenClauseSPS() so that the fixes for DERBY-4874
and Cloudscape bug 4821 also get applied to the WHEN clause.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1531226 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java",
"hunks": [
{
"added": [
" return getSPS(lcc, false /* isWhenClause */);",
" }",
"",
" /**",
" * Get the SPS for the triggered SQL statement or the WHEN clause.",
" *",
" * @param lcc the LanguageConnectionContext to use",
" * @param isWhenClause {@code true} if the SPS for the WHEN clause is",
" * requested, {@code false} if it is the triggered SQL statement",
" * @return the requested SPS",
" * @throws StandardException if an error occurs",
" */",
" private SPSDescriptor getSPS(LanguageConnectionContext lcc,",
" boolean isWhenClause)",
" throws StandardException",
" {",
" DataDictionary dd = getDataDictionary();",
" SPSDescriptor sps = isWhenClause ? whenSPS : actionSPS;",
" UUID spsId = isWhenClause ? whenSPSId : actionSPSId;",
" String originalSQL = isWhenClause ? whenClauseText : triggerDefinition;",
"",
" if (sps == null) {",
" sps = dd.getSPSDescriptor(spsId);",
""
],
"header": "@@ -333,18 +333,38 @@ public class TriggerDescriptor extends UniqueSQLObjectDescriptor",
"removed": [
"\t\tif (actionSPS == null)",
"\t\t{",
"\t\t\tactionSPS = getDataDictionary().getSPSDescriptor(actionSPSId);",
"\t\t"
]
},
{
"added": [
" if ((!sps.isValid() ||",
" (sps.getPreparedStatement() == null)) &&",
" dd.getSchemaDescriptor(sps.getCompSchemaId(), null));",
" Visitable stmtnode =",
" isWhenClause ? pa.parseSearchCondition(originalSQL)",
" : pa.parseStatement(originalSQL);",
"",
" String newText = dd.getTriggerActionString(stmtnode,",
" originalSQL,",
" false);",
"",
" if (isWhenClause) {",
" // The WHEN clause is not a full SQL statement, just a search",
" // condition, so we need to turn it into a statement in order",
" // to create an SPS.",
" newText = \"VALUES \" + newText;",
" }",
"",
" sps.setText(newText);",
"",
"",
" return sps;"
],
"header": "@@ -363,39 +383,49 @@ public class TriggerDescriptor extends UniqueSQLObjectDescriptor",
"removed": [
"\t\tDataDictionary dd = getDataDictionary();",
"\t\tif((!actionSPS.isValid() ||",
"\t\t\t\t (actionSPS.getPreparedStatement() == null)) && ",
" dd.getSchemaDescriptor(actionSPS.getCompSchemaId(), null));",
"\t\t\tVisitable stmtnode = pa.parseStatement(triggerDefinition);",
"\t\t\t\t\t",
" actionSPS.setText(dd.getTriggerActionString(stmtnode,",
"\t\t\t\t\ttriggerDefinition,",
"\t\t\t\t\tfalse",
"\t\t\t\t\t));",
"\t\t",
"\t\treturn actionSPS;"
]
}
]
}
] |
derby-DERBY-4874-995d3ac9
|
DERBY-4874: TriggerTests should report why it cannot drop table
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1057542 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4877-0f26c836
|
DERBY-4877: Unchecked warnings in jdbc4 test suite
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1029453 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4881-a6695094
|
DERBY-4881: Deadlock accessing SYS.SYSSTATISTICS
Read table statistics from the system table using READ_UNCOMMITTED to avoid
deadlocks with transactions inserting new statistics entries.
Modified getDescriptorViaIndexMinon to allow returning multiple tuple
descriptors also when isolation level is READ_UNCOMMITTED.
Removed one overload of getDescriptorViaIndex (cleanup).
Patch file: derby-4881-1b-deadlock_fix.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1030043 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
" TransactionController.ISOLATION_REPEATABLE_READ,"
],
"header": "@@ -1655,6 +1655,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" /**",
" * Returns all the statistics descriptors for the given table.",
" * <p>",
" * NOTE: As opposed to most other data dictionary lookups, this operation is",
" * performed with isolation level READ_UNCOMMITTED. The reason is to avoid",
" * deadlocks with inserts into the statistics system table.",
" *",
" * @param td {@code TableDescriptor} for which I need statistics",
" * @return A list of tuple descriptors, possibly empty.",
" */"
],
"header": "@@ -4926,9 +4927,16 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t/** get all the statistiscs descriptors for a given table.",
"\t * @param td\tTable Descriptor for which I need statistics",
"\t */"
]
},
{
"added": [
"",
" keyRow,",
" (ScanQualifier [][])null,",
" ti,",
" (TupleDescriptor)null,",
" statDescriptorList,",
" false,",
" TransactionController.ISOLATION_READ_UNCOMMITTED,",
" getTransactionCompile());"
],
"header": "@@ -4940,13 +4948,16 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t",
"\t\t\t\t\t\t\t keyRow,",
"\t\t\t\t\t\t\t (ScanQualifier [][])null,",
"\t\t\t\t\t\t\t ti, ",
"\t\t\t\t\t\t\t (TupleDescriptor)null,",
"\t\t\t\t\t\t\t statDescriptorList, false);"
]
},
{
"added": [
" return getDescriptorViaIndexMinion(",
" indexId,",
" keyRow,",
" scanQualifiers,",
" ti,",
" parentTupleDescriptor,",
" list,",
" forUpdate,",
" TransactionController.ISOLATION_REPEATABLE_READ,",
" tc);"
],
"header": "@@ -8455,63 +8466,16 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn getDescriptorViaIndexMinion(",
"\t\t\tindexId,",
"\t\t\tkeyRow,",
"\t\t\tscanQualifiers,",
"\t\t\tti,",
"\t\t\tparentTupleDescriptor,",
"\t\t\tlist,",
"\t\t\tforUpdate,",
"\t\t\tTransactionController.ISOLATION_REPEATABLE_READ,",
"\t\t\ttc);",
"\t}",
"",
"\t/**",
"\t * Return a (single or list of) catalog row descriptor(s) from a",
"\t * system table where the access is from the index to the heap.",
"\t *",
"\t * This overload variant takes an explicit tc, in contrast to the normal",
"\t * one which uses the one returned by getTransactionCompile.",
"\t *",
"\t * @param indexId\tThe id of the index (0 to # of indexes on table) to use",
"\t * @param keyRow\tThe supplied ExecIndexRow for search",
"\t * @param ti\t\tThe TabInfoImpl to use",
"\t * @param parentTupleDescriptor\t\tThe parentDescriptor, if applicable.",
"\t * @param list The list to build, if supplied. If null, then",
"\t *\t\t\t\t\tcaller expects a single descriptor",
"\t * @param forUpdate\tWhether or not to open the index for update.",
"\t * @param tc Transaction controller",
"\t *",
"\t * @return\tThe last matching descriptor",
"\t *",
"\t * @exception StandardException\t\tThrown on error",
"\t */",
"\tprivate final TupleDescriptor getDescriptorViaIndex(",
"\t\t\t\t\t\tint indexId,",
"\t\t\t\t\t\tExecIndexRow keyRow,",
"\t\t\t\t\t\tScanQualifier [][] scanQualifiers,",
"\t\t\t\t\t\tTabInfoImpl ti,",
"\t\t\t\t\t\tTupleDescriptor parentTupleDescriptor,",
"\t\t\t\t\t\tList list,",
"\t\t\t\t\t\tboolean forUpdate,",
"\t\t\t\t\t\tTransactionController tc)",
"\t\t\tthrows StandardException",
"\t{",
"\t\tif (tc == null) {",
"\t\t\ttc = getTransactionCompile();",
"\t\t}",
"",
"\t\treturn getDescriptorViaIndexMinion(",
"\t\t\tindexId,",
"\t\t\tkeyRow,",
"\t\t\tscanQualifiers,",
"\t\t\tti,",
"\t\t\tparentTupleDescriptor,",
"\t\t\tlist,",
"\t\t\tforUpdate,",
"\t\t\tTransactionController.ISOLATION_REPEATABLE_READ,",
"\t\t\ttc);"
]
},
{
"added": [],
"header": "@@ -8585,7 +8549,6 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tExecIndexRow\t\t\tindexTemplateRow;"
]
},
{
"added": [],
"header": "@@ -8597,13 +8560,6 @@ public final class\tDataDictionaryImpl",
"removed": [
"",
"\t\t\tif (isolationLevel ==",
"\t\t\t\t TransactionController.ISOLATION_READ_UNCOMMITTED) {",
"\t\t\t\t// list not used for this case",
"\t\t\t\tSanityManager.ASSERT(list == null);",
"\t\t\t}",
""
]
},
{
"added": [
"\t\t\t\t// cf. DERBY-3678, and by getStatisticsDescriptors,",
" // cf. DERBY-4881.",
" //",
" // For the former call, a table's schema descriptor is attempted"
],
"header": "@@ -8716,7 +8672,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t// cf. DERBY-3678. A table's schema descriptor is attempted"
]
},
{
"added": [
"\t\t\telse if (td != null)"
],
"header": "@@ -8752,7 +8711,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\telse"
]
},
{
"added": [],
"header": "@@ -9440,7 +9399,6 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tExecRow row;"
]
},
{
"added": [
" getDescriptorViaIndex"
],
"header": "@@ -9448,7 +9406,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" getDescriptorViaIndexMinion"
]
}
]
}
] |
derby-DERBY-4884-5c61b1d4
|
DERBY-4884 (partial) DatabasePropertyTestSetup cannot change static
properties in encrypted databases
Changed the decorator for encrypted databases to make the connection
attributes available in the code that opens a default connection. This
makes it possible to reboot an encrypted database with the helper
methods in the framework, which is what DatabasePropertyTestSetup
needs in order to change static properties.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1032485 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/Decorator.java",
"hunks": [
{
"added": [
"import java.util.Properties;"
],
"header": "@@ -20,11 +20,9 @@",
"removed": [
"import java.sql.SQLException;",
"import javax.sql.DataSource;",
""
]
},
{
"added": [
" * using encryption as a general test and"
],
"header": "@@ -43,7 +41,7 @@ public class Decorator {",
"removed": [
" * using encrpyption as a general test and"
]
},
{
"added": [],
"header": "@@ -53,8 +51,6 @@ public class Decorator {",
"removed": [
" * <BR>",
" * The database is created during the setUp of the decorator."
]
},
{
"added": [
"",
" Properties attributes = new Properties();",
" attributes.setProperty(\"dataEncryption\", \"true\");",
" attributes.setProperty(\"bootPassword\", getBootPhrase(16));",
"",
" return attributesDatabase(attributes, test);",
" * using encryption as a general test and"
],
"header": "@@ -63,36 +59,18 @@ public class Decorator {",
"removed": [
" ",
" test = new BaseTestSetup(test) {",
" ",
" /**",
" * Create an encrypted database using a",
" * JDBC data source.",
" */",
" protected void setUp() throws SQLException",
" {",
" String bootPhrase = getBootPhrase(16);",
"",
" DataSource ds = JDBCDataSource.getDataSource();",
" ",
" JDBCDataSource.setBeanProperty(ds,",
" \"createDatabase\", \"create\");",
" JDBCDataSource.setBeanProperty(ds,",
" \"connectionAttributes\",",
" \"dataEncryption=true;bootPassword=\" + bootPhrase);",
" ",
" ds.getConnection().close();",
" }",
" };",
" ",
" return TestConfiguration.singleUseDatabaseDecorator(test);",
" * using encrpyption as a general test and"
]
},
{
"added": [
" Properties attributes = new Properties();",
" attributes.setProperty(\"dataEncryption\", \"true\");",
" attributes.setProperty(\"bootPassword\", getBootPhrase(64));",
" attributes.setProperty(\"encryptionAlgorithm\", algorithm);"
],
"header": "@@ -102,23 +80,18 @@ public class Decorator {",
"removed": [
" * <BR>",
" * The database is created during the setUp of the decorator.",
"",
" String bootPhrase = getBootPhrase(64);",
" ",
" String attributes =",
" \"dataEncryption=true;bootPassword=\" + bootPhrase +",
" \";encryptionAlgorithm=\" + algorithm;",
" "
]
},
{
"added": [
" * set to the passed in locale.",
" Properties attributes = new Properties();",
" attributes.setProperty(\"collation\", \"TERRITORY_BASED\");",
" attributes.setProperty(\"territory\", locale);"
],
"header": "@@ -140,18 +113,17 @@ public class Decorator {",
"removed": [
" * set to the passed in locale. Database is created",
" * by the setUp method of the decorator.",
" ",
" String attributes = \"collation=TERRITORY_BASED\";",
" attributes = attributes.concat(\";territory=\" + locale);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/DriverManagerConnector.java",
"hunks": [
{
"added": [
" Properties connectionAttributes =",
" new Properties(config.getConnectionAttributes());",
" connectionAttributes.setProperty(\"user\", user);",
" connectionAttributes.setProperty(\"password\", password);",
"",
" return DriverManager.getConnection(url, connectionAttributes);"
],
"header": "@@ -72,8 +72,13 @@ public class DriverManagerConnector implements Connector {",
"removed": [
" return DriverManager.getConnection(url, user, password);"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
"import java.util.Enumeration;"
],
"header": "@@ -28,6 +28,7 @@ import java.sql.Connection;",
"removed": []
},
{
"added": [
" this.connectionAttributes = new Properties(copy.connectionAttributes);"
],
"header": "@@ -1037,6 +1038,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" this.connectionAttributes = new Properties(copy.connectionAttributes);"
],
"header": "@@ -1060,6 +1062,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" this.connectionAttributes = new Properties(copy.connectionAttributes);"
],
"header": "@@ -1087,6 +1090,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" this.connectionAttributes = new Properties(copy.connectionAttributes);"
],
"header": "@@ -1123,6 +1127,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" this.connectionAttributes = new Properties(copy.connectionAttributes);"
],
"header": "@@ -1186,6 +1191,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" /**",
" * Create a copy of this configuration with some additional connection",
" * attributes.",
" *",
" * @param attrs the extra connection attributes",
" * @return a copy of the configuration with extra attributes",
" */",
" TestConfiguration addConnectionAttributes(Properties attrs) {",
" TestConfiguration copy = new TestConfiguration(this);",
" Enumeration e = attrs.propertyNames();",
" while (e.hasMoreElements()) {",
" String key = (String) e.nextElement();",
" String val = attrs.getProperty(key);",
" copy.connectionAttributes.setProperty(key, val);",
" }",
" copy.initConnector(connector);",
" return copy;",
" }",
""
],
"header": "@@ -1238,6 +1244,25 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>",
" *",
" * <p>",
" * The returned URL does not include the connection attributes. These must",
" * either be appended to the URL when connecting, or they must be passed",
" * as a {@code Properties} object to {@code DriverManager.getConnection()}.",
" * </p>"
],
"header": "@@ -1321,7 +1346,15 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" /**",
" * Return the JDBC URL for connecting to the default database, including",
" * any connection attributes.",
" *",
" * @return JDBC URL with connection attributes",
" */",
" public String getJDBCUrlWithAttributes() {",
" String attrs = getConnectionAttributesString();",
" if (attrs == null) {",
" return url;",
" } else {",
" return url + ';' + attrs;",
" }",
" }",
""
],
"header": "@@ -1329,6 +1362,21 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" /**",
" * Return the connection attributes to use in this configuration. The",
" * attributes won't contain user name or password. Use",
" * {@link #getUserName()} or {@link #getUserPassword()} instead to",
" * retrieve those attributes.",
" *",
" * @return connection attributes (can be {@code null})",
" */",
" Properties getConnectionAttributes() {",
" return connectionAttributes;",
" }",
"",
" /**",
" * Get a flat string representation of the connection attributes. To",
" * be used in the connectionAttributes property of a data source.",
" *",
" * @return all connection attributes concatenated ({@code null} if there",
" * are no attributes)",
" */",
" String getConnectionAttributesString() {",
" if (connectionAttributes == null) {",
" return null;",
" }",
"",
" StringBuffer sb = new StringBuffer();",
" Enumeration e = connectionAttributes.propertyNames();",
" boolean first = true;",
" while (e.hasMoreElements()) {",
" if (!first) {",
" sb.append(';');",
" }",
" String key = (String) e.nextElement();",
" sb.append(key);",
" sb.append('=');",
" sb.append(connectionAttributes.getProperty(key));",
" first = false;",
" }",
"",
" if (first) {",
" // No connection attributes.",
" return null;",
" }",
"",
" return sb.toString();",
" }",
""
],
"header": "@@ -1376,6 +1424,52 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
"",
" /**",
" * Extra connection attributes. Not for user name and password, use the",
" * fields {@link #userName} and {@link #userPassword} for those attributes.",
" */",
" private Properties connectionAttributes;",
""
],
"header": "@@ -1743,7 +1837,13 @@ public final class TestConfiguration {",
"removed": [
" "
]
}
]
}
] |
derby-DERBY-4884-b5d1d676
|
DERBY-4884 (partial) DatabasePropertyTestSetup cannot change static properties in encrypted databases
Make DeadlockModeTest and BlobClob4BlobTest propagate timeout settings
to the encrypted database. Also make DeadlockModeTest actually use the
encrypted database when running within the encryption decorator.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1032907 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4888-d4ebb499
|
DERBY-4888: ClassCastException when calling boolean meta-data functions with 10.7 client against 10.6 server
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1031973 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4890-e39aac27
|
DERBY-4890: Add BOOLEAN to the list of types supported by the setString() methods.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1032780 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4891-e19280a9
|
DERBY-4891: Enable testing of boolean type in ParameterMappingTest
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1032482 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4893-38b9499e
|
DERBY-4893: Allow Java 5 language constructs in build code
- Changed source and target level for the build code to 1.5
- Changed some variable declarations to silence "unchecked" warnings
emitted by the compiler after the change
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1032479 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/build/org/apache/derbyBuild/ClassSizeCrawler.java",
"hunks": [
{
"added": [
" Hashtable<String, int[]> classSizes = new Hashtable<String, int[]>();"
],
"header": "@@ -133,7 +133,7 @@ public class ClassSizeCrawler",
"removed": [
" Hashtable classSizes = new Hashtable();"
]
},
{
"added": [
" private Class<?>[] interfaceList; // Search for classes that implement these interfaces",
" private Hashtable<String, int[]> classSizes;",
" Hashtable<String, int[]> classSizes)"
],
"header": "@@ -225,14 +225,14 @@ public class ClassSizeCrawler",
"removed": [
" private Class[] interfaceList; // Search for classes that implement these interfaces",
" private Hashtable classSizes;",
" Hashtable classSizes)"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/JiraIssue.java",
"hunks": [
{
"added": [
" ArrayList<JiraIssue> jiraIssues = new ArrayList<JiraIssue>();"
],
"header": "@@ -70,7 +70,7 @@ class JiraIssue {",
"removed": [
" ArrayList jiraIssues = new ArrayList();"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/MessageBuilder.java",
"hunks": [
{
"added": [
" private ArrayList<String> _tagStack;"
],
"header": "@@ -138,7 +138,7 @@ public class MessageBuilder extends Task",
"removed": [
" private ArrayList _tagStack;"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java",
"hunks": [
{
"added": [
"/**"
],
"header": "@@ -33,7 +33,7 @@ import java.util.ArrayList;",
"removed": [
"/* ****"
]
},
{
"added": [
"\tprivate HashMap<String, Byte> changeMap;"
],
"header": "@@ -124,7 +124,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\tprivate HashMap changeMap;"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -139,7 +139,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -177,7 +177,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t\tchangeMap = new HashMap<String, Byte>();"
],
"header": "@@ -192,7 +192,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t\tchangeMap = new HashMap();"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -235,7 +235,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -317,7 +317,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t\tArrayList<String> colDefs = new ArrayList<String>();"
],
"header": "@@ -376,7 +376,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t\tArrayList colDefs = new ArrayList();"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -447,7 +447,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -491,7 +491,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [],
"header": "@@ -502,8 +502,6 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @return Occurence of <\"AS \" + oldVal> in the query text",
"\t *\thas been changed IN PLACE to newVal."
]
},
{
"added": [
"\t/**"
],
"header": "@@ -542,7 +540,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t * On return, an outer SELECT clause has been generated and"
],
"header": "@@ -563,7 +561,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @return An outer SELECT clause has been generated and"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -639,7 +637,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [],
"header": "@@ -649,8 +647,6 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @return All relevant columns have been updated IN PLACE",
"\t *\tto return the required ODBC-compliant values."
]
},
{
"added": [
"\t/**"
],
"header": "@@ -688,7 +684,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [],
"header": "@@ -696,8 +692,6 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @return The received column has been updated IN PLACE",
"\t *\tto return the required ODBC-compliant value."
]
},
{
"added": [
"\t/**"
],
"header": "@@ -755,7 +749,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t * @param queryText The query from which we are extracting"
],
"header": "@@ -763,7 +757,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @param query The query from which we are extracting"
]
},
{
"added": [
"\t\tArrayList<String> colDefList)"
],
"header": "@@ -774,7 +768,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t\tArrayList colDefList)"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -838,7 +832,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -889,7 +883,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -940,7 +934,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1008,7 +1002,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t * On return, a dummy column name has been added to"
],
"header": "@@ -1020,7 +1014,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @return A dummy column name has been added to"
]
},
{
"added": [
"\t\tArrayList<String> selectColDefs)"
],
"header": "@@ -1028,7 +1022,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t\tArrayList selectColDefs)"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1048,7 +1042,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t * @param newQueryText The buffer in which we want to",
"\t * On return, the dummy placeholder in the received"
],
"header": "@@ -1059,9 +1053,9 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t * @newQueryText The buffer in which we want to",
"\t * @return The dummy placeholder in the received"
]
},
{
"added": [
"\t/**",
"\t * @param queryText The buffer in which we are going to do",
"\t * On return, fragKey has been substituted (IN PLACE)"
],
"header": "@@ -1087,16 +1081,16 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****",
"\t * @queryText The buffer in which we are going to do",
"\t * @return fragKey has been substituted (IN PLACE)"
]
},
{
"added": [
" * On return, the old pattern is substituted with the new pattern (IN"
],
"header": "@@ -1150,7 +1144,7 @@ public class ODBCMetadataGenerator {",
"removed": [
" * @return the old pattern is substituted with the new pattern (IN"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1179,7 +1173,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1220,7 +1214,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1245,7 +1239,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t/**"
],
"header": "@@ -1261,7 +1255,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t/* ****"
]
},
{
"added": [
"\t\tByte changeByte = changeMap.get(queryName);"
],
"header": "@@ -1271,7 +1265,7 @@ public class ODBCMetadataGenerator {",
"removed": [
"\t\tByte changeByte = (Byte)changeMap.get(queryName);"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/classlister.java",
"hunks": [
{
"added": [
"\tprotected Hashtable<String, String> foundClasses;"
],
"header": "@@ -67,7 +67,7 @@ import java.io.*;",
"removed": [
"\tprotected Hashtable foundClasses;"
]
},
{
"added": [
"\tprotected Hashtable<String, Hashtable<String, String>> masterClassList =",
" new Hashtable<String, Hashtable<String, String>>();",
" protected Hashtable<String, Object> classpathHash;"
],
"header": "@@ -84,10 +84,11 @@ public class classlister {",
"removed": [
"\tprotected Hashtable masterClassList = new Hashtable();",
" protected Hashtable classpathHash;"
]
},
{
"added": [
"\t\tfoundClasses = new Hashtable<String, String>(3000, 0.8f);"
],
"header": "@@ -154,7 +155,7 @@ public class classlister {",
"removed": [
"\t\tfoundClasses = new Hashtable(3000, 0.8f); "
]
},
{
"added": [
" classpathHash = new Hashtable<String, Object>();"
],
"header": "@@ -259,7 +260,7 @@ public class classlister {",
"removed": [
" classpathHash = new Hashtable();"
]
},
{
"added": [
"\t\t\tHashtable<String, String> localHashtable = null;",
"\t\t\t\tlocalHashtable = masterClassList.get(className);",
"\t\t\t\t\tlocalHashtable = new Hashtable<String, String>();"
],
"header": "@@ -531,13 +532,13 @@ public class classlister {",
"removed": [
"\t\t\tHashtable localHashtable = null;",
"\t\t\t\tlocalHashtable = (Hashtable) masterClassList.get(className);",
"\t\t\t\t\tlocalHashtable = new Hashtable();"
]
},
{
"added": [
"\t\t\tHashtable<String, Integer> scoreboard =",
" new Hashtable<String, Integer>();",
"\t\t\tHashtable<String, String> grandkids = masterClassList.get(kid);"
],
"header": "@@ -668,8 +669,9 @@ public class classlister {",
"removed": [
"\t\t\tHashtable scoreboard = new Hashtable();",
"\t\t\tHashtable grandkids = (Hashtable) masterClassList.get(kid);"
]
},
{
"added": [
"\tprotected void unrollHashtable(",
" String parent,",
" Hashtable<String, String> current,",
" Hashtable<String, Integer> scoreboard,",
" int indentLevel)",
"\t\tEnumeration<String> e = current.keys();",
"\t\t\tkey = e.nextElement();",
"\t\t\tInteger value = scoreboard.get(key);"
],
"header": "@@ -698,22 +700,26 @@ public class classlister {",
"removed": [
"\tprotected void unrollHashtable( String parent, Hashtable current, Hashtable scoreboard, int indentLevel)",
"\t\tEnumeration e = current.keys();",
"\t\t\tkey = (String) e.nextElement();",
"\t\t\tInteger value = (Integer) scoreboard.get(key);"
]
}
]
},
{
"file": "java/build/org/apache/derbyBuild/splitmessages.java",
"hunks": [
{
"added": [
" private static TreeSet<String> clientMessageIds = new TreeSet<String>();"
],
"header": "@@ -43,7 +43,7 @@ public class splitmessages {",
"removed": [
" private static TreeSet clientMessageIds = new TreeSet();"
]
}
]
}
] |
derby-DERBY-4895-f29303bb
|
DERBY-4895 Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
Patch derby-4895-a plus a comment as Knut suggested. The patch moves
the storage of a table's referencedColumnMap to the lcc to avoid a
lingering thread local in application threads after Derby has shut
down (seen as potential memory leak error in TomCat deployments).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1033485 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.FormatableBitSet;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java",
"hunks": [
{
"added": [
"import java.util.Map;"
],
"header": "@@ -24,7 +24,7 @@ package org.apache.derby.iapi.sql.dictionary;",
"removed": [
"import java.util.WeakHashMap;"
]
},
{
"added": [
"import org.apache.derby.iapi.services.context.ContextService;"
],
"header": "@@ -34,6 +34,7 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.FormatableBitSet;"
],
"header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": []
},
{
"added": [
"import java.util.WeakHashMap;"
],
"header": "@@ -85,6 +86,7 @@ import java.util.ArrayList;",
"removed": []
},
{
"added": [
"",
" /**",
" * Connection local state for cached {@code TableDescriptor}s used",
" * for keeping track of referenced columns for a table during DDL",
" * operations.",
" */",
" private WeakHashMap referencedColumnMap;",
""
],
"header": "@@ -302,7 +304,14 @@ public class GenericLanguageConnectionContext",
"removed": [
" "
]
},
{
"added": [
" referencedColumnMap = new WeakHashMap();"
],
"header": "@@ -390,6 +399,7 @@ public class GenericLanguageConnectionContext",
"removed": []
},
{
"added": [
"",
" referencedColumnMap = new WeakHashMap();"
],
"header": "@@ -811,6 +821,8 @@ public class GenericLanguageConnectionContext",
"removed": []
},
{
"added": [
"",
" public FormatableBitSet getReferencedColumnMap(TableDescriptor td) {",
" return (FormatableBitSet)referencedColumnMap.get(td);",
" }",
"",
" public void setReferencedColumnMap(TableDescriptor td,",
" FormatableBitSet map) {",
" referencedColumnMap.put(td, map);",
" }"
],
"header": "@@ -3875,4 +3887,13 @@ public class GenericLanguageConnectionContext",
"removed": []
}
]
}
] |
derby-DERBY-4897-787ceb47
|
DERBY-4897 Get rid of warning for customized tags in javadoc build
Changed all Derby custom javadoc tags to this syntax, which contains a period
(".") and thus silences the warnings:
<derby_custom_tag> ::= derby "." <camelCasedVersionOfOldTag>
e.g.
DiskLayoutTaglet.java:29: private String NAME = "derby.diskLayout";
EndFormatTaglet.java:28: private String NAME = "derby.endFormat";
FormatIdTaglet.java:29: private String NAME = "derby.formatId";
PurposeTaglet.java:29: private String NAME = "derby.purpose";
UpgradeTaglet.java:29: private String NAME = "derby.upgrade";
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1037009 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2I.java",
"hunks": [
{
"added": [
" * @derby.formatId ACCESS_B2I_V3_ID",
" * @derby.purpose The tag that describes the on disk representation of the B2I"
],
"header": "@@ -76,9 +76,9 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @format_id ACCESS_B2I_V3_ID",
" * @purpose The tag that describes the on disk representation of the B2I"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -88,7 +88,7 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
},
{
"added": [
" * @derby.diskLayout "
],
"header": "@@ -120,7 +120,7 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @disk_layout "
]
},
{
"added": [
" * @derby.formatId ACCESS_B2I_V4_ID",
" * @derby.purpose The tag that describes the on disk representation of the B2I"
],
"header": "@@ -136,9 +136,9 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @format_id ACCESS_B2I_V4_ID",
" * @purpose The tag that describes the on disk representation of the B2I"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -147,7 +147,7 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
},
{
"added": [
" * @derby.diskLayout "
],
"header": "@@ -181,7 +181,7 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @disk_layout "
]
},
{
"added": [
" * @derby.formatId ACCESS_B2I_V5_ID",
" * @derby.purpose The tag that describes the on disk representation of the B2I"
],
"header": "@@ -198,9 +198,9 @@ import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;",
"removed": [
" * @format_id ACCESS_B2I_V5_ID",
" * @purpose The tag that describes the on disk representation of the B2I"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2I_10_3.java",
"hunks": [
{
"added": [
" * @derby.formatId ACCESS_B2I_V4_ID",
" * @derby.purpose The tag that describes the on disk representation of the B2I"
],
"header": "@@ -26,9 +26,9 @@ import java.io.ObjectOutput;",
"removed": [
" * @format_id ACCESS_B2I_V4_ID",
" * @purpose The tag that describes the on disk representation of the B2I"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -37,7 +37,7 @@ import org.apache.derby.iapi.services.io.StoredFormatIds;",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2I_v10_2.java",
"hunks": [
{
"added": [
" * @derby.formatId ACCESS_B2I_V3_ID",
" * @derby.purpose The tag that describes the on disk representation of the B2I"
],
"header": "@@ -32,9 +32,9 @@ import java.lang.ClassNotFoundException;",
"removed": [
" * @format_id ACCESS_B2I_V3_ID",
" * @purpose The tag that describes the on disk representation of the B2I"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -44,7 +44,7 @@ import java.lang.ClassNotFoundException;",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/heap/Heap.java",
"hunks": [
{
"added": [
" * @derby.formatId ACCESS_HEAP_V2_ID",
" * @derby.purpose The tag that describes the on disk representation of the Heap"
],
"header": "@@ -75,9 +75,9 @@ import org.apache.derby.impl.store.access.conglomerate.OpenConglomerate;",
"removed": [
" * @format_id ACCESS_HEAP_V2_ID",
" * @purpose The tag that describes the on disk representation of the Heap"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -87,7 +87,7 @@ import org.apache.derby.impl.store.access.conglomerate.OpenConglomerateScratchSp",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
},
{
"added": [
" * @derby.diskLayout"
],
"header": "@@ -119,7 +119,7 @@ import org.apache.derby.impl.store.access.conglomerate.OpenConglomerateScratchSp",
"removed": [
" * @disk_layout"
]
},
{
"added": [
" * @derby.formatId ACCESS_HEAP_V3_ID",
" * @derby.purpose The tag that describes the on disk representation of the Heap",
" * @derby.purpose The tag that describes the on disk representation of the Heap"
],
"header": "@@ -128,13 +128,13 @@ import org.apache.derby.impl.store.access.conglomerate.OpenConglomerateScratchSp",
"removed": [
" * @format_id ACCESS_HEAP_V3_ID",
" * @purpose The tag that describes the on disk representation of the Heap",
" * @purpose The tag that describes the on disk representation of the Heap"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java",
"hunks": [
{
"added": [
" * @derby.formatId ACCESS_HEAP_V2_ID",
" * @derby.purpose The tag that describes the on disk representation of the Heap"
],
"header": "@@ -32,9 +32,9 @@ import java.lang.ClassNotFoundException;",
"removed": [
" * @format_id ACCESS_HEAP_V2_ID",
" * @purpose The tag that describes the on disk representation of the Heap"
]
},
{
"added": [
" * @derby.upgrade The format id of this object is currently always read from disk"
],
"header": "@@ -44,7 +44,7 @@ import java.lang.ClassNotFoundException;",
"removed": [
" * @upgrade The format id of this object is currently always read from disk"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tnone, format implied by AllocPage's format",
"\t@derby.purpose\tmanage page status of page in extent",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -41,10 +41,10 @@ import java.io.ObjectInput;",
"removed": [
"\t@format_id\tnone, format implied by AllocPage's format",
"\t@purpose\tmanage page status of page in extent",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tRAW_STORE_ALLOC_PAGE",
"\t@derby.purpose\tmanage page allocation",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -104,10 +104,10 @@ import org.apache.derby.iapi.services.io.ArrayInputStream;",
"removed": [
"\t@format_id\tRAW_STORE_ALLOC_PAGE",
"\t@purpose\tmanage page allocation",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/CopyRowsOperation.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tLOGOP_COPY_ROWS",
"\t@derby.purpose\tcopy some rows from one page to another",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -53,12 +53,12 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"\t@format_id\tLOGOP_COPY_ROWS",
"\t@purpose\tcopy some rows from one page to another",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/DeleteOperation.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tLOGOP_DELETE",
"\t@derby.purpose\tdelete a record from a page.",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -59,12 +59,12 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"\t@format_id\tLOGOP_DELETE",
"\t@purpose\tdelete a record from a page.",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/UpdateFieldOperation.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tLOGOP_UPDATE_FIELD",
"\t@derby.purpose\tupdate a field of a record on the page",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -59,12 +59,12 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"\t@format_id\tLOGOP_UPDATE_FIELD",
"\t@purpose\tupdate a field of a record on the page",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/log/FileLogger.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tno formatId, format is implied by the log file format and the",
"\t@derby.purpose\tthe log record and optional data",
"\t@derby.upgrade",
"\t@derby.diskLayout",
"\t@derby.endFormat",
"\t@derby.formatId\tno formatId, format is implied by the log file format and the",
"\t@derby.purpose\tundo a previous log record",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -71,25 +71,25 @@ import org.apache.derby.impl.store.raw.data.InitPageOperation;",
"removed": [
"\t@format_id\tno formatId, format is implied by the log file format and the",
"\t@purpose\tthe log record and optional data",
"\t@upgrade",
"\t@disk_layout",
"\t@end_format",
"\t@format_id\tno formatId, format is implied by the log file format and the",
"\t@purpose\tundo a previous log record",
"\t@upgrade",
"\t@disk_layout"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java",
"hunks": [
{
"added": [
"\t@derby.formatId\tFILE_STREAM_LOG_FILE",
"\t@derby.purpose\tThe log control file contains information about which log files",
"\t@derby.upgrade\t",
"\t@derby.diskLayout"
],
"header": "@@ -146,11 +146,11 @@ import java.util.zip.CRC32;",
"removed": [
"\t@format_id\tFILE_STREAM_LOG_FILE",
"\t@purpose\tThe log control file contains information about which log files",
"\t@upgrade\t",
"\t@disk_layout"
]
},
{
"added": [
"\t@derby.endFormat",
"\t@derby.formatId\tFILE_STREAM_LOG_FILE",
"\t@derby.purpose\tThe log file contains log record which record all the changes",
"\t@derby.upgrade",
"\t@derby.diskLayout"
],
"header": "@@ -165,19 +165,19 @@ import java.util.zip.CRC32;",
"removed": [
"\t@end_format",
"\t@format_id\tFILE_STREAM_LOG_FILE",
"\t@purpose\tThe log file contains log record which record all the changes",
"\t@upgrade",
"\t@disk_layout"
]
},
{
"added": [
"\t@derby.endFormat",
"\t@derby.formatId none. The format is implied by the FILE_STREAM_LOG_FILE",
"\t@derby.purpose\tThe log record wrapper provides information for the log scan.",
"\t@derby.upgrade",
"\t@derby.diskLayout",
"\t@derby.endFormat"
],
"header": "@@ -191,22 +191,22 @@ import java.util.zip.CRC32;",
"removed": [
"\t@end_format",
"\t@format_id none. The format is implied by the FILE_STREAM_LOG_FILE",
"\t@purpose\tThe log record wrapper provides information for the log scan.",
"\t@upgrade",
"\t@disk_layout",
"\t@end_format"
]
}
]
}
] |
derby-DERBY-4898-0f8de6c8
|
DERBY-4898: testGetURL test fails in nightly runs
Disregard differences in ordering when comparing connection
attributes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1033851 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
" this.connectionAttributes = new Properties();"
],
"header": "@@ -1009,6 +1009,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [
" connectionAttributes = new Properties();"
],
"header": "@@ -1221,6 +1222,7 @@ public final class TestConfiguration {",
"removed": []
},
{
"added": [],
"header": "@@ -1362,21 +1364,6 @@ public final class TestConfiguration {",
"removed": [
" /**",
" * Return the JDBC URL for connecting to the default database, including",
" * any connection attributes.",
" *",
" * @return JDBC URL with connection attributes",
" */",
" public String getJDBCUrlWithAttributes() {",
" String attrs = getConnectionAttributesString();",
" if (attrs == null) {",
" return url;",
" } else {",
" return url + ';' + attrs;",
" }",
" }",
""
]
},
{
"added": [
" * @return connection attributes (never {@code null})",
" public Properties getConnectionAttributes() {"
],
"header": "@@ -1430,9 +1417,9 @@ public final class TestConfiguration {",
"removed": [
" * @return connection attributes (can be {@code null})",
" Properties getConnectionAttributes() {"
]
},
{
"added": [],
"header": "@@ -1444,10 +1431,6 @@ public final class TestConfiguration {",
"removed": [
" if (connectionAttributes == null) {",
" return null;",
" }",
""
]
}
]
}
] |
derby-DERBY-4899-b1977cf5
|
DERBY-4899: Refactor access to primary structures in AlterTableConstantAction
Use instance variables instead of passing arguments unnecessarily to a bunch of
private methods.
Removed unused variables and one unused method.
This is a cleanup patch.
Patch file: derby-4899-1b-cleanup.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1034347 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java",
"hunks": [
{
"added": [
" public void executeConstantAction(Activation activation)",
" throws StandardException {",
" // Save references to the main structures we need.",
" this.activation = activation;",
" lcc = activation.getLanguageConnectionContext();",
" dd = lcc.getDataDictionary();",
" dm = dd.getDependencyManager();",
" tc = lcc.getTransactionExecute();"
],
"header": "@@ -272,15 +272,14 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tpublic void\texecuteConstantAction(",
" Activation activation)",
" throws StandardException",
"\t{",
"\t\tLanguageConnectionContext lcc = ",
" activation.getLanguageConnectionContext();",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tDependencyManager dm = dd.getDependencyManager();",
"\t\tTransactionController tc = lcc.getTransactionExecute();"
]
},
{
"added": [
" defragmentRows(tc);"
],
"header": "@@ -307,7 +306,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t defragmentRows(tc, lcc);"
]
},
{
"added": [
" if (updateStatistics) {",
" updateStatistics();"
],
"header": "@@ -315,9 +314,8 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tif (updateStatistics)",
"\t\t{",
"\t\t\tupdateStatistics(activation);"
]
},
{
"added": [
"\t\t\t\t\taddNewColumnToTable(ix);"
],
"header": "@@ -435,15 +433,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\t\tColumnDescriptorList cdl = new ColumnDescriptorList();",
"",
"\t\t\t\t\taddNewColumnToTable(activation, lcc, dd, tc, ix);"
]
},
{
"added": [
" modifyColumnDefault(ix);",
" modifyColumnType(ix);",
" modifyColumnConstraint(columnInfo[ix].name, true);"
],
"header": "@@ -452,18 +448,17 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\t\t\tmodifyColumnDefault(activation, ix);",
"\t\t\t\t\tmodifyColumnType(activation, ix);",
"\t\t\t\t\tmodifyColumnConstraint(",
" activation, columnInfo[ix].name, true);"
]
},
{
"added": [
" modifyColumnConstraint(columnInfo[ix].name, false);",
" dropColumnFromTable(columnInfo[ix].name);"
],
"header": "@@ -490,13 +485,12 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\t\t\t\tmodifyColumnConstraint(",
" activation, columnInfo[ix].name, false);",
"\t\t\t\t\tdropColumnFromTable(activation, columnInfo[ix].name);"
]
},
{
"added": [
" compressTable();",
" truncateTable();"
],
"header": "@@ -616,13 +610,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\tcompressTable(activation);",
"\t\t\ttruncateTable(activation);"
]
},
{
"added": [
" private void updateStatistics()",
" throws StandardException {"
],
"header": "@@ -630,21 +624,15 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t * @param activation the current activation",
"\tprivate void updateStatistics(Activation activation)",
"\tthrows StandardException",
"\t{",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tTransactionController tc = lcc.getTransactionExecute();",
"\t\tDependencyManager dm = dd.getDependencyManager();"
]
},
{
"added": [
" private void defragmentRows(TransactionController tc)",
" throws StandardException {"
],
"header": "@@ -899,14 +887,10 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t * @param lcc\t\t\t\tthe language connection context",
"\tprivate void defragmentRows(",
"\t\t\tTransactionController tc,",
"\t\t\tLanguageConnectionContext lcc)",
" throws StandardException",
"\t{"
]
},
{
"added": [],
"header": "@@ -934,10 +918,6 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"",
"\t\t\tConglomerateDescriptor heapCD = ",
" td.getConglomerateDescriptor(td.getHeapConglomerateId());",
""
]
},
{
"added": [
" private void addNewColumnToTable(int ix)"
],
"header": "@@ -1287,19 +1267,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void addNewColumnToTable(",
" Activation activation, ",
" LanguageConnectionContext lcc,",
" DataDictionary dd,",
" TransactionController tc,",
" int ix) ",
"\t\tDataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();"
]
},
{
"added": [
" updateNewAutoincrementColumn(columnInfo[ix].name,"
],
"header": "@@ -1362,7 +1336,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\tupdateNewAutoincrementColumn(activation, columnInfo[ix].name,"
]
},
{
"added": [
" updateNewColumnToDefault(columnDescriptor);"
],
"header": "@@ -1370,7 +1344,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\tupdateNewColumnToDefault(activation, columnDescriptor, lcc);"
]
},
{
"added": [
" private void dropColumnFromTable(String columnName )"
],
"header": "@@ -1442,18 +1416,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
" * @param activation the current activation",
"\tprivate void dropColumnFromTable(Activation activation, String columnName )",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tDependencyManager dm = dd.getDependencyManager();",
"\t\tTransactionController tc = lcc.getTransactionExecute();"
]
},
{
"added": [
" dropColumnFromTable(generatedColumnName);"
],
"header": "@@ -1521,7 +1490,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
" dropColumnFromTable( activation, generatedColumnName );"
]
},
{
"added": [
"\t\tcreateNewBackingCongloms(newCongloms, (long[])null);"
],
"header": "@@ -1732,8 +1701,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tcreateNewBackingCongloms(",
"\t\t\tnewCongloms, (long[])null, activation, dd);"
]
},
{
"added": [
" compressTable();"
],
"header": "@@ -1747,7 +1715,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tcompressTable(activation);"
]
},
{
"added": [
" private void modifyColumnType(int ix)",
" throws StandardException {"
],
"header": "@@ -1822,14 +1790,8 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void modifyColumnType(Activation activation,",
"\t\t\t\t\t\t\t\t int ix)",
"\t\tthrows StandardException\t\t\t\t\t\t ",
"\t{",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tTransactionController tc = lcc.getTransactionExecute();",
""
]
},
{
"added": [
" private void modifyColumnConstraint(String colName, boolean nullability)",
" throws StandardException {"
],
"header": "@@ -1859,17 +1821,8 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void modifyColumnConstraint(Activation activation, ",
"\t\t\t\t\t\t\t\t\t\tString colName,",
"\t\t\t\t\t\t\t\t\t\tboolean nullability)",
"\t\tthrows StandardException\t\t\t\t\t\t\t\t",
"\t{",
"\t\tLanguageConnectionContext lcc = ",
" activation.getLanguageConnectionContext();",
"",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tTransactionController tc = lcc.getTransactionExecute();",
""
]
},
{
"added": [
" private void modifyColumnDefault(int ix)"
],
"header": "@@ -1927,20 +1880,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t * @param \t\tactivation \t\tactivation",
"\tprivate void modifyColumnDefault(Activation activation,",
"\t\t\t\t\t\t\t\t\t int ix)",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();",
"\t\tDataDictionary dd = lcc.getDataDictionary();",
"\t\tDependencyManager dm = dd.getDependencyManager();",
"\t\tTransactionController tc = lcc.getTransactionExecute();",
""
]
},
{
"added": [
" long maxValue = getColumnMax(td, columnInfo[ix].name,",
" columnInfo[ix].autoincInc);"
],
"header": "@@ -1994,9 +1940,8 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\tlong maxValue = getColumnMax(activation, td, columnInfo[ix].name,",
"\t\t\t\t\t\t\t\t\t\t columnInfo[ix].autoincInc,",
"\t\t\t\t\t\t\t\t\t\t columnInfo[ix].autoincStart);"
]
},
{
"added": [
" private void compressTable()"
],
"header": "@@ -2017,20 +1962,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void compressTable(",
" Activation activation)",
"\t\tthis.lcc = activation.getLanguageConnectionContext();",
"\t\tthis.dd = lcc.getDataDictionary();",
"\t\tthis.dm = dd.getDependencyManager();",
"\t\tthis.tc = lcc.getTransactionExecute();",
"\t\tthis.activation = activation;",
""
]
},
{
"added": [
" getAffectedIndexes();"
],
"header": "@@ -2077,7 +2015,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tgetAffectedIndexes(activation);"
]
},
{
"added": [
" private void truncateTable()"
],
"header": "@@ -2209,18 +2147,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void truncateTable(Activation activation)",
"\t\tthis.lcc = activation.getLanguageConnectionContext();",
"\t\tthis.dd = lcc.getDataDictionary();",
"\t\tthis.dm = dd.getDependencyManager();",
"\t\tthis.tc = lcc.getTransactionExecute();",
"\t\tthis.activation = activation;"
]
},
{
"added": [
" getAffectedIndexes();"
],
"header": "@@ -2302,7 +2235,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tgetAffectedIndexes(activation);"
]
},
{
"added": [
" private void getAffectedIndexes()"
],
"header": "@@ -2583,7 +2516,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void getAffectedIndexes(Activation activation)"
]
},
{
"added": [
" createNewBackingCongloms(newCongloms, indexConglomerateNumbers);"
],
"header": "@@ -2649,8 +2582,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\t\tcreateNewBackingCongloms(newCongloms,",
"\t\t\t\tindexConglomerateNumbers, activation, dd);"
]
},
{
"added": [
" long [] ixCongNums)"
],
"header": "@@ -2743,7 +2675,7 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t\tlong [] ixCongNums, Activation activation, DataDictionary dd)"
]
},
{
"added": [],
"header": "@@ -2829,8 +2761,6 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
" int[] base_table_collation_ids = td.getColumnCollationIds();",
""
]
},
{
"added": [
" private void updateNewColumnToDefault(ColumnDescriptor columnDescriptor)",
" throws StandardException {"
],
"header": "@@ -3174,18 +3104,11 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\t * @param lcc\t\t\t\tthe language connection context",
"\tprivate void updateNewColumnToDefault",
"\t(",
"\t\tActivation activation,",
" ColumnDescriptor columnDescriptor,",
"\t\tLanguageConnectionContext\t\tlcc",
"\t)",
"\t\tthrows StandardException",
"\t{"
]
},
{
"added": [
" private long getColumnMax(TableDescriptor td, String columnName,",
" long increment)",
" throws StandardException {"
],
"header": "@@ -3218,16 +3141,13 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate long getColumnMax(Activation activation, TableDescriptor td, String columnName, ",
"\t\t\t\t\t\t\t long increment, long initial)",
"\t\t\t\t\t\t\t throws StandardException",
"\t{",
"",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();"
]
},
{
"added": [],
"header": "@@ -3240,26 +3160,6 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void dropAllColumnDefaults(UUID tableId, DataDictionary dd)",
"\t\tthrows StandardException",
"\t{",
"\t\tColumnDescriptorList cdl = td.getColumnDescriptorList();",
"\t\tint\t\t\t\t\t cdlSize = cdl.size();",
"\t\t",
"\t\tfor(int index = 0; index < cdlSize; index++)",
"\t\t{",
"\t\t\tColumnDescriptor cd = (ColumnDescriptor) cdl.elementAt(index);",
"",
"\t\t\t// If column has a default we drop the default and",
"\t\t\t// any dependencies",
"\t\t\tif (cd.getDefaultInfo() != null)",
"\t\t\t{",
"\t\t\t\tDefaultDescriptor defaultDesc = cd.getDefaultDescriptor(dd);",
"\t\t\t\tdm.clearDependencies(lcc, defaultDesc);",
"\t\t\t}",
"\t\t}",
"\t}",
""
]
},
{
"added": [
" private void updateNewAutoincrementColumn(String columnName, long initial,"
],
"header": "@@ -3299,12 +3199,10 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
"\tprivate void updateNewAutoincrementColumn(Activation activation, String columnName, long initial,",
"\t\tLanguageConnectionContext lcc = activation.getLanguageConnectionContext();",
""
]
},
{
"added": [],
"header": "@@ -3526,4 +3424,3 @@ class AlterTableConstantAction extends DDLSingleTableConstantAction",
"removed": [
""
]
}
]
}
] |
derby-DERBY-4902-0c4389d8
|
DERBY-4902: Encoding problem in output from plan exporter
Make sure the encoding in the header of the generated XML file matches
the actual encoding used in the file.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1035238 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/planexporter/CreateXMLFile.java",
"hunks": [
{
"added": [
"import java.io.BufferedWriter;",
"import java.io.OutputStreamWriter;",
"import java.io.Writer;",
"import java.security.PrivilegedExceptionAction;"
],
"header": "@@ -21,14 +21,14 @@",
"removed": [
"import java.io.BufferedOutputStream;",
"import java.io.DataOutputStream;",
"import java.io.OutputStream;",
"import org.apache.derby.impl.tools.planexporter.AccessDatabase;"
]
},
{
"added": [
" String defaultXML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";"
],
"header": "@@ -57,7 +57,7 @@ public class CreateXMLFile {",
"removed": [
" String defaultXML = \"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?>\\n\";"
]
},
{
"added": [
" FileOutputStream fos;",
" try {",
" fos = (FileOutputStream) AccessController.doPrivileged(",
" new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" return new FileOutputStream(file_name);",
" }",
" });",
" } catch (PrivilegedActionException pae) {",
" throw (IOException) pae.getCause();",
" }",
"",
" Writer out = new BufferedWriter(new OutputStreamWriter(fos, \"UTF-8\"));",
"",
" out.write(defaultXML);",
"",
" out.write(embedXSL);",
" out.write(comment);",
" out.write(parentTagStart);",
"",
" out.write(access.indent(0));",
" out.write(stmt);",
"",
" out.write(access.indent(0));",
" out.write(time);",
"",
" out.write(access.indent(0));",
" out.write(access.stmtID());",
"",
" out.write(access.indent(0));",
" out.write(childTagStart);",
"",
" out.write(access.getXmlString());",
"",
" out.write(access.indent(0));",
" out.write(childTagEnd);",
"",
" out.write(parentTagEnd);",
" out.close();"
],
"header": "@@ -68,31 +68,44 @@ public class CreateXMLFile {",
"removed": [
" DataOutputStream dos;",
"\t\ttry {",
"\t\t\tdos = new DataOutputStream(",
" new BufferedOutputStream(",
" (OutputStream)AccessController.doPrivileged",
" (new java.security.PrivilegedExceptionAction(){",
" public Object run() throws IOException{",
" return new FileOutputStream(file_name);",
" }",
" })));",
"",
" dos.write(defaultXML.getBytes());",
" dos.write(embedXSL.getBytes());",
" dos.write(comment.getBytes());",
" dos.write(parentTagStart.getBytes());",
" dos.write((access.indent(0)+stmt).getBytes());",
" dos.write((access.indent(0)+time).getBytes());",
" dos.write((access.indent(0)+access.stmtID()).getBytes());",
" dos.write((access.indent(0)+childTagStart).getBytes());",
" dos.write(access.getXmlString().getBytes());",
" dos.write((access.indent(0)+childTagEnd).getBytes());",
" dos.write(parentTagEnd.getBytes());",
" dos.close();",
"\t\t} catch (PrivilegedActionException pae) {",
"\t\t\tthrow (IOException)pae.getCause(); ",
"\t\t}"
]
}
]
}
] |
derby-DERBY-4903-c85d5e14
|
DERBY-4903: Plan exporter tool produces broken output if query contains less-than operator
Patch contributed by C.S. Nirmal J. Fernando <nirmal070125@gmail.com>.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1039084 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/planexporter/AccessDatabase.java",
"hunks": [
{
"added": [
""
],
"header": "@@ -260,6 +260,7 @@ public class AccessDatabase {",
"removed": []
},
{
"added": [
"",
"",
" /*Removing possible occurrences of special XML characters",
" * from XML node attributes in XML representation.*/",
" text = replaceInAttribute(text, '<',\"<\");",
" text = replaceInAttribute(text, '>',\">\");",
" text = replaceInAttribute(text, '\\'',\"'\");",
" text = replaceInAttribute(text, '\"',\""\");",
""
],
"header": "@@ -374,7 +375,16 @@ public class AccessDatabase {",
"removed": []
},
{
"added": [
"",
" /*Removing possible occurrences of special XML characters",
" * from a query statement with XML representation.*/",
" statement = replace(statement, '<',\"<\");",
" statement = replace(statement, '>',\">\");",
" statement = replace(statement, '\\'',\"'\");",
" statement = replace(statement, '\"',\""\");",
"",
" * @param text text to be checked",
" private String replace(String text, char expr, String replace){",
" int idx = text.indexOf(expr);",
" text = text.substring(0, idx) + replace + text.substring(idx+1);",
" idx = text.indexOf(expr);",
" return text;",
" }",
"",
" /**",
" * This method is needed since in the case of XML attributes",
" * we have to filter the quotation (") marks that is compulsory.",
" * eg:",
" * scanned_object=\"A "quoted" table name\";",
" *",
" * @param text attribute string to be checked",
" * @param expr string to be removed",
" * @param replace string to be added",
" * @return modified string",
" */",
" private String replaceInAttribute(String text, char expr, String replace){",
" if (text.indexOf('\"') == -1)",
" return text;",
" String correctXMLString = replace(text.substring(text.indexOf('\"')+1, text.length()-1), expr, replace);",
" return text.substring(0,text.indexOf('\"')+1)+correctXMLString+\"\\\"\";"
],
"header": "@@ -466,32 +476,50 @@ public class AccessDatabase {",
"removed": [
" /*Removing possible less than and greater than characters",
" * in a query statement with XML representation.*/",
" if(statement.indexOf('<')!= -1){",
" statement = replace(statement, \"<\",\"<\");",
" }",
" if(statement.indexOf('>')!= -1){",
" statement = replace(statement, \">\",\">\");",
" }",
" * @param stmt statement to be changed",
" private String replace(String stmt, String expr, String replace){",
" \t int idx = stmt.indexOf(expr);",
" \t stmt = stmt.substring(0, idx) + replace + stmt.substring(idx+1);",
" \t idx = stmt.indexOf(expr);",
" \t return stmt;"
]
}
]
}
] |
derby-DERBY-4903-f67a9ca4
|
DERBY-4903: Plan exporter tool produces broken output if query contains less-than operator
Added handling of '&' and expanded test case to test more special characters.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1039268 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/planexporter/AccessDatabase.java",
"hunks": [
{
"added": [
" text = escapeInAttribute(text);"
],
"header": "@@ -380,10 +380,7 @@ public class AccessDatabase {",
"removed": [
" text = replaceInAttribute(text, '<',\"<\");",
" text = replaceInAttribute(text, '>',\">\");",
" text = replaceInAttribute(text, '\\'',\"'\");",
" text = replaceInAttribute(text, '\"',\""\");"
]
},
{
"added": [
" statement = escapeForXML(statement);",
" * Escape characters that have a special meaning in XML.",
" * @param text the text to escape",
" * @return the text with special characters escaped",
" private static String escapeForXML(String text) {",
" StringBuffer sb = new StringBuffer();",
"",
" for (int i = 0; i < text.length(); i++) {",
" char ch = text.charAt(i);",
" switch (ch) {",
" case '&':",
" sb.append(\"&\");",
" break;",
" case '<':",
" sb.append(\"<\");",
" break;",
" case '>':",
" sb.append(\">\");",
" break;",
" case '\\'':",
" sb.append(\"'\");",
" break;",
" case '\"':",
" sb.append(\""\");",
" break;",
" default:",
" sb.append(ch);",
" }",
" }",
"",
" return sb.toString();"
],
"header": "@@ -479,29 +476,44 @@ public class AccessDatabase {",
"removed": [
" statement = replace(statement, '<',\"<\");",
" statement = replace(statement, '>',\">\");",
" statement = replace(statement, '\\'',\"'\");",
" statement = replace(statement, '\"',\""\");",
" * @param text text to be checked",
" * @param expr string to be removed",
" * @param replace string to be added",
" * @return modified string",
" private String replace(String text, char expr, String replace){",
" int idx = text.indexOf(expr);",
" \t while (idx >= 0)",
" \t {",
" text = text.substring(0, idx) + replace + text.substring(idx+1);",
" idx = text.indexOf(expr);",
" \t }",
" return text;"
]
},
{
"added": [
" private String escapeInAttribute(String text) {",
" String correctXMLString = escapeForXML(",
" text.substring(text.indexOf('\"') + 1, text.length() - 1));"
],
"header": "@@ -511,14 +523,13 @@ public class AccessDatabase {",
"removed": [
" * @param expr string to be removed",
" * @param replace string to be added",
" private String replaceInAttribute(String text, char expr, String replace){",
" String correctXMLString = replace(text.substring(text.indexOf('\"')+1, text.length()-1), expr, replace);"
]
}
]
}
] |
derby-DERBY-4904-65ee2532
|
DERBY-4904: Plan exporter doesn't work if XPLAIN schema has special characters
Use prepared statements to prevent the need for quoting.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1035603 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/planexporter/AccessDatabase.java",
"hunks": [
{
"added": [
"import java.sql.PreparedStatement;"
],
"header": "@@ -23,9 +23,9 @@ package org.apache.derby.impl.tools.planexporter;",
"removed": [
"import java.sql.Statement;"
]
},
{
"added": [
" private final Connection conn;",
" private final String schema;",
" private final String query;",
" private final boolean schemaExists;",
""
],
"header": "@@ -34,18 +34,12 @@ import java.sql.Statement;",
"removed": [
" private Connection conn = null;",
" private Statement stmt = null;",
" private String dbURL = null;",
" private String schema = null;",
" private String query = null;",
" /**",
" * @param query the stmt_id to set",
" */",
" public void setQuery(String query) {",
" this.query = query;",
" }"
]
},
{
"added": [
" public AccessDatabase(String dburl, String aSchema, String aQuery)",
" throws InstantiationException, IllegalAccessException,",
" ClassNotFoundException, SQLException",
" {",
" this(createConnection(dburl), aSchema, aQuery);"
],
"header": "@@ -81,12 +75,11 @@ public class AccessDatabase {",
"removed": [
" public AccessDatabase(String dburl, String aSchema, String aQuery) {",
"",
" dbURL = dburl;",
" schema = aSchema;",
" setQuery(aQuery);",
""
]
},
{
"added": [
" public AccessDatabase(Connection aConn, String aSchema, String aQuery)",
" throws SQLException",
" {",
" query = aQuery;",
" schemaExists = schemaExists();",
" if (schemaExists) {",
" setSchema();",
" }"
],
"header": "@@ -96,12 +89,18 @@ public class AccessDatabase {",
"removed": [
" public AccessDatabase(Connection aConn, String aSchema, String aQuery) {",
" setQuery(aQuery);"
]
},
{
"added": [
" private static Connection createConnection(String dbURL)",
" throws InstantiationException, IllegalAccessException,",
" ClassNotFoundException, SQLException"
],
"header": "@@ -111,7 +110,9 @@ public class AccessDatabase {",
"removed": [
" public void createConnection() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException"
]
},
{
"added": [
" return DriverManager.getConnection(dbURL);",
"",
" }",
" /**",
" * Set the schema of the current connection to the XPLAIN schema in",
" * which the statistics can be found.",
" *",
" * @throws SQLException if an error happens while accessing the database",
" */",
" private void setSchema() throws SQLException {",
" PreparedStatement setSchema = conn.prepareStatement(\"SET SCHEMA ?\");",
" setSchema.setString(1, schema);",
" setSchema.execute();",
" setSchema.close();",
" /**",
" * Check if there is a schema in the database that matches the schema",
" * name that was passed in to this instance.",
" */",
" private boolean schemaExists() throws SQLException {"
],
"header": "@@ -121,11 +122,28 @@ public class AccessDatabase {",
"removed": [
" conn = DriverManager.getConnection(dbURL);",
" public boolean verifySchemaExistance() throws SQLException{"
]
},
{
"added": [
"",
" public boolean verifySchemaExistance() {",
" return schemaExists;",
" }",
""
],
"header": "@@ -136,6 +154,11 @@ public class AccessDatabase {",
"removed": []
},
{
"added": [
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", ID);",
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", P_ID);",
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", NODE_TYPE);",
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", NO_OF_OPENS);",
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", INPUT_ROWS);",
" \"from SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = ?\", RETURNED_ROWS);",
" \"from (SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", VISITED_PAGES);",
" \"from (SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", SCAN_QUALIFIERS);",
" \"from (SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", NEXT_QUALIFIERS);",
" \"from (SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", SCANNED_OBJECT);",
" \"from (SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", SCAN_TYPE);",
" \"from (SYSXPLAIN_SORT_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", SORT_TYPE);",
" \"from (SYSXPLAIN_SORT_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = ?\", NO_OF_OUTPUT_ROWS_BY_SORTER);"
],
"header": "@@ -146,85 +169,85 @@ public class AccessDatabase {",
"removed": [
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", ID);",
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", P_ID);",
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", NODE_TYPE);",
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", NO_OF_OPENS);",
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", INPUT_ROWS);",
" \"from \"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", RETURNED_ROWS);",
" \"from (\"+schema+\".SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", VISITED_PAGES);",
" \"from (\"+schema+\".SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", SCAN_QUALIFIERS);",
" \"from (\"+schema+\".SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", NEXT_QUALIFIERS);",
" \"from (\"+schema+\".SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", SCANNED_OBJECT);",
" \"from (\"+schema+\".SYSXPLAIN_SCAN_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", SCAN_TYPE);",
" \"from (\"+schema+\".SYSXPLAIN_SORT_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", SORT_TYPE);",
" \"from (\"+schema+\".SYSXPLAIN_SORT_PROPS \" +",
" \"NATURAL RIGHT OUTER JOIN \"+schema+\".SYSXPLAIN_RESULTSETS) \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\", NO_OF_OUTPUT_ROWS_BY_SORTER);"
]
},
{
"added": [
" * Create XML data based on the query that's passed in. The query should",
" * have exactly one parameter, which will be initialized to the statement",
" * id before the query is executed.",
" PreparedStatement ps = conn.prepareStatement(qry);",
" ps.setString(1, getQuery());",
"",
" ResultSet results = ps.executeQuery();"
],
"header": "@@ -333,14 +356,19 @@ public class AccessDatabase {",
"removed": [
" stmt = conn.createStatement();",
" ResultSet results = stmt.executeQuery(qry);"
]
},
{
"added": [
" ps.close();"
],
"header": "@@ -403,7 +431,7 @@ public class AccessDatabase {",
"removed": [
" stmt.close();"
]
},
{
"added": [
" PreparedStatement ps = conn.prepareStatement(",
" \"select count(*) from SYSXPLAIN_RESULTSETS where STMT_ID = ?\");",
" ps.setString(1, getQuery());",
" ResultSet results = ps.executeQuery();",
" ps.close();"
],
"header": "@@ -412,16 +440,14 @@ public class AccessDatabase {",
"removed": [
"",
" stmt = conn.createStatement();",
" ResultSet results = stmt.executeQuery(",
" \"select count(*) from \" +",
" \"\"+schema+\".SYSXPLAIN_RESULTSETS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\");",
" stmt.close();"
]
},
{
"added": [
" PreparedStatement ps = conn.prepareStatement(",
" \"select STMT_TEXT from SYSXPLAIN_STATEMENTS where STMT_ID = ?\");",
" ps.setString(1, getQuery());",
" ResultSet results = ps.executeQuery();",
" ps.close();"
],
"header": "@@ -432,15 +458,14 @@ public class AccessDatabase {",
"removed": [
" stmt = conn.createStatement();",
" ResultSet results = stmt.executeQuery(",
" \"select STMT_TEXT \"+",
" \"from \"+schema+\".SYSXPLAIN_STATEMENTS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\");",
" stmt.close();"
]
},
{
"added": [
" PreparedStatement ps = conn.prepareStatement(",
" \"'</time>' from SYSXPLAIN_STATEMENTS \" +",
" \"where STMT_ID = ?\");",
" ps.setString(1, getQuery());",
" ResultSet results = ps.executeQuery();",
" ps.close();"
],
"header": "@@ -475,15 +500,16 @@ public class AccessDatabase {",
"removed": [
" stmt = conn.createStatement();",
" ResultSet results = stmt.executeQuery(",
" \"'</time>' from \"+schema+\".SYSXPLAIN_STATEMENTS \" +",
" \"where STMT_ID = '\"+getQuery()+\"'\");",
" stmt.close();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/tools/PlanExporter.java",
"hunks": [
{
"added": [],
"header": "@@ -52,7 +52,6 @@ public class PlanExporter {",
"removed": [
" access.createConnection();"
]
}
]
}
] |
derby-DERBY-4910-afa3a69d
|
DERBY-4910: Report underlying exception when replication tests fail
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1043748 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4911-84814bc1
|
DERBY-4911 restoreIntrFlagIfSeen may throw ShutdownException causing confusing console stack trace at server shutdown
Patch derby-4911, which makes restoreIntrFlagIfSeen ignore
ShutdownException when trying to find lcc. We sometimes saw a
ShutdownException stack dump on the console when stopping the network
server. restoreIntrFlagIfSeen does nothing useful when we are closing
down anyway, so we can safely ignore the exception.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1038813 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/util/InterruptStatus.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.error.ShutdownException;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
},
{
"added": [
" LanguageConnectionContext lcc = null;",
" try {",
" lcc =",
" (LanguageConnectionContext)ContextService.getContextOrNull(",
" LanguageConnectionContext.CONTEXT_ID);",
" } catch (ShutdownException e) {",
" // Ignore. DERBY-4911 Restoring interrupt flag is moot anyway if we",
" // are closing down.",
" }"
],
"header": "@@ -155,9 +156,15 @@ public class InterruptStatus {",
"removed": [
" LanguageConnectionContext lcc =",
" (LanguageConnectionContext)ContextService.getContextOrNull(",
" LanguageConnectionContext.CONTEXT_ID);"
]
}
]
}
] |
derby-DERBY-4913-000d4bcd
|
DERBY-4913 10.3 to 10.5 upgrade fails with ava.io.StreamCorruptedException: java.lang.ClassCastException: org.apache.derby.catalog.types.OldRoutineType incompatible with org.apache.derby.iapi.types.DataTypeDescriptor
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1053724 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/GenericColumnDescriptor.java",
"hunks": [
{
"added": [
"import org.apache.derby.catalog.types.RoutineAliasInfo;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"\t\ttype = getStoredDataTypeDescriptor(fh.get(\"type\"));"
],
"header": "@@ -220,7 +221,7 @@ public final class GenericColumnDescriptor",
"removed": [
"\t\ttype = (DataTypeDescriptor)fh.get(\"type\");"
]
}
]
}
] |
derby-DERBY-4915-ba553fa0
|
DERBY-4915: test failure in OSReadOnlyTest in assertDirectoryDeleted
Make BaseJDBCTestCase.assertDirectoryDeleted retry up to three times before
giving up and raising an assert failure.
Make DropDatabaseSetup.removeDir use the above mentioned method, since it is
also failing to delete files on Windows.
Patch file: derby-4915-1b-more_persistent_delete.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1076335 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java",
"hunks": [
{
"added": [
" BaseJDBCTestCase.assertDirectoryDeleted(dir);",
""
],
"header": "@@ -116,25 +116,9 @@ class DropDatabaseSetup extends BaseTestSetup {",
"removed": [
" String[] list = dir.list();",
"",
" // Some JVMs return null for File.list() when the",
" // directory is empty.",
" if (list != null) {",
" for (int i = 0; i < list.length; i++) {",
" File entry = new File(dir, list[i]);",
"",
" if (entry.isDirectory()) {",
" removeDir(entry);",
" } else {",
" assertTrue(entry.getPath(), entry.delete());",
" }",
" }",
" }",
"",
" assertTrue(dir.getPath(), dir.delete());",
" "
]
}
]
}
] |
derby-DERBY-4915-f0f442fb
|
DERBY-4915: test failure in OSReadOnlyTest in assertDirectoryDeleted
Increase sleep time and number of deletion attempts.
Patch file: derby-4915-2a-increased_sleep.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1078608 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-4918-1620a2b9
|
DERBY-4918: Minor refactoring of SPSDescriptor
Minor cleanup, including:
o declare variables final where appropriate
o replace Vector with List (local use, synchronization not needed)
o added/removed synchronize keyword where appropriate
o added/corrected some comments/documentation
Patch file: derby-4918-1a-misc.diff (moved import line in DataDictImpl)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1041192 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"hunks": [
{
"added": [],
"header": "@@ -21,19 +21,10 @@",
"removed": [
"import org.apache.derby.iapi.services.context.ContextManager;",
"",
"import org.apache.derby.iapi.sql.depend.Dependent;",
"import org.apache.derby.iapi.sql.depend.Provider;",
"",
"import org.apache.derby.iapi.sql.PreparedStatement;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.sql.compile.CostEstimate;"
]
},
{
"added": [],
"header": "@@ -47,8 +38,6 @@ import org.apache.derby.iapi.services.uuid.UUIDFactory;",
"removed": [
"import java.util.Properties;",
"import java.util.Vector;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import java.util.List;"
],
"header": "@@ -22,8 +22,8 @@",
"removed": [
"import java.util.Enumeration;",
"import java.util.Vector;"
]
},
{
"added": [],
"header": "@@ -43,7 +43,6 @@ import org.apache.derby.iapi.sql.conn.LanguageConnectionFactory;",
"removed": [
"import org.apache.derby.iapi.sql.depend.ProviderInfo;"
]
},
{
"added": [
" * <LI> SPS_TYPE_TRIGGER - trigger</LI>"
],
"header": "@@ -73,7 +72,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t * <LI> SPS_TYPE_TRIGGER\t- trigger (<B>NOT IMPLEMENTED</B>) </LI>"
]
},
{
"added": [
" private final SchemaDescriptor sd;",
" private final String name;",
" private final UUID compSchemaId;",
" private final char type;",
" private final String text;",
" private final String usingText;",
""
],
"header": "@@ -119,14 +118,15 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tprivate SchemaDescriptor\t\tsd;",
"\tprivate String\t\t\t\t\tname;",
"\tprivate UUID\t\t\t\t\tcompSchemaId;",
"\tprivate char\t\t\t\t\ttype;",
"\tprivate\tString\t\t\t\t\ttext;",
"\tprivate\tString\t\t\t\t\tusingText;"
]
},
{
"added": [
" /**",
" * Compiles this SPS.",
" * <p>",
" * <em>Note:</em> This SPS may still be marked as invalid after this method",
" * has completed, because an invalidation request may have been received",
" * while compiling.",
" *",
" * @param lcc connection",
" * @param triggerTable subject table (may be {@code null})",
" * @param tc transaction controller to use (may be {@code null})",
" * @throws StandardException if something fails",
" */",
" //@GuardedBy(\"this\")"
],
"header": "@@ -303,6 +303,19 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": []
},
{
"added": [],
"header": "@@ -312,9 +325,6 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t\tDependencyManager dm;",
"\t\tProviderInfo[] providerInfo;",
""
]
},
{
"added": [
" // 49 because name consists of (see CreateTriggerConstantAction):",
" // TRIGGER<ACTN|WHEN>_<UUID:36>_<UUID:36>"
],
"header": "@@ -330,6 +340,8 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": []
},
{
"added": [
" DependencyManager dm = dd.getDependencyManager();"
],
"header": "@@ -386,7 +398,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t\t\tdm = dd.getDependencyManager();"
]
},
{
"added": [
" public final String getTypeAsString() {",
" return String.valueOf(type);",
" }"
],
"header": "@@ -457,12 +469,9 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tpublic final String getTypeAsString()",
"\t{",
"\t\tchar[] charArray = new char[1];",
"\t\tcharArray[0] = type;",
"\t\treturn new String(charArray);",
"\t}"
]
},
{
"added": [
" public static boolean validType(char type)"
],
"header": "@@ -480,7 +489,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tpublic final static boolean validType(char type)"
]
},
{
"added": [
" public final String getUsingText()"
],
"header": "@@ -522,7 +531,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tpublic final synchronized String getUsingText()"
]
},
{
"added": [
" public final synchronized UUID getUUID() {"
],
"header": "@@ -542,8 +551,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tpublic final UUID\tgetUUID()",
"\t{"
]
},
{
"added": [
" if (params == null && !lookedUpParams) {",
" List tmpDefaults = new ArrayList();",
" params = getDataDictionary().getSPSParams(this, tmpDefaults);",
" paramDefaults = tmpDefaults.toArray();",
" lookedUpParams = true;",
" }"
],
"header": "@@ -561,19 +569,12 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t\tif (params == null && !lookedUpParams)",
"\t\t{",
"\t\t\tVector v = new Vector();",
"\t\t\tparams = getDataDictionary().getSPSParams(this, v);",
"\t\t\tparamDefaults = new Object[v.size()];\t",
"\t\t\tEnumeration iterator = v.elements();",
"\t\t\tfor (int i = 0; iterator.hasMoreElements(); i++)",
"\t\t\t{",
"\t\t\t\tparamDefaults[i] = iterator.nextElement();",
"\t\t\t}",
"",
"\t\t\tlookedUpParams = true;",
"\t\t}"
]
},
{
"added": [],
"header": "@@ -617,16 +618,6 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\t/**",
"\t * Get the constant action for this statement",
"\t *",
"\t * @return the constant action",
"\t */",
"\t//public final synchronized ConstantAction getConstantAction()",
"\t//{",
"\t//\treturn preparedStatement.getConstantAction();",
"\t//}",
"\t"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;"
],
"header": "@@ -143,13 +143,13 @@ import org.apache.derby.iapi.services.locks.ShExLockable;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
" List tmpDefaults = new ArrayList();",
" spsd.setParams(getSPSParams(spsd, tmpDefaults));",
" Object[] defaults = tmpDefaults.toArray();"
],
"header": "@@ -4110,10 +4110,9 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\tVector v = new Vector();",
"\t\t\tspsd.setParams(getSPSParams(spsd, v));",
"\t\t\tObject[] defaults = new Object[v.size()];",
"\t\t\tv.copyInto(defaults);"
]
},
{
"added": [
" * @param defaults list for storing column defaults",
" public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)",
" throws StandardException"
],
"header": "@@ -4216,14 +4215,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t * @param defaults\tvector for storing column defaults",
"\tpublic DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, Vector defaults)",
"\t\tthrows StandardException"
]
}
]
},
{
"file": "java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package org.apache.derby.impl.storeless;",
"removed": [
"import java.util.Vector;"
]
},
{
"added": [
"\tpublic DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)"
],
"header": "@@ -445,7 +444,7 @@ public class EmptyDictionary implements DataDictionary, ModuleSupportable {",
"removed": [
"\tpublic DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, Vector defaults)"
]
}
]
}
] |
derby-DERBY-4918-6efed4e8
|
DERBY-4918: Minor refactoring of SPSDescriptor
Removed method setUUID, made uuid final.
Patch file: derby-4918-2b-remove-setUUID.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1042048 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
" private final UUID uuid;"
],
"header": "@@ -124,8 +124,8 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": [
"\tprivate UUID\t\t\t\t\tuuid;"
]
},
{
"added": [
" // Added this check when setUUID was removed, see DERBY-4918.",
" if (uuid == null) {",
" throw new IllegalArgumentException(\"UUID is null\");",
" }"
],
"header": "@@ -208,6 +208,10 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -176,11 +176,6 @@ public class SYSSTATEMENTSRowFactory extends CatalogRowFactory",
"removed": [
"\t\t\tif ( uuid == null )",
"\t\t {",
"\t\t\t\tuuid = getUUIDFactory().createUUID();",
"\t\t\t\tspsDescriptor.setUUID(uuid);",
"\t\t\t}"
]
}
]
}
] |
derby-DERBY-4920-16a0f6c6
|
DERBY-4920 suites.All stuck in RAFContainer4.awaitRestoreChannel()
Patch derby-4920-a.
Patch details:
* InterruptStatus.java
Make sure we always catch ShutdownException when we access the context
looking for lcc.
* RAFContainer4.java
Improved some comments, added a final, added a max count for a retry
loop that missed it: will throw FILE_IO_INTERRUPTED if it exceeds
MAX_INTERRUPT_RETRIES (as elsewhere when we give up).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1049150 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/util/InterruptStatus.java",
"hunks": [
{
"added": [
" LanguageConnectionContext lcc = null;",
" try {",
" lcc = (LanguageConnectionContext)ContextService.getContextOrNull(",
" } catch (ShutdownException e) {",
" // Ignore. Can happen when: a) background thread (RawStoreDaemon)",
" // is performing checkpointing and b) a user thread starts shutdown",
" // and interrupts the background thread. During recovery of the",
" // container we get here. DERBY-4920.",
" }",
"",
""
],
"header": "@@ -68,10 +68,19 @@ public class InterruptStatus {",
"removed": [
" LanguageConnectionContext lcc =",
" (LanguageConnectionContext)ContextService.getContextOrNull("
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/RAFContainer4.java",
"hunks": [
{
"added": [
" // In case the recovering thread can't successfully recover the container",
" // for some reason, it will throw, so other waiting threads need to give up",
" // as well."
],
"header": "@@ -104,9 +104,9 @@ class RAFContainer4 extends RAFContainer {",
"removed": [
" // In case the recovering thread can't successfully recover the container,",
" // it will throw, so other waiting threads need to give up as well. This",
" // can happen at shutdown time when interrupts are used to stop threads."
]
},
{
"added": [
" int retries = MAX_INTERRUPT_RETRIES;",
""
],
"header": "@@ -530,6 +530,8 @@ class RAFContainer4 extends RAFContainer {",
"removed": []
},
{
"added": [
" if (retries-- == 0) {",
" throw StandardException.newException(",
" SQLState.FILE_IO_INTERRUPTED);",
" }"
],
"header": "@@ -591,6 +593,10 @@ class RAFContainer4 extends RAFContainer {",
"removed": []
},
{
"added": [
" // see below), we put ourselves back in the IO set of threads:"
],
"header": "@@ -702,7 +708,7 @@ class RAFContainer4 extends RAFContainer {",
"removed": [
" // see below), we put ourselveds back in the IO set of threads:"
]
}
]
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.