id
stringlengths 22
25
| commit_message
stringlengths 137
6.96k
| diffs
listlengths 0
63
|
|---|---|---|
derby-DERBY-6136-5e33d798
|
DERBY-6136: Cleanup RawDBReader; commit derby-6136-02-aa-cleanup.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1716908 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/optional/org/apache/derby/optional/dump/RawDBReader.java",
"hunks": [
{
"added": [
" * in the seg0 subdirectory of a corrupt database."
],
"header": "@@ -42,7 +42,7 @@ import org.apache.derby.tools.dblook;",
"removed": [
" * in the seg0 subdirectory of a database."
]
},
{
"added": [
" * Creates the following schema objects in a healthy database in order",
" * to siphon data out of a corrupt database:",
" * and SYSCOLUMNS in the corrupt database.</li>",
" * <li>A schema for every user schema in the corrupt database.</li>",
" * <li>Table functions and views on every user table in the corrupt database.</li>",
" * In addition, the tool creates a script for siphoning data out of the corrupt"
],
"header": "@@ -76,18 +76,19 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * Creates the following:",
" * and SYSCOLUMNS in the raw database.</li>",
" * <li>A schema for every user schema in the raw database.</li>",
" * <li>Table functions and views on every user table in the raw database..</li>",
" * In addition, the tool creates a script for siphoning data out of the raw"
]
},
{
"added": [
" * created. These include the views on the corrupt database's SYSSCHEMAS, SYSCONGLOMERATES,",
" * to the names of the schemas which are created in the healthy database.",
" * May not be null or empty.</li>",
" * <li>corruptDBLocation (required) - Absolute path to the corrupt database directory.",
" * <li>encryptionAttributes (required) - Encryption attributes which were",
" * used to connect to the corrupt database when it was bootable. May be null",
" * <li>dbo (required) - User name of the owner of the corrupt database. May be null",
" * <li>dboPassword (required) - Password for the owner of the corrupt database. May be null"
],
"header": "@@ -99,17 +100,19 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * created. These include the views on the raw database's SYSSCHEMAS, SYSCONGLOMERATES,",
" * to the names of the local Derby schemas which are created. May not be null or empty.</li>",
" * <li>rawDBLocation (required) - Absolute path to the raw database directory.",
" * <li>encryptionAttributes (required) - Encryption attributes. May be null",
" * <li>dbo (required) - User name of the owner of the raw database. May be null",
" * <li>dboPassword (required) - Password for the owner of the raw database. May be null"
]
},
{
"added": [
" String corruptDBLocation = configurationParameters[ idx++ ];",
" if ( nullOrEmpty( recoveryScript) )",
" { throw badArgs( \"Null or empty recovery script argument.\" ); }",
" if ( nullOrEmpty( controlSchema) )",
" { throw badArgs( \"Null or empty control schema argument.\" ); }",
" if ( nullOrEmpty( schemaPrefix ) )",
" { throw badArgs( \"Null or empty schema prefix argument.\" ); }",
" if ( nullOrEmpty( corruptDBLocation ) )",
" { throw badArgs( \"Null or empty database location argument.\" ); }",
" if ( nullOrEmpty( dbo) )",
" { throw badArgs( \"Null or empty database owner argument.\" ); }",
" createControlSchema( conn, controlSchema, corruptDBLocation,",
" encryptionAttributes, dbo, dboPassword );",
" createUserSchemas( conn, controlSchema, schemaPrefix, corruptDBLocation,",
" encryptionAttributes, dbo, dboPassword );",
" createViews( conn, recoveryScript, controlSchema, schemaPrefix, corruptDBLocation,",
" encryptionAttributes, dbo, dboPassword );"
],
"header": "@@ -123,22 +126,30 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawDBLocation = configurationParameters[ idx++ ];",
" if ( nullOrEmpty( recoveryScript) ) { throw badArgs( \"Null or empty recovery script argument.\" ); }",
" if ( nullOrEmpty( controlSchema) ) { throw badArgs( \"Null or empty control schema argument.\" ); }",
" if ( nullOrEmpty( schemaPrefix ) ) { throw badArgs( \"Null or empty schema prefix argument.\" ); }",
" if ( nullOrEmpty( rawDBLocation ) ) { throw badArgs( \"Null or empty database location argument.\" ); }",
" if ( nullOrEmpty( dbo) ) { throw badArgs( \"Null or empty database owner argument.\" ); }",
" createControlSchema( conn, controlSchema, rawDBLocation, encryptionAttributes, dbo, dboPassword );",
" createUserSchemas( conn, controlSchema, schemaPrefix, rawDBLocation, encryptionAttributes, dbo, dboPassword );",
" createViews( conn, recoveryScript, controlSchema, schemaPrefix, rawDBLocation, encryptionAttributes, dbo, dboPassword );"
]
},
{
"added": [
" * <li>controlSchema (required) - Name of the schema in which loadTool() created control objects",
" * in the healthy database. May not be null or an empty string.</li>",
" * to the names of the schemas which loadTool() created in the healthy",
" * database. May not be null or empty.</li>"
],
"header": "@@ -154,10 +165,11 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * <li>controlSchema (required) - Name of the schema in which control objects were created",
" * by loadTool(). May not be null or an empty string.</li>",
" * to the names of the local Derby schemas which loadTool() created. May not be null or empty.</li>"
]
},
{
"added": [
" if ( nullOrEmpty( controlSchema) )",
" { throw badArgs( \"Null or empty control schema argument.\" ); }",
" if ( nullOrEmpty( schemaPrefix ) )",
" { throw badArgs( \"Null or empty schema prefix argument.\" ); }"
],
"header": "@@ -170,8 +182,10 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" if ( nullOrEmpty( controlSchema) ) { throw badArgs( \"Null or empty control schema argument.\" ); }",
" if ( nullOrEmpty( schemaPrefix ) ) { throw badArgs( \"Null or empty schema prefix argument.\" ); }"
]
},
{
"added": [
" String corruptDBLocation,"
],
"header": "@@ -199,7 +213,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawDBLocation,"
]
},
{
"added": [
" corruptDBLocation,"
],
"header": "@@ -221,7 +235,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawDBLocation,"
]
},
{
"added": [
" corruptDBLocation,"
],
"header": "@@ -233,7 +247,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawDBLocation,"
]
},
{
"added": [
" corruptDBLocation,"
],
"header": "@@ -245,7 +259,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawDBLocation,"
]
},
{
"added": [
" corruptDBLocation,"
],
"header": "@@ -257,7 +271,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawDBLocation,"
]
},
{
"added": [
" * Create a table function and view for a corrupt database table."
],
"header": "@@ -265,7 +279,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * Create a table function and view for a raw database table."
]
},
{
"added": [
" String corruptDBLocation,"
],
"header": "@@ -274,7 +288,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawDBLocation,"
]
},
{
"added": [
" \" '\" + corruptDBLocation + \"',\\n\" +"
],
"header": "@@ -310,7 +324,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" \" '\" + rawDBLocation + \"',\\n\" +"
]
},
{
"added": [
" String corruptDBLocation,"
],
"header": "@@ -329,7 +343,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawDBLocation,"
]
},
{
"added": [
" /** Make the name of a local schema from a prefix and the name of a corrupt schema */",
" private String makeSchemaName( String schemaPrefix, String corruptName )",
" return IdUtil.normalToDelimited( schemaPrefix + corruptName );",
" * Create table functions and views on corrupt user tables. These objects",
" * are created in the healthy database. Write the recovery"
],
"header": "@@ -355,14 +369,15 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" /** Make the name of a local schema from a prefix and a raw name */",
" private String makeSchemaName( String schemaPrefix, String rawName )",
" return IdUtil.normalToDelimited( schemaPrefix + rawName );",
" * Create table functions and views on user tables. Write the recovery"
]
},
{
"added": [
" String corruptDBLocation,"
],
"header": "@@ -371,7 +386,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawDBLocation,"
]
},
{
"added": [
" String corruptSchemaName = null;",
" String corruptTableName = null;",
" String currentCorruptSchemaName = rs.getString( col++ );",
" String currentCorruptTableName = rs.getString( col++ );",
" if ( !currentCorruptSchemaName.equals( corruptSchemaName ) )",
" ( \"create schema \" + IdUtil.normalToDelimited( currentCorruptSchemaName ) + \";\\n\" );",
" String newSchemaName = makeSchemaName( schemaPrefix, currentCorruptSchemaName );",
" String newTableName = IdUtil.normalToDelimited( currentCorruptTableName );"
],
"header": "@@ -406,25 +421,25 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" String rawSchemaName = null;",
" String rawTableName = null;",
" String currentRawSchemaName = rs.getString( col++ );",
" String currentRawTableName = rs.getString( col++ );",
" if ( !currentRawSchemaName.equals( rawSchemaName ) )",
" ( \"create schema \" + IdUtil.normalToDelimited( currentRawSchemaName ) + \";\\n\" );",
" String newSchemaName = makeSchemaName( schemaPrefix, currentRawSchemaName );",
" String newTableName = IdUtil.normalToDelimited( currentRawTableName );"
]
},
{
"added": [
" corruptSchemaName,",
" corruptTableName,",
" corruptDBLocation,"
],
"header": "@@ -435,14 +450,14 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawSchemaName,",
" rawTableName,",
" rawDBLocation,"
]
},
{
"added": [
" corruptSchemaName = currentCorruptSchemaName;",
" corruptTableName = currentCorruptTableName;"
],
"header": "@@ -452,8 +467,8 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawSchemaName = currentRawSchemaName;",
" rawTableName = currentRawTableName;"
]
},
{
"added": [
" corruptSchemaName,",
" corruptTableName,",
" corruptDBLocation,"
],
"header": "@@ -470,14 +485,14 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawSchemaName,",
" rawTableName,",
" rawDBLocation,"
]
},
{
"added": [
" private String normalizeColumnName( String unnormalizedName )"
],
"header": "@@ -490,7 +505,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" private String normalizeColumnName( String raw )"
]
},
{
"added": [
" dblook.addQuotes( unnormalizedName )",
" * Create the table function and view for a single corrupt table.",
" * of the corrupt database into the healthy database.",
" String corruptSchemaName,",
" String corruptTableName,",
" String corruptDBLocation,"
],
"header": "@@ -498,30 +513,30 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" dblook.addQuotes( raw )",
" * Create the table function and view for a single raw table.",
" * of the raw database into the current database.",
" String rawSchemaName,",
" String rawTableName,",
" String rawDBLocation,"
]
},
{
"added": [
" IdUtil.normalToDelimited( corruptSchemaName ) + \".\" +",
" IdUtil.normalToDelimited( corruptTableName );"
],
"header": "@@ -531,8 +546,8 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" IdUtil.normalToDelimited( rawSchemaName ) + \".\" +",
" IdUtil.normalToDelimited( rawTableName );"
]
},
{
"added": [
" corruptDBLocation,"
],
"header": "@@ -550,7 +565,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" rawDBLocation,"
]
},
{
"added": [
" * Drop the table functions and views on the corrupt user tables."
],
"header": "@@ -592,7 +607,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * Drop the table functions and views on user tables."
]
},
{
"added": [
" * Drop the table function and view for a catalog in the",
" * corrupt database."
],
"header": "@@ -627,7 +642,8 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * Drop the table function and view for a raw database catalog."
]
},
{
"added": [
" * on conglomerates in the corrupt database."
],
"header": "@@ -645,7 +661,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * on raw conglomerates."
]
},
{
"added": [
" * corrupt core conglomerates."
],
"header": "@@ -676,7 +692,7 @@ public\tclass RawDBReader implements OptionalTool",
"removed": [
" * raw external core conglomerates."
]
}
]
}
] |
derby-DERBY-6137-2684c772
|
DERBY-6137: Cleanup cache manager usage by SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466522 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
" SequenceUpdater sequenceUpdater = null;",
"",
" try {",
" sequenceUpdater = (SequenceUpdater) sequenceGeneratorCache.find( uuid );",
" return sequenceUpdater.peekAtCurrentValue();",
" }",
" finally",
" {",
" if ( sequenceUpdater != null )",
" {",
" sequenceGeneratorCache.release( sequenceUpdater );",
" }",
" }"
],
"header": "@@ -10505,7 +10505,19 @@ public final class\tDataDictionaryImpl",
"removed": [
" return ((SequenceUpdater) sequenceGeneratorCache.find( uuid )).peekAtCurrentValue();"
]
}
]
}
] |
derby-DERBY-6137-fac3fe7b
|
DERBY-6137: Don't clear the sequence cache during most DDL write operations.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466481 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\t// Until we implement ALTER SEQUENCE, there should be no need",
" // to clear the sequence cache. Always clearing the sequence cache",
" // here gives rise to DERBY-6137.",
"\t\t\t\t\t\tclearCaches( false );"
],
"header": "@@ -1310,8 +1310,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t/* Clear out all the caches */",
"\t\t\t\t\t\tclearCaches();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/DropSequenceConstantAction.java",
"hunks": [
{
"added": [
" dd.clearSequenceCaches();"
],
"header": "@@ -91,6 +91,7 @@ class DropSequenceConstantAction extends DDLConstantAction {",
"removed": []
}
]
}
] |
derby-DERBY-614-41f1df99
|
DERBY-614 Execution failed because of a Distributed Protocol Error
Fixes the split logic when data passes the blksize boundary.
Details of the fix are in spec.html attached to DERBY-614
Contributed by Bryan Pendleton
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@355689 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java",
"hunks": [
{
"added": [
"\t * If the client is not using rowset processing, this routine attempts",
"\t * to pack as much data into the QRYDTA as it can. This may result in",
"\t * splitting the last row across the block, in which case when the",
"\t * client calls CNTQRY we will return the remainder of the row.",
"\t *",
"\t * Splitting a QRYDTA block is expensive, for several reasons:",
"\t * - extra logic must be run, on both client and server side",
"\t * - more network round-trips are involved",
"\t * - the QRYDTA block which contains the continuation of the split",
"\t * row is generally wasteful, since it contains the remainder of",
"\t * the split row but no additional rows.",
"\t * Since splitting is expensive, the server makes some attempt to",
"\t * avoid it. Currently, the server's algorithm for this is to",
"\t * compute the length of the current row, and to stop trying to pack",
"\t * more rows into this buffer if another row of that length would",
"\t * not fit. However, since rows can vary substantially in length,",
"\t * this algorithm is often ineffective at preventing splits. For",
"\t * example, if a short row near the end of the buffer is then",
"\t * followed by a long row, that long row will be split. It is possible",
"\t * to improve this algorithm substantially:",
"\t * - instead of just using the length of the previous row as a guide",
"\t * for whether to attempt packing another row in, use some sort of",
"\t * overall average row size computed over multiple rows (e.g., all",
"\t * the rows we've placed into this QRYDTA block, or all the rows",
"\t * we've process for this result set)",
"\t * - when we discover that the next row will not fit, rather than",
"\t * splitting the row across QRYDTA blocks, if it is relatively",
"\t * small, we could just hold the entire row in a buffer to place",
"\t * it entirely into the next QRYDTA block, or reset the result",
"\t * set cursor back one row to \"unread\" this row.",
"\t * - when splitting a row across QRYDTA blocks, we tend to copy",
"\t * data around multiple times. Careful coding could remove some",
"\t * of these copies.",
"\t * However, it is important not to over-complicate this code: it is",
"\t * better to be correct than to be efficient, and there have been",
"\t * several bugs in the split logic already.",
"\t *"
],
"header": "@@ -5851,7 +5851,43 @@ public class DRDAConnThread extends Thread {",
"removed": [
"\t * returns true if there is more data, false if we reached the end"
]
},
{
"added": [
"\t\t// Check to see if there was leftover data from splitting",
"\t\t// the previous QRYDTA for this result set. If there was, and",
"\t\t// if we have now sent all of it, send any EXTDTA for that row",
"\t\t// and increment the rowCount which we failed to increment in",
"\t\t// writeFDODTA when we realized the row needed to be split.",
"\t\tif (processLeftoverQRYDTA(stmt))",
"\t\t{",
"\t\t\tif (stmt.getSplitQRYDTA() == null)",
"\t\t\t{",
"\t\t\t\tstmt.rowCount += 1;",
"\t\t\t\tif (stmt.getExtDtaObjects() != null)",
"\t\t\t\t\twriteEXTDTA(stmt);",
"\t\t\t}",
"\t\t\treturn;",
"\t\t}",
"\t\t\tif (stmt.getExtDtaObjects() != null &&",
"\t\t\t\t\tstmt.getSplitQRYDTA() == null)"
],
"header": "@@ -5870,13 +5906,29 @@ public class DRDAConnThread extends Thread {",
"removed": [
"\t\t\tif (stmt.getExtDtaObjects() != null)"
]
},
{
"added": [
"\t/**",
"\t * This routine places some data into the current QRYDTA block using",
"\t * FDODTA (Formatted Data Object DaTA rules).",
"\t *",
"\t * There are 3 basic types of processing flow for this routine:",
"\t * - In normal non-rowset, non-scrollable cursor flow, this routine",
"\t * places a single row into the QRYDTA block and returns TRUE,",
"\t * indicating that the caller can call us back to place another",
"\t * row into the result set if he wishes. (The caller may need to",
"\t * send Externalized Data, which would be a reason for him NOT to",
"\t * place any more rows into the QRYDTA).",
"\t * - In ROWSET processing, this routine places an entire ROWSET of",
"\t * rows into the QRYDTA block and returns FALSE, indicating that",
"\t * the QRYDTA block is full and should now be sent.",
"\t * - In callable statement processing, this routine places the",
"\t * results from the output parameters of the called procedure into",
"\t * the QRYDTA block. This code path is really dramatically",
"\t * different from the other two paths and shares only a very small",
"\t * amount of common code in this routine.",
"\t *",
"\t * In all cases, it is possible that the data we wish to return may",
"\t * not fit into the QRYDTA block, in which case we call splitQRYDTA",
"\t * to split the data and remember the remainder data in the result set.",
"\t * Splitting the data is relatively rare in the normal cursor case,",
"\t * because our caller (writeQRYDTA) uses a coarse estimation",
"\t * technique to avoid calling us if he thinks a split is likely.",
"\t *",
"\t * The overall structure of this routine is implemented as two",
"\t * loops:",
"\t * - the outer \"do ... while ... \" loop processes a ROWSET, one row",
"\t * at a time. For non-ROWSET cursors, and for callable statements,",
"\t * this loop executes only once.",
"\t * - the inner \"for ... i < numCols ...\" loop processes each column",
"\t * in the current row, or each output parmeter in the procedure.",
"\t *",
"\t * Most column data is written directly inline in the QRYDTA block.",
"\t * Some data, however, is written as Externalized Data. This is",
"\t * commonly used for Large Objects. In that case, an Externalized",
"\t * Data Pointer is written into the QRYDTA block, and the actual",
"\t * data flows in separate EXTDTA blocks which are returned",
"\t * after this QRYDTA block.",
"\t */"
],
"header": "@@ -5910,6 +5962,48 @@ public class DRDAConnThread extends Thread {",
"removed": []
},
{
"added": [
"\t\t\t\treturn false;"
],
"header": "@@ -6079,7 +6173,7 @@ public class DRDAConnThread extends Thread {",
"removed": [
"\t\t\t\tmoreData = false;"
]
},
{
"added": [
"\t * This routine is called if the QRYDTA data will not fit. It writes",
"\t * as much data as it can, then stores the remainder in the result",
"\t * set. At some later point, when the client returns with a CNTQRY,",
"\t * we will call processLeftoverQRYDTA to handle that data.",
"\t *"
],
"header": "@@ -6116,6 +6210,11 @@ public class DRDAConnThread extends Thread {",
"removed": []
}
]
},
{
"file": "java/drda/org/apache/derby/impl/drda/DRDAResultSet.java",
"hunks": [
{
"added": [
"\t// splitQRYDTA is normally null. If it is non-null, it means that",
"\t// the last QRYDTA response which was sent for this statement was",
"\t// split according to the LMTBLKPRC protocol, and this array contains",
"\t// the bytes that didn't fit. These bytes should be the first bytes",
"\t// emitted in the next QRYDTA response to a CNTQRY request.",
"\tprivate byte []splitQRYDTA;",
""
],
"header": "@@ -82,6 +82,13 @@ class DRDAResultSet",
"removed": []
},
{
"added": [
"\tpublic void setSplitQRYDTA(byte []data)",
"\t{",
"\t\tsplitQRYDTA = data;",
"\t}",
"\tpublic byte[]getSplitQRYDTA()",
"\t{",
"\t\treturn splitQRYDTA;",
"\t}",
""
],
"header": "@@ -127,6 +134,15 @@ class DRDAResultSet",
"removed": []
}
]
}
] |
derby-DERBY-614-505bb8a1
|
DERBY-1533: ArrayIndexOutOfBoundsException in DDMReader
DERBY-1533 follows in a series of bugs (DERBY-170, DERBY-428, DERBY-491,
DERBY-492, DERBY-614 among others) which have to do with the particulars of
the DRDA protocols used for handling long messages and large amounts of data.
In this particular issue, the problems involve the situation in which the
server is receiving a message which is segmented across multiple layer A
blocks using DSS continuations. This is a relatively unusual case, as
generally large amounts of data flow from the server to the client, not vice
versa.
This change contains two modifications to DDMReader, as well as some tests:
1) The Network Server method DDMReader.compressBLayerData was incorrect in
several respects. Rather than going through that code in detail, I noticed
that an almost identical version of this routine exists in the DerbyNetClient,
in the class Reply, and I am pretty confident that the client side code is
working, so I just wholesale modified the server's compressBLayerData method
so that it matched the client's method.
2) When the client is sending parameter data to the server, and the data to be
sent is a large array of bytes for a blob, the client, the client may send the
data inline as DRDA_TYPE_NVARBYTE, or it may externalize the data and send it
as DRDA_TYPE_NLOBBYTES. I believe that similar things happen with CLOB.
The client makes this decision based on the length of the data to be sent;
short values are sent inline, and long values are sent externalized.
When the server receives the data, it must decide whether it is reading an
inline string of bytes, or externalized data, and it, too, makes this decision
based on the length of the data. However, the server's code for this was
comparing the length of the byte string against the amount of data left in the
current segment, as opposed to comparing it against the constant threshold
value for switching from inline bytes to externalized bytes; hence if a long
byte string happened to start late in a buffer, and was then segmented
(continued) into a subsequent buffer, the server would mistakenly think the
byte string was being sent as externalized bytes, when in fact it was sent as
inline bytes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@430077 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/drda/org/apache/derby/impl/drda/DDMReader.java",
"hunks": [
{
"added": [
"\t\tif (length < DssConstants.MAX_DSS_LENGTH)"
],
"header": "@@ -1321,7 +1321,7 @@ class DDMReader",
"removed": [
"\t\tif (length < dssLength)"
]
}
]
}
] |
derby-DERBY-614-6bfbcd6d
|
DERBY-614 patch 2 - clear splitQRYTDA field for reuse of the resultset
Bryan said ..
With my first patch to this bug, I introduced a problem in this processing; the
splitQRYDTA field was not cleared when the statement was closed. This meant that
if that splitQRYDTA field just happened to have some pending query data from the
previous statement at the point where it was re-used, the pending query data would
erroneously stick around and be returned as the first result for the new statement.
Contributed by Bryan Pendleton
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@378552 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6144-afbc4ba9
|
DERBY-6144 nightly regression test failure, intermittent error : testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.A
test was asserting that stats had to be created after "now". I think the
nightly was getting a case where the time was the same. DERBY-5046 fixed
a different part to the same test to check for greater than now, so implemented
that same fix at the offending line. Also added some text to be printed with
the variable values if it happens again.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467011 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6146-dfb19f24
|
DERBY-6146 testMultipleLastKeyWaitsInMaxScan(org.apache.derbyTesting.functionTests.tests.store.IndexSplitDeadlockTest)junit.framework.AssertionFailedError: Column value mismatch @ column '1',
Check that locks have been taken as expected instead of always just waiting one second to avoid intermittent failure
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1526569 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6147-7fc16c3f
|
DERBY-6147: ClosedObjectTest fails on the 10.9 branch when running on Java 8
Skip testing of JDBC methods that have not been implemented.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464367 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6148-9f0dc0eb
|
DERBY-6148 Wrong sort elimination when using permuted sort order
Patch derby-6148-3. Adds lacking use of join order index map into
optimizableList in method OrderByList#sortRequired. Also adds
regression tests for previously failing (and a some good) queries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1485938 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java",
"hunks": [
{
"added": [
"import java.util.Arrays;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java",
"hunks": [
{
"added": [
" * Enforcement of ordering dependencies is done through",
" * assignedTableMap.",
" */"
],
"header": "@@ -82,7 +82,9 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t */"
]
},
{
"added": [
" // when we \"pull\" [1] it. If the latest complete join order was the",
" //",
" // [1]: As part of the iteration through the join orders, the optimizer has",
" // to \"pull\" Optimizables from the the join order before re-placing them in",
" // a different order. As an example, in order to get from:",
" //",
" // { HOJ, TAB_V, TAB_D } to",
" //",
" // { HOJ, TAB_D, TAB_V}",
" //",
" // the optimizer will first pull TAB_D from the join order, then",
" // it will pull TAB_V, then it will place TAB_D, and finally place",
" // TAB_V. I.e.:",
" //",
" // { HOJ, TAB_V, - }",
" // { HOJ, -, - }",
" // { HOJ, TAB_D, - }",
" // { HOJ, TAB_D, TAB_V }",
""
],
"header": "@@ -139,11 +141,29 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t// when we \"pull\" it. If the latest complete join order was the"
]
},
{
"added": [
" bestRowOrdering,",
" optimizableList,",
" proposedJoinOrder) ==",
" RequiredRowOrdering.NOTHING_REQUIRED)"
],
"header": "@@ -1765,8 +1785,10 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\t\tbestRowOrdering, optimizableList) == ",
"\t\t\t\t\t\t\t\tRequiredRowOrdering.NOTHING_REQUIRED)"
]
},
{
"added": [
" assignedTableMap,",
" optimizableList,",
" proposedJoinOrder)"
],
"header": "@@ -2208,8 +2230,9 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\t\t\t\t\t\t\t\t\tassignedTableMap,",
"\t\t\t\t\t\t\t\t\t\t\t\t\t\toptimizableList)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrderByList.java",
"hunks": [
{
"added": [
" /**",
" * @see RequiredRowOrdering#sortRequired(RowOrdering, OptimizableList, int[])",
" *",
" * @exception StandardException Thrown on error",
" */",
" public int sortRequired(",
" RowOrdering rowOrdering,",
" OptimizableList optimizableList,",
" int[] proposedJoinOrder) throws StandardException",
" {",
" return sortRequired(rowOrdering,",
" (JBitSet)null,",
" optimizableList,",
" proposedJoinOrder);",
" }",
" /**",
" * @see RequiredRowOrdering#sortRequired(RowOrdering, JBitSet, OptimizableList, int[])",
" *",
" * @exception StandardException Thrown on error",
" */",
" public int sortRequired(",
" RowOrdering rowOrdering,",
" JBitSet tableMap,",
" OptimizableList optimizableList,",
" int[] proposedJoinOrder) throws StandardException",
" {"
],
"header": "@@ -425,27 +425,33 @@ public class OrderByList extends OrderedColumnList",
"removed": [
"\t/**",
"\t * @see RequiredRowOrdering#sortRequired",
"\t *",
"\t * @exception StandardException\t\tThrown on error",
"\t */",
"\tpublic int sortRequired(RowOrdering rowOrdering,",
"\t\t\tOptimizableList optimizableList) throws StandardException",
"\t{",
"\t\treturn sortRequired(rowOrdering, (JBitSet) null, optimizableList);",
"\t}",
"\t/**",
"\t * @see RequiredRowOrdering#sortRequired",
"\t *",
"\t * @exception StandardException\t\tThrown on error",
"\t */",
"\tpublic int sortRequired(RowOrdering rowOrdering, ",
"\t\t\tJBitSet tableMap,",
"\t\t\tOptimizableList optimizableList)",
"\t\t\t\tthrows StandardException",
"\t{"
]
}
]
}
] |
derby-DERBY-615-1093b6d4
|
DERBY-615 In unit tests use System.setProperty() instead of System.getProperties().put()
to set system properties. Means more specific permissions can be granted in the policy file.
Disable testsqldecimal from running with the security manager due to DERBY-616.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@329310 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java",
"hunks": [
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));"
],
"header": "@@ -507,7 +507,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));"
],
"header": "@@ -642,7 +642,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, \"200\");"
],
"header": "@@ -1055,7 +1055,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, \"200\");"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));"
],
"header": "@@ -1267,7 +1267,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));"
],
"header": "@@ -1408,7 +1408,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2) + 16));"
],
"header": "@@ -1547,7 +1547,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2) + 16));"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java",
"hunks": [
{
"added": [
"\t\t\t\t\tSystem.setProperty(LogToFile.TEST_RECORD_TO_FILL_LOG, \"10\");"
],
"header": "@@ -241,7 +241,7 @@ public class T_RecoverFullLog extends T_Generic {",
"removed": [
"\t\t\t\t\tSystem.getProperties().put(LogToFile.TEST_RECORD_TO_FILL_LOG, \"10\");"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java",
"hunks": [
{
"added": [
"\t\tSystem.setProperty(\"derby.storage.sortBufferMax\", buf_length);"
],
"header": "@@ -67,9 +67,7 @@ public class T_SortController extends T_Generic",
"removed": [
"\t\tProperties p = System.getProperties();",
"\t\tp.put(\"derby.storage.sortBufferMax\", buf_length);",
"\t\tSystem.setProperties(p);"
]
}
]
}
] |
derby-DERBY-615-261cb847
|
DERBY-615 Change the test harness to run tests with a security manager
by default, using the same mechanism as used to install a security manager
for the separate network server process.
The security manager is not installed when any of the following are true:
noSecurityManager=true is in the <testname>_app.properties file
JCC (DB2 Universal Driver) is the JDBC client - this is a short term restriction.
Tests where useProcess=false, e.g. nist suite - this is a short term restriction.
Update the policy file to allow most remaining tests to run using a security manager.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@326736 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-615-9ce0e0f8
|
DERBY-615 Enable the T_Cipher* and T_SortController tests under the SecurityManager.
Add comments (bug numbers) for why lang.dcl and jdbcapi/secureUsers1 are not runnable
under the SecurityManager.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@371664 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/unitTests/crypto/T_Cipher.java",
"hunks": [
{
"added": [
"import java.security.AccessController;",
"import java.security.PrivilegedAction;",
"import java.security.PrivilegedExceptionAction;",
"import java.io.FileNotFoundException;"
],
"header": "@@ -31,9 +31,13 @@ import org.apache.derby.iapi.db.PropertyInfo;",
"removed": []
},
{
"added": [
"\tString testProvider = ",
"\t\t",
" \t(String) AccessController.doPrivileged(new PrivilegedAction() {",
"\t\t public Object run() {",
"\t\t \treturn System.getProperty(\"testEncryptionProvider\");",
"\t\t }",
"\t });",
"\t"
],
"header": "@@ -97,7 +101,14 @@ public class T_Cipher extends T_Generic",
"removed": [
"\tString testProvider = System.getProperty(\"testEncryptionProvider\");"
]
},
{
"added": [
"\t\tdeleteFile(testFile);"
],
"header": "@@ -108,19 +119,12 @@ public class T_Cipher extends T_Generic",
"removed": [
"\t\tif (testFile.exists())",
"\t\t\ttestFile.delete();",
"\t\t\t\t\t\t\t",
"\t\t\t//if external input output files dir does not exist ,create one",
"\t\t\tFile ifdir = new File(\"extinout\");",
"\t\t\tif(!ifdir.exists())",
"\t\t\t\tifdir.mkdirs();",
""
]
},
{
"added": [],
"header": "@@ -179,50 +183,6 @@ public class T_Cipher extends T_Generic",
"removed": [
"",
"\t\t\t// test streaming",
"\t\t\tFile streamFile = new File(\"extinout/T_CipherStream.data\");",
"\t\t\tif (streamFile.exists())",
"\t\t\t\tstreamFile.delete();",
"",
"\t\t\t// RESOLVE: defectId 1834",
"\t\t\tif (false)",
"\t\t\t{",
"/*\t\t\t\tOutputStream enOutputStream =",
"\t\t\t\t\tfactory.createNewCipherOutputStream(",
"\t\t\t\t\t\tnew FileOutputStream(streamFile), factory.ENCRYPT, secretKey, IV);",
"",
"\t\t\t\tint encryptLength = patternLength; // make it a length that is",
"\t\t\t\t\t\t\t\t\t\t\t\t // not on 8 bytes boundary",
"\t\t\t\tenOutputStream.write(pattern, 0, encryptLength);",
"\t\t\t\tenOutputStream.write(pattern, 0, 3); // write a couple of bytes of",
"\t\t\t\t\t\t\t\t\t\t\t\t // garbage at the end",
"\t\t\t\tenOutputStream.close();",
"\t\t\t\tenOutputStream = null;",
"",
"\t\t\t\tInputStream inStream = new FileInputStream(streamFile);",
"\t\t\t\tbyte[] check = new byte[encryptLength + 100];",
"\t\t\t\tint r = inStream.read(check);",
"\t\t\t\tinStream.close();",
"\t\t\t\tREPORT(\"Stream of \" + encryptLength + \" is encrypted into \" + r + \" length\");",
"\t\t\t\tif (byteArrayIdentical(check, pattern, 0, encryptLength))",
"\t\t\t\t\tthrow T_Fail.testFailMsg(\"encryption stream did not encrypt\");",
"",
"\t\t\t\tInputStream deInputStream =",
"\t\t\t\t\tfactory.createNewCipherInputStream(",
"\t\t\t\t\t\tnew FileInputStream(streamFile), factory.DECRYPT, secretKey, IV);",
"",
"\t\t\t\tint totalRead = 0;",
"\t\t\t\twhile((r = deInputStream.read(check, totalRead, check.length-totalRead)) != -1)",
"\t\t\t\t\ttotalRead += r;",
"",
"\t\t\t\tif (totalRead != encryptLength)",
"\t\t\t\t\tthrow T_Fail.testFailMsg(\"decrypted stream is \" + totalRead + \" is not the same length\");",
"\t\t\t\tif (byteArrayIdentical(check, pattern, 0, encryptLength) == false)",
"\t\t\t\t\tthrow T_Fail.testFailMsg(\"decryption stream did not decrypt\");",
"\t\t\t\tdeInputStream.close();",
"*/",
"\t\t\t}"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java",
"hunks": [
{
"added": [
"import java.security.AccessController;",
"import java.security.PrivilegedAction;"
],
"header": "@@ -43,6 +43,8 @@ import org.apache.derby.iapi.reference.SQLState;",
"removed": []
},
{
"added": [
"\tprivate void setSortBufferSize(final String buf_length) {",
" \tAccessController.doPrivileged(new PrivilegedAction() {",
"\t\t public Object run() {",
"\t\t \tSystem.setProperty(\"derby.storage.sortBufferMax\", buf_length);",
"\t\t \treturn null;",
"\t\t }",
"\t });"
],
"header": "@@ -66,8 +68,13 @@ public class T_SortController extends T_Generic",
"removed": [
"\tprivate void setSortBufferSize(String buf_length) {",
"\t\tSystem.setProperty(\"derby.storage.sortBufferMax\", buf_length);"
]
}
]
}
] |
derby-DERBY-615-cac35cab
|
DERBY-615 Switch to a security manager policy file with permissions set on a per-jar
basis for improved testing under a security manager. First step in running all tests
under a security manager. This policy file replaces the nwsvr.policy file and currently
is used in the same way, for tests that invoke a separate JVM for the network server.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@320762 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java",
"hunks": [
{
"added": [
"\tprivate static String DEFAULT_POLICY=\"util/derby_tests.policy\";"
],
"header": "@@ -108,7 +108,7 @@ public abstract class jvm {",
"removed": [
"\tprivate static String DEFAULT_POLICY=\"util/nwsvr.policy\";"
]
},
{
"added": [
"\tprotected static String findCodeBase(boolean[] isJar)"
],
"header": "@@ -294,7 +294,7 @@ public abstract class jvm {",
"removed": [
"\tprotected static String findCodeBase()"
]
},
{
"added": [
"\t\t\t\tisJar[0] = true;",
"\t\t\t{",
"\t\t\t\tisJar[0] = false;",
"\t\t\t}"
],
"header": "@@ -306,11 +306,15 @@ public abstract class jvm {",
"removed": []
},
{
"added": [
"\t\tboolean[] isJar = new boolean[1];",
"\t\t\tserverCodeBase = findCodeBase(isJar);",
"\t\t",
"\t\tFile pf = new File(policyFile);",
"\t\tFile cb = new File(serverCodeBase);",
"\t\t\t(!pf.exists()))"
],
"header": "@@ -333,18 +337,21 @@ public abstract class jvm {",
"removed": [
"\t\t\tserverCodeBase = findCodeBase();",
"\t\t\t(!(new File(policyFile)).exists()) ||",
"\t\t\t!(new File(policyFile)).exists())"
]
}
]
}
] |
derby-DERBY-615-f32e51e1
|
DERBY-615 Make RunTest install a SecurityManager when using useprocess=false.
Add a utility SQL test function to indicate if a SecurityManager is installed.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@365776 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java",
"hunks": [
{
"added": [
"import java.io.IOException;",
""
],
"header": "@@ -23,6 +23,8 @@ package org.apache.derbyTesting.functionTests.harness;",
"removed": []
},
{
"added": [
"\t{\t\t",
"\t\tD = jvm.getSecurityProps(D);",
"\t\t",
"\t}",
"\t",
"\tstatic Vector getSecurityProps(Vector D) throws ClassNotFoundException, IOException",
"\t\tif (D == null)",
"\t\t\tD = new Vector();"
],
"header": "@@ -324,9 +326,15 @@ public abstract class jvm {",
"removed": [
"\t\tif (this.D == null)",
"\t\t\tthis.D = new Vector();"
]
},
{
"added": [
"\t\treturn D;",
"\t\tD.addElement(\"java.security.manager\");",
"\t\tD.addElement(\"java.security.policy=\" + pf.getAbsolutePath());",
"\t\tD.addElement(codebaseType + \"=\" + cb.toURL());",
"\t\tD.addElement(\"csinfo.codedir=\" + cb.getAbsolutePath());",
"\t\tD.addElement(\"csinfo.serverhost=\" + hostName);",
"\t\tD.addElement(\"csinfo.trustedhost=\" + hostName);\t ",
"\t\tD.addElement(unusedType + \"=file://unused/\");",
"\t\t",
"\t\treturn D;"
],
"header": "@@ -358,27 +366,29 @@ public abstract class jvm {",
"removed": [
"\t\treturn;",
"\t\tthis.D.addElement(\"java.security.manager\");",
"\t\tthis.D.addElement(\"java.security.policy=\" + policyFile);",
"\t\tthis.D.addElement(codebaseType + \"=\" + cb.toURL());",
"\t\tthis.D.addElement(\"csinfo.codedir=\" + cb.getAbsolutePath());",
"\t\tthis.D.addElement(\"csinfo.serverhost=\" + hostName);",
"\t\tthis.D.addElement(\"csinfo.trustedhost=\" + hostName);\t ",
"\t\tthis.D.addElement(unusedType + \"=file://unused/\");"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/TestRoutines.java",
"hunks": [
{
"added": [
"\t\ts.execute(\"CREATE FUNCTION TESTROUTINE.HAS_SECURITY_MANAGER() RETURNS INT NO SQL EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.TestRoutines.hasSecurityManager' language java parameter style java\");",
""
],
"header": "@@ -64,6 +64,8 @@ public class TestRoutines {",
"removed": []
}
]
}
] |
derby-DERBY-6150-c61e6e82
|
DERBY-6150 Add automatic cleanup of connections opened with openDefaultConnection()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465187 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6151-fe1ac60a
|
DERBY-6151: Preserve the SQLWarnings raised by table functions.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464934 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java",
"hunks": [
{
"added": [
"import java.sql.SQLWarning;"
],
"header": "@@ -60,6 +60,7 @@ import org.apache.derby.vti.Restriction;",
"removed": []
}
]
}
] |
derby-DERBY-6154-0e593faf
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468229 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6154-1958f1bb
|
DERBY-6154
backing out change #1468229. test worked when run standalone but changes
did not work when test was run as full suite.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468307 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6154-8f1a708d
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
This change adds non-order by test runs based on the
testPositionAgressive() test case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469000 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6154-ca9270d8
|
DERBY-6154 add non-order by cases to the BlobClob4BlobTest
While debugging DERBY-6092 it was noted that some other code
paths could be exercised by adding non order by queries to
one of the test cases. This change just reruns one of the
test cases with order by queries and then again with non-order by
queries.
This change adds non-order by test runs based on the
testTriggersWithClobColumn() test case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468661 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-616-1093b6d4
|
DERBY-615 In unit tests use System.setProperty() instead of System.getProperties().put()
to set system properties. Means more specific permissions can be granted in the policy file.
Disable testsqldecimal from running with the security manager due to DERBY-616.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@329310 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java",
"hunks": [
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));"
],
"header": "@@ -507,7 +507,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));"
],
"header": "@@ -642,7 +642,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, \"200\");"
],
"header": "@@ -1055,7 +1055,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, \"200\");"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));"
],
"header": "@@ -1267,7 +1267,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));"
],
"header": "@@ -1408,7 +1408,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));"
]
},
{
"added": [
"\t\t\t\tSystem.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2) + 16));"
],
"header": "@@ -1547,7 +1547,7 @@ public class T_RecoverBadLog extends T_Generic {",
"removed": [
"\t\t\t\tSystem.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2) + 16));"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java",
"hunks": [
{
"added": [
"\t\t\t\t\tSystem.setProperty(LogToFile.TEST_RECORD_TO_FILL_LOG, \"10\");"
],
"header": "@@ -241,7 +241,7 @@ public class T_RecoverFullLog extends T_Generic {",
"removed": [
"\t\t\t\t\tSystem.getProperties().put(LogToFile.TEST_RECORD_TO_FILL_LOG, \"10\");"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java",
"hunks": [
{
"added": [
"\t\tSystem.setProperty(\"derby.storage.sortBufferMax\", buf_length);"
],
"header": "@@ -67,9 +67,7 @@ public class T_SortController extends T_Generic",
"removed": [
"\t\tProperties p = System.getProperties();",
"\t\tp.put(\"derby.storage.sortBufferMax\", buf_length);",
"\t\tSystem.setProperties(p);"
]
}
]
}
] |
derby-DERBY-616-20445e3c
|
DERBY-616, committing on behalf of Suresh Thalamati
- Added a missing privileged blocks for I/O call in StreamFileContainer.java ,
this class is used by the sort during index creation ..etc.
-- Enabled some of the tests which were not running under security manager
earlier because of this bug to run by default with security manager.
-- removed the additional permissions from the derby test policy file
that were added earlier to avoid this bug for some test cases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@384282 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/StreamFileContainer.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -57,6 +57,7 @@ import org.apache.derby.iapi.services.io.CompressedNumber;",
"removed": []
},
{
"added": [
"import java.security.AccessController;",
"import java.security.PrivilegedExceptionAction;",
"import java.security.PrivilegedActionException;",
"import java.io.FileNotFoundException;"
],
"header": "@@ -66,6 +67,10 @@ import java.io.IOException;",
"removed": []
},
{
"added": [
"public class StreamFileContainer implements TypedFormat, PrivilegedExceptionAction"
],
"header": "@@ -84,7 +89,7 @@ import java.io.Externalizable;",
"removed": [
"public class StreamFileContainer implements TypedFormat"
]
},
{
"added": [
"",
" /* privileged actions */",
" private static final int STORAGE_FILE_EXISTS_ACTION = 1;",
" private static final int STORAGE_FILE_DELETE_ACTION = 2;",
" private static final int STORAGE_FILE_MKDIRS_ACTION = 3;",
" private static final int STORAGE_FILE_GET_OUTPUT_STREAM_ACTION = 4;",
" private static final int STORAGE_FILE_GET_INPUT_STREAM_ACTION = 5;",
" private int actionCode;",
" private StorageFile actionStorageFile;",
"",
""
],
"header": "@@ -138,6 +143,17 @@ public class StreamFileContainer implements TypedFormat",
"removed": []
},
{
"added": [
" if (privExists(file)) "
],
"header": "@@ -179,7 +195,7 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
" if (file.exists()) "
]
},
{
"added": [
" if (!privExists(file))",
"\t\t\t\tfileIn = privGetInputStream(file);"
],
"header": "@@ -226,14 +242,14 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
" if (!file.exists())",
"\t\t\t\tfileIn = file.getInputStream();"
]
},
{
"added": [
"\t\t\tfileOut = privGetOutputStream(file);"
],
"header": "@@ -459,7 +475,7 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
"\t\t\tfileOut = file.getOutputStream();"
]
},
{
"added": [
" if (privExists(file))",
" return privDelete(file);"
],
"header": "@@ -966,9 +982,9 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
" if (file.exists())",
" return file.delete();"
]
},
{
"added": [
"\t\t\tif (!privExists(container)) "
],
"header": "@@ -1005,7 +1021,7 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
"\t\t\tif (!container.exists()) "
]
},
{
"added": [
"\t\t\t\tif (!privExists(directory)) ",
"\t\t\t\t\t\tif (!privExists(directory)) ",
"\t\t\t\t\t\t\tif (!privMkdirs(directory)) "
],
"header": "@@ -1013,14 +1029,14 @@ public class StreamFileContainer implements TypedFormat",
"removed": [
"\t\t\t\tif (!directory.exists()) ",
"\t\t\t\t\t\tif (!directory.exists()) ",
"\t\t\t\t\t\t\tif (!directory.mkdirs()) "
]
}
]
}
] |
derby-DERBY-6161-ec69f5f3
|
DERBY-6161: Simplify code that handles LOB files
- remove EncryptedLOBFile.close() and let it inherit from super class
- move code that doesn't need privileges out of privileged block in
LOBStreamControl.init()
- remove unnecessary exception handling in privileged block in
LOBStreamControl.deleteFile()
- fix typos and misformatted @throws clauses in javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466503 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/EncryptedLOBFile.java",
"hunks": [
{
"added": [
" * @throws StandardException if error occurred during encryption/decryption"
],
"header": "@@ -130,7 +130,7 @@ class EncryptedLOBFile extends LOBFile {",
"removed": [
" * @throws StandardException if error occured during encryption/decryption"
]
},
{
"added": [
" * @throws StandardException if error occurred during encryption/decryption"
],
"header": "@@ -174,7 +174,7 @@ class EncryptedLOBFile extends LOBFile {",
"removed": [
" * @throws StandardException if error occured during encryption/decryption"
]
},
{
"added": [
" * @throws StandardException if error occurred during encryption/decryption",
" * @throws StandardException if error occurred during decryption"
],
"header": "@@ -248,25 +248,17 @@ class EncryptedLOBFile extends LOBFile {",
"removed": [
" * @throws StandardException if error occured during encryption/decryption",
" /**",
" * closes the file.",
" * @throws IOException",
" */",
" void close() throws IOException {",
" super.close();",
" }",
"",
" * @throws StandardException if error occured during encryption/decryption"
]
},
{
"added": [
" * @throws StandardException if error occurred during decryption"
],
"header": "@@ -289,7 +281,7 @@ class EncryptedLOBFile extends LOBFile {",
"removed": [
" * @throws StandardException if error occured during encryption/decryption"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java",
"hunks": [
{
"added": [
"import java.security.PrivilegedAction;"
],
"header": "@@ -28,6 +28,7 @@ import java.io.InputStream;",
"removed": []
},
{
"added": [
"final class LOBStreamControl {"
],
"header": "@@ -55,7 +56,7 @@ import org.apache.derby.shared.common.reference.MessageId;",
"removed": [
"class LOBStreamControl {"
]
},
{
"added": [
" Object monitor = Monitor.findService(",
" Property.DATABASE_MODULE, conn.getDBName());",
" final DataFactory df = (DataFactory) Monitor.findServiceModule(",
" monitor, DataFactory.MODULE);",
" public Object run() throws IOException {",
" } else {",
" }",
" throw (IOException) pae.getCause();",
"",
" conn.addLobFile(tmpFile);"
],
"header": "@@ -92,34 +93,30 @@ class LOBStreamControl {",
"removed": [
" public Object run() throws IOException, StandardException {",
" Object monitor = Monitor.findService(",
" Property.DATABASE_MODULE, conn.getDBName());",
" DataFactory df = (DataFactory) Monitor.findServiceModule(",
" monitor, DataFactory.MODULE);",
" }",
" else",
" conn.addLobFile(tmpFile);",
" Exception e = pae.getException();",
" if (e instanceof StandardException)",
" throw (StandardException)e;",
" if (e instanceof IOException)",
" throw (IOException) e;",
" throw Util.newIOException(e);"
]
},
{
"added": [
" * @return new position",
" * @throws IOException if writing to the LOB file fails",
" * @throws StandardException if encrypting/decrypting the LOB file fails"
],
"header": "@@ -196,8 +193,9 @@ class LOBStreamControl {",
"removed": [
" * @return new postion",
" * @throws IOException, StandardException"
]
},
{
"added": [
" * @param pos position from where to read",
" * @throws IOException if reading the LOB file fails",
" * @throws StandardException if decrypting an encrypted LOB file fails"
],
"header": "@@ -257,9 +255,10 @@ class LOBStreamControl {",
"removed": [
" * @param pos postion from where to read",
" * @throws IOException, StandardException"
]
},
{
"added": [
" * @param pos initial position before reading",
" * @return number new position",
" * @throws IOException if reading the LOB file fails",
" * @throws StandardException if decrypting an encrypted LOB file fails"
],
"header": "@@ -294,9 +293,10 @@ class LOBStreamControl {",
"removed": [
" * @param pos initial postion before reading",
" * @return number new postion",
" * @throws IOException, StandardException"
]
},
{
"added": [
" * @param size new size should be smaller than existing size"
],
"header": "@@ -340,7 +340,7 @@ class LOBStreamControl {",
"removed": [
" * @param size new size should be smaller than exisiting size"
]
},
{
"added": [
" * @throws IOException if reading or writing a LOB file fails",
" * @throws StandardException if encrypting or decrypting a LOB file fails"
],
"header": "@@ -373,7 +373,8 @@ class LOBStreamControl {",
"removed": [
" * @throws IOException, StandardException"
]
},
{
"added": [
" private void deleteFile(final StorageFile file) {",
" AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() {",
" file.delete();",
" return null;",
" }",
" });",
"",
" * @throws IOException if closing the file fails"
],
"header": "@@ -492,27 +493,18 @@ class LOBStreamControl {",
"removed": [
" private void deleteFile (StorageFile file) throws IOException {",
" try {",
" final StorageFile sf = file;",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {",
" sf.delete();",
" return null;",
" }",
" });",
" } catch (PrivilegedActionException pae) {",
" Exception e = pae.getException();",
" if (e instanceof IOException)",
" throw (IOException) e;",
" if (e instanceof RuntimeException)",
" throw (RuntimeException) e;",
" throw Util.newIOException(e);",
" }",
" * @throws IOexception"
]
},
{
"added": [
" * @throws IOException if writing to the temporary file fails"
],
"header": "@@ -561,7 +553,7 @@ class LOBStreamControl {",
"removed": [
" * @throws IOExcepton if writing to temporary file fails"
]
},
{
"added": [
" * Returns the running sequence number to check if the lob is updated since"
],
"header": "@@ -623,7 +615,7 @@ class LOBStreamControl {",
"removed": [
" * Returns the running secquence number to check if the lob is updated since"
]
}
]
}
] |
derby-DERBY-6162-b32256d0
|
DERBY-6162: Simplify privileged actions in NetworkServerControlApiTest
Remove calls to deprecated method java.io.File.toURL().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1466914 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6163-3546404b
|
DERBY-6163: Reduce visibility of methods in subclasses of PageBasicOperation
Make all abstract classes in the PageBasicOperation class hierarchy
package protected. Make all constructors in the class hieararchy
package protected, except the no-argument constructors as the
Formatable interface requires them to be public.
Also reduce visibility of the RawField class, which is only used by
StoredPage in the same package.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467197 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/AllocPageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,21 +21,15 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.PhysicalPageOperation;",
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.data.RawContainerHandle;",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/ChainAllocPageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,22 +21,16 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.PhysicalPageOperation;",
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.data.RawContainerHandle;",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/CompressSpacePageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,22 +21,15 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.PhysicalPageOperation;",
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.ContainerHandle;",
"import org.apache.derby.iapi.store.raw.data.RawContainerHandle;",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/CompressSpacePageOperation10_2.java",
"hunks": [
{
"added": [
" * This class ensures backward compatibility for Soft upgrades."
],
"header": "@@ -21,26 +21,20 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.CompressSpacePageOperation;",
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import java.io.OutputStream;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
" * This class ensures backword compatibility for Soft upgrades. "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/CopyRowsOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -23,13 +23,9 @@ package org.apache.derby.impl.store.raw.data;",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.Page;"
]
},
{
"added": [],
"header": "@@ -42,8 +38,6 @@ import org.apache.derby.iapi.services.io.FormatableBitSet;",
"removed": [
"",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/InsertOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -22,19 +22,14 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"import org.apache.derby.impl.store.raw.data.ReclaimSpace;",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.Compensation;",
"import org.apache.derby.iapi.store.raw.RecordHandle;"
]
},
{
"added": [],
"header": "@@ -42,15 +37,11 @@ import org.apache.derby.iapi.store.raw.xact.RawTransaction;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"",
"import org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream;",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/InvalidatePageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,20 +21,15 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.Page;",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/LogicalPageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.RecordId;",
"import org.apache.derby.impl.store.raw.data.BasePage;",
""
]
},
{
"added": [],
"header": "@@ -32,7 +29,6 @@ import org.apache.derby.iapi.store.raw.ContainerHandle;",
"removed": [
"import org.apache.derby.iapi.store.raw.Page;"
]
},
{
"added": [],
"header": "@@ -43,8 +39,6 @@ import org.apache.derby.iapi.store.raw.log.LogInstant;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
""
]
},
{
"added": [
"abstract class LogicalPageOperation"
],
"header": "@@ -71,7 +65,7 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"public abstract class LogicalPageOperation "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/LogicalUndoOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;"
]
},
{
"added": [],
"header": "@@ -39,7 +36,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/PageBasicOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -23,9 +23,6 @@ package org.apache.derby.impl.store.raw.data;",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.store.raw.ContainerHandle;"
]
},
{
"added": [],
"header": "@@ -41,14 +38,10 @@ import org.apache.derby.iapi.store.raw.RawStoreFactory;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"",
"import org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream;",
"import java.io.InputStream;"
]
},
{
"added": [
"abstract class PageBasicOperation implements Loggable, RePreparable"
],
"header": "@@ -79,7 +72,7 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"public abstract class PageBasicOperation implements Loggable, RePreparable "
]
},
{
"added": [
" PageBasicOperation(BasePage page)"
],
"header": "@@ -93,7 +86,7 @@ public abstract class PageBasicOperation implements Loggable, RePreparable",
"removed": [
"\tprotected PageBasicOperation(BasePage page) "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/PhysicalPageOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;"
]
},
{
"added": [],
"header": "@@ -32,8 +31,6 @@ import org.apache.derby.iapi.store.raw.Undoable;",
"removed": [
"import java.io.InputStream;",
"import java.io.ObjectInput;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/PhysicalUndoOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,15 +21,11 @@",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.Page;"
]
},
{
"added": [],
"header": "@@ -38,8 +34,6 @@ import org.apache.derby.iapi.store.raw.log.LogInstant;",
"removed": [
"import java.io.OutputStream;",
"import java.io.ObjectInput;"
]
},
{
"added": [
" @derby.purpose update a physical log operation"
],
"header": "@@ -53,7 +47,7 @@ import org.apache.derby.iapi.services.io.LimitObjectInput;",
"removed": [
"\t@derby.purpose\tupdate a physiacl log operation"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/PurgeOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -23,11 +23,7 @@ package org.apache.derby.impl.store.raw.data;",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.services.io.Storable;"
]
},
{
"added": [],
"header": "@@ -44,8 +40,6 @@ import org.apache.derby.iapi.services.io.FormatableBitSet;",
"removed": [
"",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/SetReservedSpaceOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -21,28 +21,17 @@",
"removed": [
"import org.apache.derby.iapi.reference.SQLState;",
"",
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.store.raw.xact.RawTransaction; ",
"import org.apache.derby.iapi.util.ByteArray;",
"import org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream;",
"import org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream;",
"",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/UpdateFieldOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -23,11 +23,8 @@ package org.apache.derby.impl.store.raw.data;",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;"
]
},
{
"added": [],
"header": "@@ -41,14 +38,11 @@ import org.apache.derby.iapi.store.raw.log.LogInstant;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"",
"import java.io.OutputStream;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/UpdateOperation.java",
"hunks": [
{
"added": [],
"header": "@@ -23,11 +23,8 @@ package org.apache.derby.impl.store.raw.data;",
"removed": [
"import org.apache.derby.impl.store.raw.data.BasePage;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;"
]
},
{
"added": [],
"header": "@@ -39,15 +36,11 @@ import org.apache.derby.iapi.store.raw.Transaction;",
"removed": [
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"",
"import org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream;",
"import java.io.OutputStream;"
]
},
{
"added": [
" UpdateOperation("
],
"header": "@@ -82,7 +75,7 @@ public final class UpdateOperation extends PhysicalPageOperation {",
"removed": [
"\tpublic UpdateOperation("
]
}
]
}
] |
derby-DERBY-6166-da7973c3
|
DERBY-6166: Encapsulate the list of service properties.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1470551 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.ArrayUtil;"
],
"header": "@@ -25,6 +25,7 @@ import org.apache.derby.iapi.reference.Property;",
"removed": []
},
{
"added": [
"\tprivate static final String[] servicePropertyList = {"
],
"header": "@@ -66,7 +67,7 @@ import java.util.Enumeration;",
"removed": [
"\tpublic static final String[] servicePropertyList = {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java",
"hunks": [
{
"added": [
" String[] servicePropertyList = PropertyUtil.getServicePropertyList();",
"\t\tfor (int i = 0; i < servicePropertyList.length; i++) {",
"\t\t\t\tserviceProperties.getProperty(servicePropertyList[i]);",
"\t\t\tif (value != null) set.put(servicePropertyList[i], value);"
],
"header": "@@ -727,10 +727,11 @@ class PropertyConglomerate",
"removed": [
"\t\tfor (int i = 0; i < PropertyUtil.servicePropertyList.length; i++) {",
"\t\t\t\tserviceProperties.getProperty(PropertyUtil.servicePropertyList[i]);",
"\t\t\tif (value != null) set.put(PropertyUtil.servicePropertyList[i], value);"
]
}
]
}
] |
derby-DERBY-6167-e1c9e2b7
|
DERBY-6167: Interrupt restarts clock for login timeout
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1500585 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/jdbc/InternalDriver.java",
"hunks": [
{
"added": [
" private EmbedConnection timeLogin(",
" long now = System.currentTimeMillis();",
" long giveUp = now + loginTimeoutSeconds * 1000L;",
" while (now < giveUp) {",
" return task.get(giveUp - now, TimeUnit.MILLISECONDS);",
" now = System.currentTimeMillis();"
],
"header": "@@ -305,23 +305,22 @@ public class InternalDriver implements ModuleControl, Driver {",
"removed": [
" EmbedConnection timeLogin(",
" long startTime = System.currentTimeMillis();",
" long interruptedTime = startTime;",
" while ((startTime - interruptedTime) / 1000.0",
" < loginTimeoutSeconds) {",
" return task.get(loginTimeoutSeconds, TimeUnit.SECONDS);",
" interruptedTime = System.currentTimeMillis();"
]
}
]
}
] |
derby-DERBY-6168-373cf9d4
|
DERBY-6168: Clean up registered format ids
Removed the format ids for the run-time statistics classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467200 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java",
"hunks": [
{
"added": [],
"header": "@@ -21,9 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import org.apache.derby.iapi.services.info.JVMInfo;",
""
]
},
{
"added": [
" /* 173 */ null,",
" /* 177 */ null,",
" /* 178 */ null,",
" /* 179 */ null,",
" /* 180 */ null,",
" /* 181 */ null,",
" /* 182 */ null,",
" /* 183 */ null,",
" /* 184 */ null,",
" /* 185 */ null,",
" /* 186 */ null,",
" /* 187 */ null,",
" /* 188 */ null,",
" /* 189 */ null,",
" /* 190 */ null,",
" /* 191 */ null,"
],
"header": "@@ -225,25 +222,25 @@ String[] TwoByte = {",
"removed": [
" /* 173 */ \"org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl\",",
" /* 177 */ \"org.apache.derby.impl.sql.execute.rts.RealProjectRestrictStatistics\",",
" /* 178 */ \"org.apache.derby.impl.sql.execute.rts.RealSortStatistics\",",
" /* 179 */ \"org.apache.derby.impl.sql.execute.rts.RealTableScanStatistics\",",
" /* 180 */ \"org.apache.derby.impl.sql.execute.rts.RealNestedLoopJoinStatistics\",",
" /* 181 */ \"org.apache.derby.impl.sql.execute.rts.RealIndexRowToBaseRowStatistics\",",
" /* 182 */ \"org.apache.derby.impl.sql.execute.rts.RealAnyResultSetStatistics\",",
" /* 183 */ \"org.apache.derby.impl.sql.execute.rts.RealOnceResultSetStatistics\",",
" /* 184 */ \"org.apache.derby.impl.sql.execute.rts.RealCurrentOfStatistics\",",
" /* 185 */ \"org.apache.derby.impl.sql.execute.rts.RealRowResultSetStatistics\",",
" /* 186 */ \"org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics\",",
" /* 187 */ \"org.apache.derby.impl.sql.execute.rts.RealNestedLoopLeftOuterJoinStatistics\",",
" /* 188 */ \"org.apache.derby.impl.sql.execute.rts.RealNormalizeResultSetStatistics\",",
" /* 189 */ \"org.apache.derby.impl.sql.execute.rts.RealInsertResultSetStatistics\",",
" /* 190 */ \"org.apache.derby.impl.sql.execute.rts.RealUpdateResultSetStatistics\",",
" /* 191 */ \"org.apache.derby.impl.sql.execute.rts.RealDeleteResultSetStatistics\","
]
},
{
"added": [
" /* 203 */ null,"
],
"header": "@@ -255,7 +252,7 @@ String[] TwoByte = {",
"removed": [
" /* 203 */ \"org.apache.derby.impl.sql.execute.rts.RealHashScanStatistics\","
]
},
{
"added": [
" /* 214 */ null,"
],
"header": "@@ -266,7 +263,7 @@ String[] TwoByte = {",
"removed": [
" /* 214 */ \"org.apache.derby.impl.sql.execute.rts.RealVTIStatistics\","
]
},
{
"added": [
" /* 283 */ null,",
" /* 284 */ null,",
" /* 285 */ null,"
],
"header": "@@ -335,9 +332,9 @@ String[] TwoByte = {",
"removed": [
" /* 283 */ \"org.apache.derby.impl.sql.execute.rts.RealScalarAggregateStatistics\",",
" /* 284 */ \"org.apache.derby.impl.sql.execute.rts.RealDistinctScalarAggregateStatistics\",",
" /* 285 */ \"org.apache.derby.impl.sql.execute.rts.RealGroupedAggregateStatistics\","
]
},
{
"added": [
" /* 304 */ null,",
" /* 305 */ null,",
" /* 306 */ null,",
" /* 308 */ null,"
],
"header": "@@ -356,11 +353,11 @@ String[] TwoByte = {",
"removed": [
" /* 304 */ \"org.apache.derby.impl.sql.execute.rts.RealHashJoinStatistics\",",
" /* 305 */ \"org.apache.derby.impl.sql.execute.rts.RealHashLeftOuterJoinStatistics\",",
" /* 306 */ \"org.apache.derby.impl.sql.execute.rts.RealHashTableStatistics\",",
" /* 308 */ \"org.apache.derby.impl.sql.execute.rts.RealMaterializedResultSetStatistics\","
]
},
{
"added": [
" /* 327 */ null,",
" /* 330 */ null,",
" /* 334 */ null,"
],
"header": "@@ -379,14 +376,14 @@ String[] TwoByte = {",
"removed": [
" /* 327 */ \"org.apache.derby.impl.sql.execute.rts.RealLastIndexKeyScanStatistics\",",
" /* 330 */ \"org.apache.derby.impl.sql.execute.rts.RealScrollInsensitiveResultSetStatistics\",",
" /* 334 */ \"org.apache.derby.impl.sql.execute.rts.RealDistinctScanStatistics\","
]
},
{
"added": [
" /* 379 */ null,",
" /* 380 */ null,"
],
"header": "@@ -431,8 +428,8 @@ String[] TwoByte = {",
"removed": [
" /* 379 */ \"org.apache.derby.impl.sql.execute.rts.RealInsertVTIResultSetStatistics\",",
" /* 380 */ \"org.apache.derby.impl.sql.execute.rts.RealDeleteVTIResultSetStatistics\","
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java",
"hunks": [
{
"added": [
" <LI>The format of the stored object. All implementations which support",
" <P>An object should implement the Formatable interface to support a",
" of interfaces an implementation must support when it supports"
],
"header": "@@ -37,17 +37,17 @@ package org.apache.derby.iapi.services.io;",
"removed": [
" <LI>The format of the stored object. All implementaions which support",
" <P>An object should implement the Formatable inteface to support a",
" of interfaces an implementaion must support when it supports"
]
},
{
"added": [],
"header": "@@ -1024,194 +1024,12 @@ public interface StoredFormatIds {",
"removed": [
" /**",
" class org.apache.derby.impl.sql.execute.RunTimeStatisticsImpl",
" */",
" static public final int RUN_TIME_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 173);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealProjectRestrictStatistics",
" */",
" static public final int REAL_PROJECT_RESTRICT_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 177);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealDistinctScalarAggregateStatistics",
" */",
" static public final int REAL_DISTINCT_SCALAR_AGGREGATE_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 284);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealScalarAggregateStatistics",
" */",
" static public final int REAL_SCALAR_AGGREGATE_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 283);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealGroupedAggregateStatistics",
" */",
" static public final int REAL_GROUPED_AGGREGATE_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 285);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealSortStatistics",
" */",
" static public final int REAL_SORT_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 178);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealTableScanStatistics",
" */",
" static public final int REAL_TABLE_SCAN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 179);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealHashJoinStatistics",
" */",
" static public final int REAL_HASH_JOIN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 304);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealNestedLoopJoinStatistics",
" */",
" static public final int REAL_NESTED_LOOP_JOIN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 180);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealIndexRowToBaseRowStatistics",
" */",
" static public final int REAL_INDEX_ROW_TO_BASE_ROW_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 181);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealAnyResultSetStatistics",
" */",
" static public final int REAL_ANY_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 182);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealOnceResultSetStatistics",
" */",
" static public final int REAL_ONCE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 183);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealCurrentOfStatistics",
" */",
" static public final int REAL_CURRENT_OF_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 184);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealRowResultSetStatistics",
" */",
" static public final int REAL_ROW_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 185);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealUnionResultSetStatistics",
" */",
" static public final int REAL_UNION_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 186);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealHashLeftOuterJoinStatistics",
" */",
" static public final int REAL_HASH_LEFT_OUTER_JOIN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 305);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealNestedLoopLeftOuterJoinStatistics",
" */",
" static public final int REAL_NESTED_LOOP_LEFT_OUTER_JOIN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 187);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealNormalizeResultSetStatistics",
" */",
" static public final int REAL_NORMALIZE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 188);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealInsertResultSetStatistics",
" */",
" static public final int REAL_INSERT_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 189);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealInsertVTIResultSetStatistics",
" */",
" static public final int REAL_INSERT_VTI_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 379);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealUpdateResultSetStatistics",
" */",
" static public final int REAL_UPDATE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 190);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealDeleteResultSetStatistics",
" */",
" static public final int REAL_DELETE_VTI_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 380);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealDeleteResultSetStatistics",
" */",
" static public final int REAL_DELETE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 191);",
"",
" /**",
" org.apache.derby.impl.sql.execute.rts.RealDeleteCascadeResultSetStatistics\"",
" */",
" static public final int REAL_DELETE_CASCADE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 439);",
"",
"",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealHashScanStatistics",
" */",
" static public final int REAL_HASH_SCAN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 203);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealDistinctScanStatistics",
" */",
" static public final int REAL_DISTINCT_SCAN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 334);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealHashTableStatistics",
" */",
" static public final int REAL_HASH_TABLE_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 306);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealVTIStatistics",
" */",
" static public final int REAL_VTI_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 214);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealMaterializedResultSetStatistics",
" */",
" static public final int REAL_MATERIALIZED_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 308);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.RealScrollInsensitiveResultSetStatistics",
" */",
" static public final int REAL_SCROLL_INSENSITIVE_RESULT_SET_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 330);",
""
]
},
{
"added": [],
"header": "@@ -1343,12 +1161,6 @@ public interface StoredFormatIds {",
"removed": [
" /**",
" class org.apache.derby.impl.sql.execute.RealLastIndexKeyScanStatistics",
" */",
" static public final int REAL_LAST_INDEX_KEY_SCAN_STATISTICS_IMPL_V01_ID =",
" (MIN_ID_2 + 327);",
""
]
}
]
}
] |
derby-DERBY-6168-daaebdbd
|
DERBY-6168: Clean up registered format ids
Remove entries that reference non-existing classes or classes that do
not implement the TypedFormat interface or the InstanceGetter interface.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1489354 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java",
"hunks": [
{
"added": [
" /* 114 */ null,"
],
"header": "@@ -163,7 +163,7 @@ private static final String[] TwoByte = {",
"removed": [
" /* 114 */ \"org.apache.derby.impl.store.raw.log.SaveLWMOperation\","
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java",
"hunks": [
{
"added": [],
"header": "@@ -1085,24 +1085,6 @@ public interface StoredFormatIds {",
"removed": [
" /**",
" class org.apache.derby.impl.sql.execute.AddJarConstantAction;",
" */",
" static public final int ADD_JAR_CONSTANT_ACTION_V01_ID =",
" (MIN_ID_2 + 211);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.DropJarConstantAction;",
" */",
" static public final int DROP_JAR_CONSTANT_ACTION_V01_ID =",
" (MIN_ID_2 + 212);",
"",
" /**",
" class org.apache.derby.impl.sql.execute.ReplaceJarConstantAction;",
" */",
" static public final int REPLACE_JAR_CONSTANT_ACTION_V01_ID =",
" (MIN_ID_2 + 213);",
""
]
},
{
"added": [],
"header": "@@ -1686,25 +1668,6 @@ public interface StoredFormatIds {",
"removed": [
" ",
" /******************************************************************",
" **",
" ** LocalDriver Formatables.",
" **",
" ******************************************************************/",
"",
" /* NOT USED = org.apache.derby.impl.jdbc.ExternalizableConnection */",
" public static final int EXTERNALIZABLE_CONNECTION_ID = (MIN_ID_2 + 192);",
"",
"",
" /******************************************************************",
" **",
" ** InternalUtils MODULE CLASSES",
" **",
" ******************************************************************/",
" /* org.apache.derby.iapi.util.ByteArray */",
" public static final int FORMATABLE_BYTE_ARRAY_V01_ID = (MIN_ID_2 + 219);",
""
]
}
]
}
] |
derby-DERBY-6169-05623b68
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Changes to prevent exposing package-private classes outside the
package via public or protected fields or methods:
- Reduce visibility to package or private if possible
- Remove the code if it's not actually used
- Use public interfaces rather than implementation classes in the
method signatures if the methods have to be public
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1481816 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java",
"hunks": [
{
"added": [],
"header": "@@ -28,39 +28,18 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.iapi.types.RowLocation;",
"import org.apache.derby.iapi.store.access.ConglomerateController;",
"import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;",
"import org.apache.derby.iapi.store.access.ScanController;",
"import org.apache.derby.iapi.sql.execute.ExecRow;",
"import org.apache.derby.iapi.sql.execute.ExecIndexRow;",
"import org.apache.derby.iapi.services.io.FormatableBitSet;",
"import org.apache.derby.iapi.services.info.ProductGenusNames;",
"import org.apache.derby.iapi.reference.JDBC30Translation;",
"import org.apache.derby.iapi.reference.Limits;",
"import org.apache.derby.iapi.services.uuid.UUIDFactory;",
"import org.apache.derby.catalog.UUID;",
"import org.apache.derby.catalog.types.RoutineAliasInfo;",
"import org.apache.derby.catalog.AliasInfo;",
"import org.apache.derby.catalog.TypeDescriptor;",
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"import java.sql.Types;",
"import java.util.Enumeration;"
]
},
{
"added": [],
"header": "@@ -596,19 +575,6 @@ public\tclass DD_Version implements\tFormatable",
"removed": [
"\t",
"\t/**",
" \t * Make a catalog.",
"\t *\t@param\ttc\tTransactionController",
"\t *\t@exception StandardException Standard Derby error policy.",
"\t */",
"\tprotected void makeSystemCatalog(TransactionController tc,",
"\t\t\t\t\t\t\t\t\t TabInfoImpl ti)",
"\t\tthrows StandardException",
"\t{",
"\t\tSchemaDescriptor sd = bootingDictionary.getSystemSchemaDescriptor();",
"\t\tbootingDictionary.makeCatalog(ti,sd,tc);",
"\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
" * that stores the information in the system catalogs."
],
"header": "@@ -185,7 +185,7 @@ import org.apache.derby.impl.sql.execute.JarUtil;",
"removed": [
" * that stores the information in the system catlogs."
]
},
{
"added": [
" loadDictionaryTables(bootingTC, startParams);"
],
"header": "@@ -838,7 +838,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\tloadDictionaryTables(bootingTC, ddg, startParams);"
]
},
{
"added": [
" SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey)"
],
"header": "@@ -4134,7 +4134,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey)"
]
},
{
"added": [
" private void loadDictionaryTables(TransactionController tc,",
" loadCatalogs(coreInfo);"
],
"header": "@@ -7983,17 +7983,15 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t *\t@param\tddg\t\tDataDescriptorGenerator",
"\tprotected void loadDictionaryTables(TransactionController tc,",
"\t\t\t\t\t\t\t\t\t\tDataDescriptorGenerator ddg,",
"\t\tloadCatalogs(ddg, coreInfo);"
]
},
{
"added": [
" private void loadCatalogs(TabInfoImpl[] catalogArray)"
],
"header": "@@ -8035,12 +8033,9 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t *\t@param\tddg\t\tDataDescriptorGenerator",
"\t *",
"\t *",
"\tpublic void loadCatalogs(DataDescriptorGenerator ddg, TabInfoImpl[] catalogArray)"
]
},
{
"added": [
" for (indexCtr = 0; indexCtr < numIndexes; indexCtr++)",
" {",
" initSystemIndexVariables(catalog, indexCtr);",
" }"
],
"header": "@@ -8058,13 +8053,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\tif (numIndexes > 0)",
"\t\t\t{",
"\t\t\t\tfor (indexCtr = 0; indexCtr < numIndexes; indexCtr++)",
"\t\t\t\t{",
"\t\t\t\t\tinitSystemIndexVariables(ddg, catalog, indexCtr);\t",
"\t\t\t\t}",
"\t\t\t}"
]
},
{
"added": [
" private void makeCatalog( TabInfoImpl ti,"
],
"header": "@@ -8416,7 +8408,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic\tvoid\tmakeCatalog( TabInfoImpl\t\t\t\t\tti,"
]
},
{
"added": [],
"header": "@@ -8608,44 +8600,6 @@ public final class\tDataDictionaryImpl",
"removed": [
"",
"\t/**",
"\t *\tCode to add an index to a catalog during upgrade.",
"\t *",
"\t *\t@param\ttc\t\t\t\t\t\ttransaction controller",
"\t *\t@param\tti\t\t\t\t\t\tinformation on the catalog that's having a new index added",
"\t *\t@param\tindexNumber\t\t\t\t0-based index number",
"\t *\t@param\theapConglomerateNumber\twhat it is",
"\t *",
"\t * @return The conglomerate number of the new index.",
"\t *",
"\t * @exception StandardException\t\tThrown on failure",
"\t */",
"\tpublic\tlong\tupgrade_makeOneIndex",
"\t(",
"\t\tTransactionController\ttc,",
"\t\tTabInfoImpl\t\t\t\t\tti,",
"\t\tint\t\t\t\t\t\tindexNumber,",
"\t\tlong\t\t\t\t\theapConglomerateNumber",
" )",
"\t\tthrows StandardException",
"\t{",
"\t\tSchemaDescriptor\t\tsd = getSystemSchemaDescriptor( );",
"\t\tDataDescriptorGenerator ddg = getDataDescriptorGenerator();",
"\t\tlong\t\t\t\t\tindexConglomerateNumber;",
"",
"\t\tConglomerateDescriptor\tconglomerateDescriptor = bootstrapOneIndex",
"\t\t\t( sd, tc, ddg, ti, indexNumber, heapConglomerateNumber );",
"",
"\t\tindexConglomerateNumber = conglomerateDescriptor.getConglomerateNumber();",
"",
"\t\taddDescriptor(conglomerateDescriptor, sd, ",
"\t\t\t\t\t SYSCONGLOMERATES_CATALOG_NUM, false, tc);",
"\t\t\t\t\t ",
"\t\treturn indexConglomerateNumber;",
"\t}\t ",
"",
""
]
},
{
"added": [
"\t\tinitSystemIndexVariables(ti, indexNumber);"
],
"header": "@@ -8984,7 +8938,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tinitSystemIndexVariables(ddg, ti, indexNumber);"
]
},
{
"added": [
" private void initSystemIndexVariables(TabInfoImpl ti, int indexNumber)"
],
"header": "@@ -9057,9 +9011,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic void initSystemIndexVariables(DataDescriptorGenerator ddg,",
"\t\t\t\t\t\t\t\t\t\t TabInfoImpl ti,",
"\t\t\t\t\t\t\t\t\t\t int indexNumber)"
]
},
{
"added": [
" for (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)",
" {",
" initSystemIndexVariables(ti, indexCtr);",
" }"
],
"header": "@@ -9975,15 +9927,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tif (numIndexes > 0)",
"\t\t{",
"\t\t\tDataDescriptorGenerator ddg = getDataDescriptorGenerator();",
"",
"\t\t\tfor (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)",
"\t\t\t{",
"\t\t\t\tinitSystemIndexVariables(ddg, ti, indexCtr);\t",
"\t\t\t}",
"\t\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -25,8 +25,6 @@ import org.apache.derby.iapi.reference.ClassName;",
"removed": [
"import org.apache.derby.iapi.services.loader.GeneratedMethod;",
""
]
},
{
"added": [
"import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;"
],
"header": "@@ -34,21 +32,18 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
"import org.apache.derby.iapi.store.access.Qualifier;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
""
]
},
{
"added": [
"\t\t\t\t\t\t\t\tOptimizable ft)"
],
"header": "@@ -330,7 +325,7 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\tFromTable ft)"
]
},
{
"added": [
"\t\t\t\t\t\t\t\tExpressionClassBuilderInterface acbi,",
" ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;"
],
"header": "@@ -487,11 +482,11 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\tExpressionClassBuilder acb,",
"\t\tColumnReference\tcr;"
]
},
{
"added": [
" public void generateQualMethod(ExpressionClassBuilderInterface acbi,",
" ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;",
""
],
"header": "@@ -782,11 +777,13 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\tpublic void generateQualMethod(ExpressionClassBuilder acb,"
]
},
{
"added": [
" Optimizable optTable, boolean forPush, boolean walkOptTableSubtree)"
],
"header": "@@ -1734,7 +1731,7 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\t\tFromTable optTable, boolean forPush, boolean walkOptTableSubtree)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;",
"interface RelationalOperator"
],
"header": "@@ -25,20 +25,19 @@ import org.apache.derby.iapi.services.compiler.MethodBuilder;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"public interface RelationalOperator"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\tOptimizable ft);"
],
"header": "@@ -111,7 +110,7 @@ public interface RelationalOperator",
"removed": [
"\t\t\t\t\t\t\t\t\tFromTable ft);"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\t\tExpressionClassBuilderInterface acb,"
],
"header": "@@ -128,7 +127,7 @@ public interface RelationalOperator",
"removed": [
"\t\t\t\t\t\t\t\t\t\tExpressionClassBuilder acb,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
},
{
"added": [
"\t\t\t\t\t\t\t\t\t\t Optimizable ft)"
],
"header": "@@ -268,7 +269,7 @@ public abstract class UnaryComparisonOperatorNode extends UnaryOperatorNode",
"removed": [
"\t\t\t\t\t\t\t\t\t\t FromTable ft)"
]
},
{
"added": [
" public void generateExpressionOperand(Optimizable optTable,",
" int columnPosition,",
" ExpressionClassBuilderInterface acbi,",
" MethodBuilder mb)",
" ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;"
],
"header": "@@ -278,12 +279,13 @@ public abstract class UnaryComparisonOperatorNode extends UnaryOperatorNode",
"removed": [
"\tpublic void generateExpressionOperand(Optimizable optTable,",
"\t\t\t\t\t\t\t\t\t\t\t\tint columnPosition,",
"\t\t\t\t\t\t\t\t\t\t\t\tExpressionClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java",
"hunks": [
{
"added": [
" public IndexConstantAction getCreateIndexConstantAction"
],
"header": "@@ -240,7 +240,7 @@ public class GenericConstantActionFactory",
"removed": [
"\tpublic\tCreateIndexConstantAction\tgetCreateIndexConstantAction"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java",
"hunks": [
{
"added": [
" Perform Index maintenance associated with DML operations for a single index.",
"class IndexChanger"
],
"header": "@@ -50,9 +50,9 @@ import org.apache.derby.iapi.types.DataValueDescriptor;",
"removed": [
" Perform Index maintenace associated with DML operations for a single index.",
"public class IndexChanger"
]
},
{
"added": [
"\t @param indexSCOCI the SCOCI for the indexes.",
"\t @param indexDCOCI the DCOCI for the indexes."
],
"header": "@@ -84,8 +84,8 @@ public class IndexChanger",
"removed": [
"\t @param indexSCOCI the SCOCI for the idexes. ",
"\t @param indexDCOCI the DCOCI for the idexes. "
]
},
{
"added": [
" IndexChanger"
],
"header": "@@ -95,7 +95,7 @@ public class IndexChanger",
"removed": [
"\tpublic IndexChanger"
]
},
{
"added": [
" void setRowHolder(TemporaryRowHolderImpl rowHolder)"
],
"header": "@@ -148,7 +148,7 @@ public class IndexChanger",
"removed": [
"\tpublic void setRowHolder(TemporaryRowHolderImpl rowHolder)"
]
},
{
"added": [
" void setBaseCC(ConglomerateController baseCC)"
],
"header": "@@ -160,7 +160,7 @@ public class IndexChanger",
"removed": [
"\tpublic void setBaseCC(ConglomerateController baseCC)"
]
},
{
"added": [
" void open()"
],
"header": "@@ -524,7 +524,7 @@ public class IndexChanger",
"removed": [
"\tpublic void open()"
]
},
{
"added": [
" void delete(ExecRow baseRow, RowLocation baseRowLocation)"
],
"header": "@@ -536,8 +536,7 @@ public class IndexChanger",
"removed": [
"\tpublic void delete(ExecRow baseRow,",
"\t\t\t\t\t RowLocation baseRowLocation)"
]
},
{
"added": [
" void update(ExecRow oldBaseRow,"
],
"header": "@@ -554,7 +553,7 @@ public class IndexChanger",
"removed": [
"\tpublic void update(ExecRow oldBaseRow,"
]
},
{
"added": [
" void insert(ExecRow newRow, RowLocation baseRowLocation)"
],
"header": "@@ -583,7 +582,7 @@ public class IndexChanger",
"removed": [
"\tpublic void insert(ExecRow newRow, RowLocation baseRowLocation)"
]
},
{
"added": [
" void finish() throws StandardException"
],
"header": "@@ -625,8 +624,7 @@ public class IndexChanger",
"removed": [
"\tpublic void finish()",
"\t\tthrows StandardException"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package org.apache.derby.impl.sql.execute;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java",
"hunks": [
{
"added": [
"class StatementTriggerExecutor extends GenericTriggerExecutor"
],
"header": "@@ -33,7 +33,7 @@ import org.apache.derby.iapi.sql.Activation;",
"removed": [
"public class StatementTriggerExecutor extends GenericTriggerExecutor"
]
}
]
}
] |
derby-DERBY-6169-28f94843
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Changes under impl/sql/compile:
- Reduce visibility of some classes, fields and methods
- Remove some unused methods (including one actually used setter
method where the field it sets is unused)
- Make last parameter of UnaryOperatorNode.init() a scalar rather
than an array, since it's always a single value
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1468317 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java",
"hunks": [
{
"added": [],
"header": "@@ -23,17 +23,13 @@ package\torg.apache.derby.impl.sql.compile;",
"removed": [
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.impl.sql.compile.ActivationClassBuilder;",
"",
"import org.apache.derby.iapi.util.JBitSet;"
]
},
{
"added": [],
"header": "@@ -59,7 +55,6 @@ public class ConstraintDefinitionNode extends TableElementNode",
"removed": [
"\tint[]\t\t\t checkColumnReferences;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import java.util.HashSet;",
"removed": [
"import org.apache.derby.catalog.UUID;"
]
},
{
"added": [],
"header": "@@ -34,7 +33,6 @@ import org.apache.derby.iapi.services.property.PropertyUtil;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;"
]
},
{
"added": [
" private boolean unique;",
" private Properties properties;",
" private String indexType;",
" private TableName indexName;",
" private TableName tableName;",
" private List columnNameList;",
" private String[] columnNames;",
" private boolean[] isAscending;",
" private int[] boundColumnIDs;",
" private TableDescriptor td;"
],
"header": "@@ -48,18 +46,16 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": [
"\tboolean\t\t\t\tunique;",
"\tDataDictionary\t\tdd = null;",
"\tProperties\t\t\tproperties;",
"\tString\t\t\t\tindexType;",
"\tTableName\t\t\tindexName;",
"\tTableName\t\t\ttableName;",
"\tList\t\t\t\tcolumnNameList;",
"\tString[]\t\t\tcolumnNames = null;",
"\tboolean[]\t\t\tisAscending;",
"\tint[]\t\t\t\tboundColumnIDs;",
"",
"\tTableDescriptor\t\ttd;"
]
},
{
"added": [],
"header": "@@ -121,19 +117,6 @@ public class CreateIndexNode extends DDLStatementNode",
"removed": [
"",
"\tpublic\tboolean\t\t\t\tgetUniqueness() { return unique; }",
"\tpublic\tString\t\t\t\tgetIndexType() { return indexType; }",
"\tpublic\tTableName\t\t\tgetIndexName() { return indexName; }",
"\tpublic\tUUID\t\t\t\tgetBoundTableID() { return td.getUUID(); }",
" public\tProperties\t\t\tgetProperties() { return properties; }",
"\tpublic TableName\t\t\tgetIndexTableName() {return tableName; }",
"\tpublic String[]\t\t\tgetColumnNames() { return columnNames; }",
"",
"\t// get 1-based column ids",
"\tpublic\tint[]\t\t\t\tgetKeyColumnIDs() { return boundColumnIDs; }",
"\tpublic\tboolean[]\t\t\tgetIsAscending() { return isAscending; }",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java",
"hunks": [
{
"added": [
" /** Target type for XMLSerialize operator. */",
" private DataTypeDescriptor targetType;",
"",
" /** Whether or not an XMLParse operator should preserve whitespace. */",
" private boolean preserveWhitespace;"
],
"header": "@@ -110,9 +110,11 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
"\t// Array to hold Objects that contain primitive",
"\t// args required by the operator method call.",
"\tprivate Object [] additionalArgs;"
]
},
{
"added": [
" ((methodNameOrAddedArgs instanceof DataTypeDescriptor) ||",
" (methodNameOrAddedArgs instanceof Boolean))),"
],
"header": "@@ -146,8 +148,8 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
"\t\t\t\t\t\t((methodNameOrAddedArgs == null) ||",
"\t\t\t\t\t\t(methodNameOrAddedArgs instanceof Object[]))),"
]
},
{
"added": [
" if (operatorType == XMLSERIALIZE_OP) {",
" targetType = (DataTypeDescriptor) methodNameOrAddedArgs;",
" } else if (operatorType == XMLPARSE_OP) {",
" preserveWhitespace =",
" ((Boolean) methodNameOrAddedArgs).booleanValue();",
" } else if (SanityManager.DEBUG) {",
" SanityManager.THROWASSERT(",
" \"Don't know how to handle operator type \" + operatorType);",
" }"
],
"header": "@@ -156,7 +158,15 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
"\t\t\tthis.additionalArgs = (Object[])methodNameOrAddedArgs;"
]
},
{
"added": [
" (targetType != null),"
],
"header": "@@ -401,13 +411,10 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
" ((additionalArgs != null) && (additionalArgs.length > 0)),",
" DataTypeDescriptor targetType =",
" (DataTypeDescriptor)additionalArgs[0];",
""
]
},
{
"added": [],
"header": "@@ -739,8 +746,6 @@ public class UnaryOperatorNode extends OperatorNode",
"removed": [
" DataTypeDescriptor targetType =",
" (DataTypeDescriptor)additionalArgs[0];"
]
}
]
}
] |
derby-DERBY-6169-42544c4b
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
- Reduce visibility of fields in ColumnInfo, FKInfo,
InsertConstantAction and TablePrivilegeInfo to private or package.
- Reduce visibility of TablePrivilegesNode.makePrivilegeInfo() and
InsertConstantAction.getAutoincRowLocation() to package.
- Clone arrays passed in to public constructors of the above mentioned
classes as well as ConstraintInfo.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1478295 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java",
"hunks": [
{
"added": [],
"header": "@@ -32,13 +32,9 @@ import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"removed": [
"import org.apache.derby.iapi.sql.depend.ProviderList;",
"import org.apache.derby.iapi.sql.conn.ConnectionUtil;",
"import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ColumnInfo.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.ArrayUtil;"
],
"header": "@@ -21,11 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"",
"import org.apache.derby.iapi.error.StandardException;"
]
},
{
"added": [],
"header": "@@ -37,7 +35,6 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatableIntHolder;"
]
},
{
"added": [
" int action;",
" String name;",
" DataTypeDescriptor dataType;",
" DefaultInfo defaultInfo;",
" ProviderInfo[] providers;",
" DataValueDescriptor defaultValue;",
" UUID newDefaultUUID;",
" UUID oldDefaultUUID;",
" long autoincStart;",
" long autoincInc;",
" long autoinc_create_or_modify_Start_Increment = -1;"
],
"header": "@@ -67,21 +64,21 @@ public class ColumnInfo implements Formatable",
"removed": [
"\tpublic int\t\t\t\t\t\t\taction;",
"\tpublic\tString\t\t\t\t\t\tname;",
"\tpublic\tDataTypeDescriptor\t\t\tdataType;",
"\tpublic\tDefaultInfo\t\t\t\t\tdefaultInfo;",
" public ProviderInfo[] providers;",
"\tpublic\tDataValueDescriptor\t\t\tdefaultValue;",
"\tpublic\tUUID\t\t\t\t\t\tnewDefaultUUID;",
"\tpublic\tUUID\t\t\t\t\t\toldDefaultUUID;",
"\tpublic long \t\t\t\t\t\tautoincStart;",
"\tpublic long \t\t\t\t\t\tautoincInc;",
"\tpublic long \t\t\t\t\t\tautoinc_create_or_modify_Start_Increment = -1;"
]
},
{
"added": [
" this.providers = (ProviderInfo[]) ArrayUtil.copy(providers);"
],
"header": "@@ -135,7 +132,7 @@ public class ColumnInfo implements Formatable",
"removed": [
" this.providers = providers;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ConstraintInfo.java",
"hunks": [
{
"added": [],
"header": "@@ -30,9 +30,7 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.services.io.Formatable;"
]
},
{
"added": [
" this.columnNames = ArrayUtil.copy(columnNames);"
],
"header": "@@ -93,7 +91,7 @@ public class ConstraintInfo implements ConsInfo",
"removed": [
"\t\tthis.columnNames = columnNames;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/FKInfo.java",
"hunks": [
{
"added": [
" String[] fkConstraintNames;",
" String tableName;",
" int type;",
" UUID refUUID;",
" long refConglomNumber;",
" private UUID[] fkUUIDs;",
" long[] fkConglomNumbers;",
" boolean[] fkIsSelfReferencing;",
" int[] colArray;",
" int stmtType;",
" RowLocation rowLocation;",
" int[] raRules;"
],
"header": "@@ -75,18 +75,18 @@ public class FKInfo implements Formatable",
"removed": [
"\tpublic String\t\t\t\tfkConstraintNames[];",
"\tpublic String\t\t\t\ttableName;",
"\tpublic int\t\t\t\t\ttype;",
"\tpublic UUID\t\t\t\t\trefUUID;",
"\tpublic long\t\t\t\t\trefConglomNumber;",
"\tpublic UUID[]\t\t\t\tfkUUIDs;",
"\tpublic long[]\t\t\t\tfkConglomNumbers;",
"\tpublic boolean[]\t\t\tfkIsSelfReferencing;",
"\tpublic int[]\t\t\t\tcolArray;",
"\tpublic int\t\t\t\t\tstmtType;",
"\tpublic RowLocation\t\t\trowLocation;",
"\tpublic int[] \t raRules;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java",
"hunks": [
{
"added": [
" RowLocation[] autoincRowLocation;"
],
"header": "@@ -86,7 +86,7 @@ public class InsertConstantAction extends WriteCursorConstantAction",
"removed": [
"\tprotected RowLocation[] autoincRowLocation;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.ArrayUtil;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
" private final TableDescriptor td;",
" private final boolean[] actionAllowed;",
" private final FormatableBitSet[] columnBitSets;",
" private final List descriptorList;"
],
"header": "@@ -59,10 +60,10 @@ public class TablePrivilegeInfo extends PrivilegeInfo",
"removed": [
"\tprivate TableDescriptor td;",
"\tprivate boolean[] actionAllowed;",
"\tprivate FormatableBitSet[] columnBitSets;",
"\tprivate List descriptorList;"
]
},
{
"added": [
" // Copy the arrays so that modification outside doesn't change",
" // the internal state.",
" this.actionAllowed = ArrayUtil.copy(actionAllowed);",
" this.columnBitSets = new FormatableBitSet[columnBitSets.length];",
" for (int i = 0; i < columnBitSets.length; i++) {",
" if (columnBitSets[i] != null) {",
" this.columnBitSets[i] = new FormatableBitSet(columnBitSets[i]);",
" }",
" }",
""
],
"header": "@@ -72,8 +73,16 @@ public class TablePrivilegeInfo extends PrivilegeInfo",
"removed": [
"\t\tthis.actionAllowed = actionAllowed;",
"\t\tthis.columnBitSets = columnBitSets;"
]
}
]
}
] |
derby-DERBY-6169-519bfa74
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Remove the CreateViewNode.getProviderInfo() method in which a bug (it
returns colInfos instead of providerInfos) was introduced in revision
1477476.
Also remove the single caller of that method, as it appears to be dead
code that was only needed for views that had been created with a
pre-Derby version of the engine. Since upgrade is only supported from
other Derby versions, that logic should not be needed anymore.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479562 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java",
"hunks": [
{
"added": [],
"header": "@@ -21,12 +21,10 @@",
"removed": [
"import java.util.List;",
"import org.apache.derby.iapi.services.io.ArrayUtil;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java",
"hunks": [
{
"added": [],
"header": "@@ -35,8 +35,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.iapi.sql.compile.Parser;"
]
},
{
"added": [],
"header": "@@ -47,11 +45,9 @@ import org.apache.derby.iapi.sql.depend.ProviderInfo;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;",
"import org.apache.derby.impl.sql.compile.CreateViewNode;"
]
},
{
"added": [
" * occurred."
],
"header": "@@ -69,7 +65,7 @@ import org.apache.derby.impl.sql.compile.CreateViewNode;",
"removed": [
" * occured."
]
},
{
"added": [
" //",
" // Note: Since the \"previous version of server\" mentioned above must",
" // be a version that predates Derby, and we don't support upgrade from",
" // those versions, we no longer have code to generate the column",
" // dependency list on the fly. Instead, an assert has been added to",
" // verify that we always have a column bitmap in SYSDEPENDS if the",
" // affectedCols bitmap is non-null."
],
"header": "@@ -334,6 +330,13 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": []
},
{
"added": [
" // If the table descriptor that was passed in had a",
" // column bit map, so should the provider's table",
" // descriptor. Views that were created with a",
" // database version that predates Derby could lack",
" // a bitmap in the provider and needed to",
" // reconstruct it here by parsing and binding the",
" // original CREATE VIEW statement. However, since",
" // we don't support upgrade from pre-Derby versions,",
" // this code was removed as part of DERBY-6169.",
" if (SanityManager.DEBUG)",
" {",
" SanityManager.THROWASSERT(\"Expected view to \" +",
" \"have referenced column bitmap\");",
" }"
],
"header": "@@ -363,60 +366,20 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\t\t\t\t\tViewDescriptor vd = (ViewDescriptor) dep;",
"\t\t\t\t\t\t\tSchemaDescriptor compSchema;",
"\t\t\t\t\t\t\tcompSchema = dd.getSchemaDescriptor(vd.getCompSchemaId(), null);",
"\t\t\t\t\t\t\tCompilerContext newCC = lcc.pushCompilerContext(compSchema);",
"\t\t\t\t\t\t\tParser\tpa = newCC.getParser();",
"",
"\t\t\t\t\t\t\t// Since this is always nested inside another SQL",
"\t\t\t\t\t\t\t// statement, so topLevel flag should be false",
"\t\t\t\t\t\t\tCreateViewNode cvn = (CreateViewNode)pa.parseStatement(",
"\t\t\t\t\t\t\t\t\t\t\t\tvd.getViewText());",
"",
"\t\t\t\t\t\t\t// need a current dependent for bind",
"\t\t\t\t\t\t\tnewCC.setCurrentDependent(dep);",
"\t\t\t\t\t\t\tcvn.bindStatement();",
"\t\t\t\t\t\t\tlcc.popCompilerContext(newCC);",
"",
"\t\t\t\t\t\t\tboolean\t\tinterferent = false;",
"",
" Iterator it = cvn.getProviderInfo().iterator();",
" while (it.hasNext())",
"\t\t\t\t\t\t\t{",
" ProviderInfo info = (ProviderInfo) it.next();",
" Provider provider = (Provider) info.",
"\t\t\t\t\t\t\t\t\t\t\t\t\tgetDependableFinder().",
"\t\t\t\t\t\t\t\t\t\t\t\t\tgetDependable(dd,",
" info.getObjectId());",
"\t\t\t\t\t\t\t\tif (provider instanceof TableDescriptor)",
"\t\t\t\t\t\t\t\t{",
"\t\t\t\t\t\t\t\t\tTableDescriptor tab = (TableDescriptor)provider;",
"\t\t\t\t\t\t\t\t\tFormatableBitSet colMap = tab.getReferencedColumnMap();",
"\t\t\t\t\t\t\t\t\tif (colMap == null)",
"\t\t\t\t\t\t\t\t\t\tcontinue;",
"\t\t\t\t\t\t\t\t\t// if later on an error is raised such as in",
"\t\t\t\t\t\t\t\t\t// case of interference, this dependency line",
"\t\t\t\t\t\t\t\t\t// upgrade will not happen due to rollback",
"\t\t\t\t\t\t\t\t\ttab.setReferencedColumnMap(null);",
"\t\t\t\t\t\t\t\t\tdropDependency(lcc, vd, tab);",
"\t\t\t\t\t\t\t\t\ttab.setReferencedColumnMap(colMap);",
"\t\t\t\t\t\t\t\t\taddDependency(vd, tab, lcc.getContextManager());",
"",
"\t\t\t\t\t\t\t\t\tif (tab.getObjectID().equals(td.getObjectID()))",
"\t\t\t\t\t\t\t\t\t{",
" subsetCols.copyFrom( affectedCols );",
"\t\t\t\t\t\t\t\t\t\tsubsetCols.and(colMap);",
"\t\t\t\t\t\t\t\t\t\tif (subsetCols.anySetBit() != -1)",
"\t\t\t\t\t\t\t\t\t\t{",
"\t\t\t\t\t\t\t\t\t\t\tinterferent = true;",
"\t\t\t\t\t\t\t\t\t\t\t((TableDescriptor) p).setReferencedColumnMap(subsetCols);",
"\t\t\t\t\t\t\t\t\t\t}",
"\t\t\t\t\t\t\t\t\t}",
"\t\t\t\t\t\t\t\t}\t// if provider instanceof TableDescriptor",
"\t\t\t\t\t\t\t}\t// for providerInfos",
"\t\t\t\t\t\t\tif (! interferent)",
"\t\t\t\t\t\t\t\tcontinue;"
]
}
]
}
] |
derby-DERBY-6169-554386cc
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Stop exposing references to the internal array of saved objects in
GenericPreparedStatement by making the following changes:
- IndexRowToBaseRowResultSet: Since it doesn't need the complete
array, make it use getSavedObject(int) instead of getSavedObjects()
so that it only retrieves the single object that the caller is
interested in.
- VTIResultSet: Remove code that may perform lazy initialization of
one of the saved objects at run time if it was initially null.
Instead, make sure it is initialized when the query is compiled.
- GenericPreparedStatement: Change getSavedObjects() to return a
read-only view of the internal array, so that callers cannot
accidentally modify it.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1471331 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java",
"hunks": [
{
"added": [
"import java.util.Arrays;",
"import java.util.Collections;",
"import java.util.List;"
],
"header": "@@ -21,11 +21,12 @@",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"import java.lang.reflect.Array;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.io.ArrayUtil;"
],
"header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.monitor.Monitor;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromVTI.java",
"hunks": [
{
"added": [
" private final FormatableHashtable compileTimeConstants =",
" new FormatableHashtable();"
],
"header": "@@ -91,7 +91,8 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\tprivate\tFormatableHashtable\tcompileTimeConstants;"
]
},
{
"added": [
" // compileTimeConstants cannot be null, even if there are no",
" // constants, since VTIResultSet.setSharedState() may want to",
" // add constants to it during execution.",
" if (SanityManager.DEBUG) {",
" SanityManager.ASSERT(compileTimeConstants != null,",
" \"compileTimeConstants is null\");",
" }"
],
"header": "@@ -1656,7 +1657,13 @@ public class FromVTI extends FromTable implements VTIEnvironment",
"removed": [
"\t\t// compileTimeConstants can be null"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java",
"hunks": [
{
"added": [
" scoci = (StaticCompiledOpenConglomInfo) gp.getSavedObject(scociItem);"
],
"header": "@@ -103,9 +103,8 @@ class IndexRowToBaseRowResultSet extends NoPutResultSetImpl",
"removed": [
"\t\tfinal Object[] saved = gp.getSavedObjects();",
"\t\tscoci = (StaticCompiledOpenConglomInfo)saved[scociItem];"
]
},
{
"added": [
" this.accessedHeapCols =",
" (FormatableBitSet) gp.getSavedObject(heapColRefItem);",
" this.accessedAllCols =",
" (FormatableBitSet) gp.getSavedObject(allColRefItem);",
" gp.getSavedObject(indexColMapItem))",
" .getReferencedColumnPositions();",
" ExecRow resultRow =",
" ((ExecRowBuilder) gp.getSavedObject(resultRowAllocator))",
" .build(a.getExecutionFactory());"
],
"header": "@@ -120,20 +119,24 @@ class IndexRowToBaseRowResultSet extends NoPutResultSetImpl",
"removed": [
"\t\t\tthis.accessedHeapCols = (FormatableBitSet)saved[heapColRefItem];",
"\t\t\tthis.accessedAllCols = (FormatableBitSet)saved[allColRefItem];",
"\t\t\t saved[indexColMapItem]).getReferencedColumnPositions();",
" ExecRow resultRow = ((ExecRowBuilder) saved[resultRowAllocator])",
" .build(a.getExecutionFactory());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java",
"hunks": [
{
"added": [
" private final FormatableHashtable compileTimeConstants;"
],
"header": "@@ -81,8 +81,7 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
"\tprivate FormatableHashtable compileTimeConstants;",
"\tprivate int ctcNumber;"
]
},
{
"added": [
" // compileTimeConstants cannot be null, even if there are no",
" // constants, since VTIResultSet.setSharedState() may want to",
" // add constants to it during execution.",
" if (SanityManager.DEBUG) {",
" SanityManager.ASSERT(compileTimeConstants != null,",
" \"compileTimeConstants is null\");",
" }",
""
],
"header": "@@ -161,10 +160,17 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
"\t\tthis.ctcNumber = ctcNumber;"
]
},
{
"added": [],
"header": "@@ -706,20 +712,6 @@ class VTIResultSet extends NoPutResultSetImpl",
"removed": [
"\t\tif (compileTimeConstants == null) {",
"",
"\t\t\tObject[] savedObjects = activation.getPreparedStatement().getSavedObjects();",
"",
"\t\t\tsynchronized (savedObjects) {",
"",
"\t\t\t\tcompileTimeConstants = (FormatableHashtable) savedObjects[ctcNumber];",
"\t\t\t\tif (compileTimeConstants == null) {",
"\t\t\t\t\tcompileTimeConstants = new FormatableHashtable();",
"\t\t\t\t\tsavedObjects[ctcNumber] = compileTimeConstants;",
"\t\t\t\t}",
"\t\t\t}",
"\t\t}",
""
]
}
]
}
] |
derby-DERBY-6169-600780d1
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
- Make all fields of CreateViewNode and BasicProviderInfo private.
- Make BasicProviderInfo's constructor package private.
- Make CreateViewNode.getProviderInfo() return an immutable list
instead of the actual array to prevent accidental modification by
the caller.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1477476 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java",
"hunks": [
{
"added": [
"import java.util.List;",
"",
"import org.apache.derby.iapi.services.io.ArrayUtil;"
],
"header": "@@ -21,11 +21,12 @@",
"removed": [
"import org.apache.derby.iapi.sql.compile.Visitable;",
""
]
},
{
"added": [],
"header": "@@ -38,11 +39,9 @@ import org.apache.derby.iapi.sql.conn.Authorizer;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;",
"import org.apache.derby.iapi.sql.depend.Dependent;"
]
},
{
"added": [
" private ResultColumnList resultColumns;",
" private ResultSetNode queryExpression;",
" private String qeText;",
" private int checkOption;",
" private ProviderInfo[] providerInfos;",
" private ColumnInfo[] colInfos;"
],
"header": "@@ -62,12 +61,12 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"\tResultColumnList\tresultColumns;",
"\tResultSetNode\t\tqueryExpression;",
"\tString\t\t\t\tqeText;",
"\tint\t\t\t\t\tcheckOption;",
"\tProviderInfo[]\t\tproviderInfos;",
"\tColumnInfo[]\t\tcolInfos;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/depend/BasicProviderInfo.java",
"hunks": [
{
"added": [
" private UUID uuid;",
" private DependableFinder dFinder;",
" private String providerName;"
],
"header": "@@ -55,9 +55,9 @@ public class BasicProviderInfo implements ProviderInfo",
"removed": [
"\tpublic\tUUID\t\t\t\t\t\tuuid;",
"\tpublic\tDependableFinder\t\t\tdFinder;",
"\tpublic\tString\t\t\t\t\t\tproviderName;"
]
},
{
"added": [
" BasicProviderInfo("
],
"header": "@@ -74,7 +74,7 @@ public class BasicProviderInfo implements ProviderInfo",
"removed": [
"\tpublic\tBasicProviderInfo("
]
}
]
}
] |
derby-DERBY-6169-8fe3166c
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Reduce visibility of the following methods, and all overrides of them,
to package:
- QueryTreeNode.generate()
- QueryTreeNode.getNullNode()
- ResultSetNode.bindResultColumns()
- ResultSetNode.generateNormalizationResultSet()
- ResultSetNode.generateResultSet()
- ResultSetNode.getFromTableByName()
- ValueNode.generateExpression()
Remove unused method:
- ValueNode.generateFilter()
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480187 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)"
],
"header": "@@ -2530,7 +2530,7 @@ public class FromBaseTable extends FromTable",
"removed": [
"\tprotected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)"
]
},
{
"added": [
" void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -3266,8 +3266,7 @@ public class FromBaseTable extends FromTable",
"removed": [
"\tpublic void generate(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java",
"hunks": [
{
"added": [
" void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -146,8 +146,7 @@ public class HashTableNode extends SingleChildResultSetNode",
"removed": [
"\tpublic void generate(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JoinNode.java",
"hunks": [
{
"added": [
" void bindResultColumns(TableDescriptor targetTableDescriptor,",
" FromVTI targetVTI, ResultColumnList targetColumnList,",
" DMLStatementNode statement, FromList fromListParam)"
],
"header": "@@ -703,11 +703,9 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tpublic void bindResultColumns(TableDescriptor targetTableDescriptor,",
"\t\t\t\t\tFromVTI targetVTI,",
"\t\t\t\t\tResultColumnList targetColumnList,",
"\t\t\t\t\tDMLStatementNode statement,",
"\t\t\t\t\tFromList fromListParam)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java",
"hunks": [
{
"added": [
" void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -1316,8 +1316,7 @@ public class ProjectRestrictNode extends SingleChildResultSetNode",
"removed": [
"\tpublic void generate(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
},
{
"added": [
" void generateResultSet(ExpressionClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -1347,8 +1346,7 @@ public class ProjectRestrictNode extends SingleChildResultSetNode",
"removed": [
"\tpublic void generateResultSet(ExpressionClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\t MethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [
" void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -589,9 +589,7 @@ public abstract class QueryTreeNode implements Node, Visitable",
"removed": [
"\tprotected void generate(",
"\t\t\t\t\t\t\t\tActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java",
"hunks": [
{
"added": [
" void bindResultColumns(TableDescriptor targetTableDescriptor,",
" FromVTI targetVTI, ResultColumnList targetColumnList,",
" DMLStatementNode statement, FromList fromListParam)"
],
"header": "@@ -508,11 +508,9 @@ public abstract class ResultSetNode extends QueryTreeNode",
"removed": [
"\tpublic void bindResultColumns(TableDescriptor targetTableDescriptor,",
"\t\t\t\t\tFromVTI targetVTI,",
"\t\t\t\t\tResultColumnList targetColumnList,",
"\t\t\t\t\tDMLStatementNode statement,",
"\t\t\t\t\tFromList fromListParam)"
]
},
{
"added": [
" void generateNormalizationResultSet("
],
"header": "@@ -1408,7 +1406,7 @@ public abstract class ResultSetNode extends QueryTreeNode",
"removed": [
"\tpublic void generateNormalizationResultSet("
]
},
{
"added": [
" FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)"
],
"header": "@@ -1628,7 +1626,7 @@ public abstract class ResultSetNode extends QueryTreeNode",
"removed": [
"\tprotected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [
" void bindResultColumns(TableDescriptor targetTableDescriptor,",
" FromVTI targetVTI, ResultColumnList targetColumnList,",
" DMLStatementNode statement, FromList fromListParam)"
],
"header": "@@ -831,11 +831,9 @@ public class SelectNode extends ResultSetNode",
"removed": [
"\tpublic void bindResultColumns(TableDescriptor targetTableDescriptor,",
"\t\t\t\t\tFromVTI targetVTI,",
"\t\t\t\t\tResultColumnList targetColumnList,",
"\t\t\t\t\tDMLStatementNode statement,",
"\t\t\t\t\tFromList fromListParam)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java",
"hunks": [
{
"added": [
" void bindResultColumns(TableDescriptor targetTableDescriptor,",
" FromVTI targetVTI, ResultColumnList targetColumnList,",
" DMLStatementNode statement, FromList fromListParam)"
],
"header": "@@ -621,11 +621,9 @@ abstract class SetOperatorNode extends TableOperatorNode",
"removed": [
"\tpublic void bindResultColumns(TableDescriptor targetTableDescriptor,",
"\t\t\t\t\tFromVTI targetVTI,",
"\t\t\t\t\tResultColumnList targetColumnList,",
"\t\t\t\t\tDMLStatementNode statement,",
"\t\t\t\t\tFromList fromListParam)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java",
"hunks": [
{
"added": [
" void bindResultColumns(TableDescriptor targetTableDescriptor,",
" FromVTI targetVTI, ResultColumnList targetColumnList,",
" DMLStatementNode statement, FromList fromListParam)"
],
"header": "@@ -535,11 +535,9 @@ abstract class TableOperatorNode extends FromTable",
"removed": [
"\tpublic void bindResultColumns(TableDescriptor targetTableDescriptor,",
"\t\t\t\t\tFromVTI targetVTI,",
"\t\t\t\t\tResultColumnList targetColumnList,",
"\t\t\t\t\tDMLStatementNode statement,",
"\t\t\t\t\tFromList fromListParam)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"hunks": [
{
"added": [
" final void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -971,31 +971,12 @@ public abstract class ValueNode extends QueryTreeNode",
"removed": [
"\tprotected final\tvoid generate(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)",
"\t/**",
"\t * The only reason this routine exists is so that I don't have to change",
"\t * the protection on generateExpression() and rototill all of QueryTree.",
"\t *",
"\t * @param ecb\tThe ExpressionClassBuilder for the class being built",
"\t * @param mb\tThe method the expression will go into",
"\t *",
"\t *",
"\t * @exception StandardException\t\tThrown on error",
"\t */",
"\tpublic\tvoid generateFilter(ExpressionClassBuilder ecb,",
"\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)",
"\t\tthrows StandardException",
"\t{",
"\t\tgenerateExpression( ecb, mb );",
"\t}",
"\t",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/WindowResultSetNode.java",
"hunks": [
{
"added": [
" void generate(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -344,8 +344,7 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" public void generate(ActivationClassBuilder acb,",
" MethodBuilder mb)"
]
}
]
}
] |
derby-DERBY-6169-9f2ed7da
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Reduce visibility of some methods and fields in impl/sql/compile that
expose package-private classes outside of the package.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480941 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromList.java",
"hunks": [
{
"added": [
" void addFromTable(FromTable fromTable) throws StandardException"
],
"header": "@@ -142,7 +142,7 @@ public class FromList extends QueryTreeNodeVector implements OptimizableList",
"removed": [
"\tpublic void addFromTable(FromTable fromTable) throws StandardException"
]
},
{
"added": [
" FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)"
],
"header": "@@ -262,10 +262,9 @@ public class FromList extends QueryTreeNodeVector implements OptimizableList",
"removed": [
"\tprotected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)",
"\t\tboolean\t\t\tfound = false;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java",
"hunks": [
{
"added": [
" void preprocess(int numTables,"
],
"header": "@@ -95,7 +95,7 @@ public final class GetCurrentConnectionNode extends JavaValueNode",
"removed": [
"\tpublic void preprocess(int numTables,"
]
},
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -127,7 +127,7 @@ public final class GetCurrentConnectionNode extends JavaValueNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -139,7 +139,7 @@ public final class GetCurrentConnectionNode extends JavaValueNode",
"removed": [
"\tpublic JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" int getOrderableVariantType()"
],
"header": "@@ -164,7 +164,7 @@ public final class GetCurrentConnectionNode extends JavaValueNode",
"removed": [
"\tprotected int getOrderableVariantType()"
]
},
{
"added": [
" void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -177,8 +177,7 @@ public final class GetCurrentConnectionNode extends JavaValueNode",
"removed": [
"\tpublic void generateExpression(ExpressionClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java",
"hunks": [
{
"added": [
" FromTable transformOuterJoins(ValueNode predicateTree, int numTables)"
],
"header": "@@ -644,7 +644,7 @@ private boolean isNullRejecting (",
"removed": [
"\tpublic FromTable transformOuterJoins(ValueNode predicateTree, int numTables)"
]
},
{
"added": [
" int addOuterJoinArguments(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -802,8 +802,7 @@ private boolean isNullRejecting (",
"removed": [
"\t protected int addOuterJoinArguments(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java",
"hunks": [
{
"added": [
" DataTypeDescriptor getDataType() throws StandardException",
" final boolean isPrimitiveType() throws StandardException"
],
"header": "@@ -74,12 +74,12 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
" public DataTypeDescriptor getDataType() throws StandardException",
"\tpublic boolean isPrimitiveType() throws StandardException"
]
},
{
"added": [
" String getJavaTypeName() throws StandardException"
],
"header": "@@ -87,7 +87,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic String getJavaTypeName() throws StandardException"
]
},
{
"added": [
" final void setJavaTypeName(String javaTypeName)",
" String getPrimitiveTypeName()"
],
"header": "@@ -108,12 +108,12 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic void setJavaTypeName(String javaTypeName)",
"\tpublic String getPrimitiveTypeName()"
]
},
{
"added": [
" final void castToPrimitive(boolean booleanValue)"
],
"header": "@@ -140,7 +140,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic void castToPrimitive(boolean booleanValue)"
]
},
{
"added": [
" final boolean mustCastToPrimitive() { return mustCastToPrimitive; }"
],
"header": "@@ -152,7 +152,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic\tboolean\tmustCastToPrimitive() { return mustCastToPrimitive; }"
]
},
{
"added": [
" JSQLType getJSQLType() throws StandardException {",
" return jsqlType;",
" }"
],
"header": "@@ -161,8 +161,9 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic\tJSQLType\tgetJSQLType() throws StandardException",
"\t{ return jsqlType; }"
]
},
{
"added": [
" static TypeId mapToTypeID(JSQLType jsqlType)"
],
"header": "@@ -173,7 +174,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic\tstatic TypeId\tmapToTypeID( JSQLType jsqlType )"
]
},
{
"added": [
" final void markForCallStatement()"
],
"header": "@@ -187,7 +188,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic void markForCallStatement()"
]
},
{
"added": [
" abstract JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -197,7 +198,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tabstract public JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" abstract boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -205,7 +206,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tabstract public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" abstract void preprocess(int numTables,"
],
"header": "@@ -222,7 +223,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tabstract public void preprocess(int numTables,"
]
},
{
"added": [
" boolean generateReceiver(ExpressionClassBuilder acb,"
],
"header": "@@ -276,7 +277,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tprotected boolean generateReceiver(ExpressionClassBuilder acb,"
]
},
{
"added": [
" int getOrderableVariantType() throws StandardException"
],
"header": "@@ -295,7 +296,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tprotected int getOrderableVariantType() throws StandardException"
]
},
{
"added": [
" abstract void generateExpression("
],
"header": "@@ -311,8 +312,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"",
"\tprotected abstract void generateExpression("
]
},
{
"added": [
" final boolean generateReceiver(ExpressionClassBuilder acb,"
],
"header": "@@ -349,7 +349,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tprotected final boolean generateReceiver(ExpressionClassBuilder acb,"
]
},
{
"added": [
" final void getReceiverExpression(ExpressionClassBuilder acb,"
],
"header": "@@ -394,7 +394,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tprotected final void getReceiverExpression(ExpressionClassBuilder acb,"
]
},
{
"added": [
" void returnValueToSQLDomain()",
" boolean valueReturnedToSQLDomain()",
" void markReturnValueDiscarded()",
" boolean returnValueDiscarded()"
],
"header": "@@ -410,25 +410,25 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tprotected void returnValueToSQLDomain()",
"\tprotected boolean valueReturnedToSQLDomain()",
"\tprotected void markReturnValueDiscarded()",
"\tprotected boolean returnValueDiscarded()"
]
},
{
"added": [
" void checkReliability(ValueNode sqlNode) throws StandardException {"
],
"header": "@@ -440,7 +440,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
"\tpublic void checkReliability(ValueNode sqlNode) throws StandardException {"
]
},
{
"added": [
" int getCollationType() {"
],
"header": "@@ -450,7 +450,7 @@ abstract class JavaValueNode extends QueryTreeNode",
"removed": [
" public int getCollationType() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/JoinNode.java",
"hunks": [
{
"added": [
" FromTable transformOuterJoins(ValueNode predicateTree, int numTables)"
],
"header": "@@ -1508,7 +1508,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tpublic FromTable transformOuterJoins(ValueNode predicateTree, int numTables)"
]
},
{
"added": [
" void generateCore(ActivationClassBuilder acb,"
],
"header": "@@ -1554,7 +1554,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tpublic void generateCore(ActivationClassBuilder acb,"
]
},
{
"added": [
" void generateCore(ActivationClassBuilder acb,"
],
"header": "@@ -1573,7 +1573,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tprotected void generateCore(ActivationClassBuilder acb,"
]
},
{
"added": [
" void oneRowRightSide(ActivationClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -1754,8 +1754,7 @@ public class JoinNode extends TableOperatorNode",
"removed": [
"\tprotected void oneRowRightSide(ActivationClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t MethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java",
"hunks": [
{
"added": [
" void preprocess(int numTables,"
],
"header": "@@ -417,7 +417,7 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\tpublic void preprocess(int numTables,"
]
},
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -466,7 +466,7 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -508,7 +508,7 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\tpublic JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" void generateOneParameter(ExpressionClassBuilder acb,"
],
"header": "@@ -727,7 +727,7 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\tpublic\tvoid generateOneParameter(ExpressionClassBuilder acb,"
]
},
{
"added": [
" int getOrderableVariantType() throws StandardException"
],
"header": "@@ -1386,7 +1386,7 @@ abstract class MethodCallNode extends JavaValueNode",
"removed": [
"\tprotected int getOrderableVariantType() throws StandardException"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java",
"hunks": [
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -339,7 +339,7 @@ public class NewInvocationNode extends MethodCallNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java",
"hunks": [
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -197,7 +197,7 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" int getOrderableVariantType() throws StandardException"
],
"header": "@@ -233,7 +233,7 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"\tprotected int getOrderableVariantType() throws StandardException"
]
},
{
"added": [
" JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -261,7 +261,7 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"\tpublic JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" void preprocess(int numTables,"
],
"header": "@@ -307,7 +307,7 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"\tpublic void preprocess(int numTables,"
]
},
{
"added": [
" void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb)"
],
"header": "@@ -331,9 +331,7 @@ public class NonStaticMethodCallNode extends MethodCallNode",
"removed": [
"",
"\tpublic void generateExpression(ExpressionClassBuilder acb,",
"\t\t\t\t\t\t\t\t\t\t\tMethodBuilder mb)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" FormatableBitSet bindResultColumnsByName(TableDescriptor targetTableDescriptor,"
],
"header": "@@ -894,7 +894,7 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\tpublic FormatableBitSet bindResultColumnsByName(TableDescriptor targetTableDescriptor,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java",
"hunks": [
{
"added": [
" String getJavaTypeName()"
],
"header": "@@ -102,7 +102,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic String getJavaTypeName()"
]
},
{
"added": [
" String getPrimitiveTypeName()"
],
"header": "@@ -118,7 +118,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic String getPrimitiveTypeName()"
]
},
{
"added": [
" JSQLType getJSQLType() throws StandardException"
],
"header": "@@ -144,7 +144,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic\tJSQLType\tgetJSQLType\t() throws StandardException"
]
},
{
"added": [
" DataTypeDescriptor getDataType() throws StandardException"
],
"header": "@@ -198,7 +198,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
" public DataTypeDescriptor getDataType() throws StandardException"
]
},
{
"added": [
" JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -211,7 +211,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -244,7 +244,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" void preprocess(int numTables,"
],
"header": "@@ -263,7 +263,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tpublic void preprocess(int numTables,"
]
},
{
"added": [
" int getOrderableVariantType() throws StandardException"
],
"header": "@@ -287,7 +287,7 @@ public class SQLToJavaValueNode extends JavaValueNode",
"removed": [
"\tprotected int getOrderableVariantType() throws StandardException"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticClassFieldReferenceNode.java",
"hunks": [
{
"added": [
" void preprocess(int numTables,"
],
"header": "@@ -132,7 +132,7 @@ public final class StaticClassFieldReferenceNode extends JavaValueNode",
"removed": [
"\tpublic void preprocess(int numTables,"
]
},
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -164,7 +164,7 @@ public final class StaticClassFieldReferenceNode extends JavaValueNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
},
{
"added": [
" JavaValueNode remapColumnReferencesToExpressions()"
],
"header": "@@ -177,7 +177,7 @@ public final class StaticClassFieldReferenceNode extends JavaValueNode",
"removed": [
"\tpublic JavaValueNode remapColumnReferencesToExpressions()"
]
},
{
"added": [
" int getOrderableVariantType()"
],
"header": "@@ -195,7 +195,7 @@ public final class StaticClassFieldReferenceNode extends JavaValueNode",
"removed": [
"\tprotected int getOrderableVariantType()"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java",
"hunks": [
{
"added": [
" void generateOneParameter(ExpressionClassBuilder acb,"
],
"header": "@@ -889,7 +889,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\tpublic\tvoid generateOneParameter(ExpressionClassBuilder acb,"
]
},
{
"added": [
" boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
],
"header": "@@ -1026,7 +1026,7 @@ public class StaticMethodCallNode extends MethodCallNode",
"removed": [
"\tpublic boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/WindowResultSetNode.java",
"hunks": [
{
"added": [
" final FromTable getParent() {"
],
"header": "@@ -412,7 +412,7 @@ public class WindowResultSetNode extends SingleChildResultSetNode",
"removed": [
" public FromTable getParent() {"
]
}
]
}
] |
derby-DERBY-6169-c67f5dd2
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Remove two unused methods in the TriggerExecutionContext interface,
and their implementations in InternalTriggerExecutionContext. This
also made it possible to remove some fields that were only used by the
removed methods, and also corresponding fields and parameters in
neighbour classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1477477 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [
" generateTriggerInfo(relevantTriggers);"
],
"header": "@@ -649,7 +649,7 @@ abstract class DMLModStatementNode extends DMLStatementNode",
"removed": [
"\t\t\tgenerateTriggerInfo(relevantTriggers, targetTableDescriptor, changedColumnIds);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -22,16 +22,13 @@",
"removed": [
"import org.apache.derby.iapi.sql.Activation;",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.types.DataValueFactory;"
]
},
{
"added": [],
"header": "@@ -59,11 +56,6 @@ import org.apache.derby.iapi.services.loader.GeneratedMethod;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatableArrayHolder;",
"import org.apache.derby.iapi.services.io.FormatableHashtable;",
"import org.apache.derby.iapi.services.io.FormatableIntHolder;",
"import org.apache.derby.iapi.services.io.FormatableProperties;",
"import org.apache.derby.catalog.TypeDescriptor;"
]
},
{
"added": [],
"header": "@@ -321,8 +313,6 @@ public class GenericExecutionFactory",
"removed": [
"\t\tint[]\t\t\t\t\t\tchangedColIds,",
"\t\tString[]\t\t\t\t\tchangedColNames,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -1132,7 +1132,6 @@ class InsertResultSet extends DMLWriteResultSet implements TargetResultSet",
"removed": [
"\t\t\t\t\t\t\t\t\t\ttc, "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java",
"hunks": [
{
"added": [],
"header": "@@ -35,7 +35,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;"
]
},
{
"added": [],
"header": "@@ -63,8 +62,6 @@ class InternalTriggerExecutionContext",
"removed": [
"\tprotected int[]\t\t\t\t\tchangedColIds;",
"\tprotected String[]\t\t\t\tchangedColNames;"
]
},
{
"added": [],
"header": "@@ -126,9 +123,6 @@ class InternalTriggerExecutionContext",
"removed": [
"\t * @param changedColIds\tthe list of columns that changed. Null",
"\t *\t\tfor all columns or INSERT/DELETE.",
"\t * @param changedColNames\tthe names that correspond to changedColIds"
]
},
{
"added": [],
"header": "@@ -144,16 +138,12 @@ class InternalTriggerExecutionContext",
"removed": [
"\t\tint[]\t\t\t\t\t\tchangedColIds,",
"\t\tString[]\t\t\t\t\tchangedColNames,",
"\t\tthis.changedColIds = changedColIds;",
"\t\tthis.changedColNames = changedColNames;"
]
},
{
"added": [],
"header": "@@ -162,21 +152,6 @@ class InternalTriggerExecutionContext",
"removed": [
"\t\tif (SanityManager.DEBUG)",
"\t\t{\t",
"\t\t\tif ((changedColIds == null) != (changedColNames == null))",
"\t\t\t{",
"\t\t\t\tSanityManager.THROWASSERT(\"bad changed cols, \"+",
"\t\t\t\t\t\"(changedColsIds == null) = \"+(changedColIds == null)+ ",
"\t\t\t\t\t\" (changedColsNames == null) = \"+(changedColNames == null));",
"\t\t\t}",
"\t\t\tif (changedColIds != null)",
"\t\t\t{",
"\t\t\t\tSanityManager.ASSERT(changedColIds.length == changedColNames.length, ",
"\t\t\t\t\t\"different number of changed col ids vs names\");",
"\t\t\t}",
"\t\t}",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/TriggerEventActivator.java",
"hunks": [
{
"added": [],
"header": "@@ -26,20 +26,15 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.execute.ExecRow; ",
"import org.apache.derby.iapi.store.access.TransactionController;",
"import org.apache.derby.impl.sql.execute.AutoincrementCounter;",
"import org.apache.derby.iapi.reference.SQLState;",
"import java.sql.SQLException;"
]
},
{
"added": [],
"header": "@@ -48,7 +43,6 @@ import java.sql.SQLException;",
"removed": [
"\tprivate TransactionController \t\t\ttc; "
]
},
{
"added": [],
"header": "@@ -64,7 +58,6 @@ public class TriggerEventActivator",
"removed": [
"\t * @param tc\t\t\tthe xact controller"
]
},
{
"added": [],
"header": "@@ -75,7 +68,6 @@ public class TriggerEventActivator",
"removed": [
"\t\tTransactionController \t\ttc, "
]
},
{
"added": [],
"header": "@@ -92,7 +84,6 @@ public class TriggerEventActivator",
"removed": [
"\t\tthis.tc = tc;"
]
},
{
"added": [],
"header": "@@ -109,8 +100,6 @@ public class TriggerEventActivator",
"removed": [
"\t\t\t\t\t\t\t\ttriggerInfo.columnIds,\t\t\t\t\t",
"\t\t\t\t\t\t\t\ttriggerInfo.columnNames,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/TriggerInfo.java",
"hunks": [
{
"added": [],
"header": "@@ -21,28 +21,18 @@",
"removed": [
"import org.apache.derby.iapi.error.StandardException;",
"",
"import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"import org.apache.derby.iapi.services.monitor.Monitor;",
"",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.catalog.UUID;",
"import java.util.Iterator;",
"import java.util.Vector;"
]
},
{
"added": [],
"header": "@@ -70,8 +60,6 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\tString[]\t\t\t\tcolumnNames;",
"\tint[]\t\t\t\tcolumnIds;"
]
},
{
"added": [],
"header": "@@ -81,34 +69,14 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\t * @param td the table upon which the trigger is declared",
"\t * @param changedCols the columns that are changed in the dml that is",
"\t *\t\tcausing the trigger to fire",
"\t\tTableDescriptor\t\t\ttd,",
"\t\tint[]\t\t\t\t\tchangedCols,",
"\t\tthis.columnIds = changedCols;",
"",
"\t\tif (columnIds != null)",
"\t\t{",
"\t\t\t/*",
"\t\t\t** Find the names of all the columns that are",
"\t\t\t** being changd.",
"\t\t\t*/",
"\t\t\tcolumnNames = new String[columnIds.length];",
"\t\t\tfor (int i = 0; i < columnIds.length; i++)",
"\t\t\t{",
"\t\t\t\tcolumnNames[i] = td.getColumnDescriptor(columnIds[i]).getColumnName();",
"\t\t\t}",
"\t\t}",
""
]
},
{
"added": [
" triggerArray = (TriggerDescriptor[])",
" triggers.toArray(new TriggerDescriptor[triggers.size()]);"
],
"header": "@@ -118,30 +86,8 @@ public final class TriggerInfo implements Formatable",
"removed": [
" Iterator descIter = triggers.iterator();",
"\t\t",
"\t\tint size = triggers.size();",
"\t\ttriggerArray = new TriggerDescriptor[size];",
"",
"\t\tfor (int i = 0; i < size; i++)",
"\t\t{",
" triggerArray[i] = (TriggerDescriptor) descIter.next();",
"\t\t}",
"\t}",
"",
"\t/*",
"\t * private constructor for TriggerInfo",
"\t */",
"\tprivate TriggerInfo",
"\t(",
"\t\tTriggerDescriptor[]\t\ttriggers,",
"\t\tint[]\t\t\t\t\tchangedColsIds,",
"\t\tString[]\t\t\t\tchangedColsNames",
"\t) ",
"\t{",
"\t\tthis.columnIds = changedColsIds;",
"\t\tthis.columnNames = changedColsNames;",
"\t\tthis.triggerArray = triggers;"
]
},
{
"added": [],
"header": "@@ -157,28 +103,6 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\t{",
"\t\tif (triggerArray == null)",
"\t\t{",
"\t\t\treturn false;",
"\t\t}",
"",
"\t\treturn hasTrigger(new Boolean(isBefore), new Boolean(isRow));",
"\t}",
"",
"\t/**",
"\t * Do we have a trigger or triggers that meet",
"\t * the criteria",
"\t *",
"\t * @param isBefore\ttrue for a before trigger, false",
"\t *\t\t\t\t\tfor after trigger, null for either",
"\t * @param isRow\t\ttrue for a row trigger, false",
"\t *\t\t\t\t\tfor statement trigger, null for either",
"\t *",
"\t * @return true if we have a trigger that meets the",
"\t * \t\tcriteria",
"\t */",
"\tprivate boolean hasTrigger(Boolean isBefore, Boolean isRow)"
]
},
{
"added": [
" if ((triggerArray[i].isBeforeTrigger() == isBefore) &&",
" (triggerArray[i].isRowTrigger() == isRow))"
],
"header": "@@ -186,10 +110,8 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\t\t\tif (((isBefore == null) || ",
"\t\t\t\t\t(triggerArray[i].isBeforeTrigger() == isBefore.booleanValue())) &&",
"\t\t\t ((isRow == null) || ",
"\t\t\t\t\t(triggerArray[i].isRowTrigger() == isRow.booleanValue())))"
]
},
{
"added": [
"",
" // Used to write an array of changed column numbers and an array",
" // with the names of the columns, but they are not used anymore.",
" // Write dummy values to preserve the format.",
" ArrayUtil.writeIntArray(out, (int[]) null);",
" ArrayUtil.writeArray(out, (String[]) null);"
],
"header": "@@ -216,8 +138,12 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\t\tArrayUtil.writeIntArray(out, columnIds);",
"\t\tArrayUtil.writeArray(out, columnNames);"
]
},
{
"added": [
" // Discard fields that are no longer used.",
" ArrayUtil.readIntArray(in);",
" ArrayUtil.readStringArray(in);"
],
"header": "@@ -234,14 +160,9 @@ public final class TriggerInfo implements Formatable",
"removed": [
"\t\tcolumnIds = ArrayUtil.readIntArray(in);",
"",
"\t\tint len = ArrayUtil.readArrayLength(in);",
"\t\tif (len > 0)",
"\t\t{",
"\t\t\tcolumnNames = new String[len];",
"\t\t\tArrayUtil.readArrayItems(in, columnNames);",
"\t\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -710,7 +710,6 @@ class UpdateResultSet extends DMLWriteResultSet",
"removed": [
"\t\t\t\t\t\t\t\t\t\t\ttc, "
]
}
]
}
] |
derby-DERBY-6169-ca6ed176
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
- Reduce visibility of some classes, fields and constructors under
impl/sql/execute
- Expose InternalTriggerExecutionContext.getAutoincrementValue()
through the interface so that callers don't have to cast the
context to the internal implementation type
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467201 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.iapi.services.context.ContextImpl;",
"removed": [
"import org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext;"
]
},
{
"added": [],
"header": "@@ -85,7 +84,6 @@ import org.apache.derby.iapi.reference.Property;",
"removed": [
"import java.util.AbstractMap;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java",
"hunks": [
{
"added": [],
"header": "@@ -22,15 +22,9 @@",
"removed": [
"",
"import org.apache.derby.iapi.services.io.Storable;",
"",
"",
"",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java",
"hunks": [
{
"added": [
"class InternalTriggerExecutionContext",
" implements TriggerExecutionContext, ExecutionStmtValidator"
],
"header": "@@ -57,7 +57,8 @@ import org.apache.derby.iapi.types.DataValueDescriptor;",
"removed": [
"public class InternalTriggerExecutionContext implements TriggerExecutionContext, ExecutionStmtValidator"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ValueRow.java",
"hunks": [
{
"added": [
"class ValueRow implements ExecRow"
],
"header": "@@ -24,13 +24,12 @@ package org.apache.derby.impl.sql.execute;",
"removed": [
"import org.apache.derby.iapi.types.RowLocation;",
"public class ValueRow implements ExecRow"
]
}
]
}
] |
derby-DERBY-6169-dda453ed
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
- Remove the unused targetColumns fields in CursorInfo and
GenericPreparedStatement
- Replace the getter for the updateColumns field in
GenericPreparedStatement with more specific accessor methods that
don't expose the underlying array
- Make CursorInfo.updateColumns a list instead of an array to take
advantage of helper methods in java.util.List
- Make ArrayUtil.readStringArray() create one array rather than two
- Move QueryTreeNode.getCursorInfo() to StatementNode, since it's only
called on nodes of that type
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1470478 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java",
"hunks": [
{
"added": [],
"header": "@@ -28,7 +28,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/CursorInfo.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import java.util.Arrays;",
"import java.util.List;",
""
],
"header": "@@ -21,18 +21,20 @@",
"removed": [
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;",
"import org.apache.derby.iapi.services.io.FormatIdUtil;"
]
},
{
"added": [
" List updateColumns;"
],
"header": "@@ -57,8 +59,7 @@ public class CursorInfo",
"removed": [
"\tResultColumnDescriptor[]\ttargetColumns; ",
"\tString[] \t\t\t\t\tupdateColumns; "
]
},
{
"added": [
" List updateColumns",
" this.updateColumns = (updateColumns == null) ?",
" null : new ArrayList(updateColumns);"
],
"header": "@@ -75,14 +76,13 @@ public class CursorInfo",
"removed": [
"\t\tResultColumnDescriptor[]\ttargetColumns,",
"\t\tString[]\t\t\t\t\tupdateColumns",
"\t\tthis.targetColumns = targetColumns;",
"\t\tthis.updateColumns = updateColumns;"
]
},
{
"added": [
"",
" // For backwards compatibility. Used to write an array of",
" // target column descriptors here.",
" ArrayUtil.writeArray(out, (Object[]) null);",
"",
" ArrayUtil.writeArray(out, updateColumns == null ?",
" null : updateColumns.toArray());"
],
"header": "@@ -101,8 +101,13 @@ public class CursorInfo",
"removed": [
"\t\tArrayUtil.writeArray(out, targetColumns);",
"\t\tArrayUtil.writeArray(out, updateColumns);"
]
},
{
"added": [
"",
" // For backwards compatibility. Read and discard array that's no",
" // longer used.",
" ArrayUtil.readObjectArray(in);",
"",
" int len = ArrayUtil.readArrayLength(in);",
" if (len > 0) {",
" updateColumns = Arrays.asList(ArrayUtil.readStringArray(in));",
" }"
],
"header": "@@ -118,18 +123,15 @@ public class CursorInfo",
"removed": [
"\t\tint len = ArrayUtil.readArrayLength(in);",
"\t\tif (len != 0)",
"\t\t{",
"\t\t\ttargetColumns = new ResultColumnDescriptor[len];",
"\t\t\tArrayUtil.readArrayItems(in, targetColumns);",
"\t\t}",
"\t\tlen = ArrayUtil.readArrayLength(in);",
"\t\tif (len != 0)",
"\t\t{",
"\t\t\tupdateColumns = new String[len];",
"\t\t\tArrayUtil.readArrayItems(in, updateColumns);",
"\t\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java",
"hunks": [
{
"added": [],
"header": "@@ -47,7 +47,6 @@ import org.apache.derby.iapi.sql.ParameterValueSet;",
"removed": [
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;"
]
},
{
"added": [
" protected List updateColumns;"
],
"header": "@@ -126,8 +125,7 @@ public class GenericPreparedStatement",
"removed": [
"\tprotected ResultColumnDescriptor[]\ttargetColumns; ",
"\tprotected String[] \t\t\t\t\tupdateColumns; "
]
},
{
"added": [],
"header": "@@ -983,7 +981,6 @@ recompileOutOfDatePlan:",
"removed": [
"\t\t\ttargetColumns = null;"
]
},
{
"added": [
" setCursorInfo((CursorInfo) qt.getCursorInfo());"
],
"header": "@@ -1000,14 +997,7 @@ recompileOutOfDatePlan:",
"removed": [
"\t\t\tCursorInfo cursorInfo = (CursorInfo)qt.getCursorInfo();",
"\t\t\tif (cursorInfo != null)",
"\t\t\t{",
"\t\t\t\ttargetTable = cursorInfo.targetTable;",
"\t\t\t\ttargetColumns = cursorInfo.targetColumns;",
"\t\t\t\tupdateColumns = cursorInfo.updateColumns;",
"\t\t\t\tupdateMode = cursorInfo.updateMode;",
"\t\t\t}"
]
},
{
"added": [
" public boolean hasUpdateColumns() {",
" return updateColumns != null && !updateColumns.isEmpty();",
" }",
" public boolean isUpdateColumn(String columnName) {",
" return updateColumns != null && updateColumns.contains(columnName);",
" }"
],
"header": "@@ -1052,24 +1042,13 @@ recompileOutOfDatePlan:",
"removed": [
"\t/**",
"\t * the target columns of the cursor as a result column list",
"\t *",
"\t * @return\ttarget columns of the cursor as a result column list",
"\t */",
"\tpublic ResultColumnDescriptor[]\tgetTargetColumns() {",
"\t\treturn targetColumns;",
"\t}",
"\t/**",
"\t * the update columns of the cursor as a update column list",
"\t *",
"\t * @return\tupdate columns of the cursor as a array of strings",
"\t */",
"\tpublic String[]\tgetUpdateColumns() ",
"\t{",
"\t\treturn updateColumns;",
"\t}"
]
},
{
"added": [],
"header": "@@ -1080,7 +1059,6 @@ recompileOutOfDatePlan:",
"removed": [
"\t\t\ttargetColumns,"
]
},
{
"added": [],
"header": "@@ -1090,7 +1068,6 @@ recompileOutOfDatePlan:",
"removed": [
"\t\t\ttargetColumns = cursorInfo.targetColumns;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CursorNode.java",
"hunks": [
{
"added": [],
"header": "@@ -28,7 +28,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.iapi.sql.ResultColumnDescriptor;"
]
},
{
"added": [],
"header": "@@ -66,7 +65,6 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\tprivate ResultColumnDescriptor[]\ttargetColumnDescriptors;"
]
},
{
"added": [],
"header": "@@ -550,17 +548,9 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"",
"\t\t\t/* We must generate the target column list at bind time",
"\t\t\t * because the optimizer may transform the FromBaseTable from",
"\t\t\t * a table scan into an index scan.",
"\t\t\t */",
"\t\t\tgenTargetResultColList();",
"",
""
]
},
{
"added": [],
"header": "@@ -687,82 +677,6 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\t/**",
"\t * Return String[] of names from the FOR UPDATE OF List",
"\t *",
"\t * @return\tString[] of names from the FOR UPDATE OF list.",
"\t */",
"\tprivate String[] getUpdatableColumns()",
"\t{",
"\t\treturn (updatableColumns == null) ?",
"\t\t\t\t(String[])null :",
"\t\t\t\tgetUpdateColumnNames();",
"\t}",
"",
"\t/**",
"\t\tPositioned update needs to know what the target result set",
"\t\tlooks like. This is generated from the UpdateColumnList",
"\t\tavailable for the cursor, to describe the rows coming from",
"\t\tthe target result set under the cursor. This result set contains",
"\t\ta superset of the updatable columns; the caller must verify that",
"\t\tonly those listed in the FOR UPDATE clause are used.",
"",
"\t\t@return a result column list containing a description of",
"\t\tthe target table (this may contain non-updatable columns).",
"\t * @exception StandardException\t\tThrown on error",
"\t */",
"\tprivate ResultColumnDescriptor[] genTargetResultColList()",
"\t\tthrows StandardException",
"\t{",
"\t\tResultColumnList newList;",
"",
"\t\t/*",
"\t\t updateTable holds the FromTable that is the target.",
"\t\t copy its ResultColumnList, making BaseColumn references",
"\t\t for use in the CurrentOfNode, which behaves as if it had",
"\t\t base columns for the statement it is in.",
"",
"\t\t\tupdateTable is null if the cursor is not updatable.",
"\t\t */",
"\t\tif (updateTable == null) return null;",
"",
"\t\tif (targetColumnDescriptors != null) return targetColumnDescriptors;",
"",
"\t\tnewList = (ResultColumnList) getNodeFactory().getNode(",
"\t\t\t\t\t\t\t\t\t\tC_NodeTypes.RESULT_COLUMN_LIST,",
"\t\t\t\t\t\t\t\t\t\tgetContextManager());",
"\t\tResultColumnList rcl = updateTable.getResultColumns();",
"\t\tint rclSize = rcl.size();",
"\t\tfor (int index = 0; index < rclSize; index++)",
"\t\t{",
"\t\t\tResultColumn origCol, newCol;",
"\t\t\tValueNode newNode;",
"",
"\t\t\torigCol = (ResultColumn) rcl.elementAt(index);",
"",
"\t\t\t// Build a ResultColumn/BaseColumnNode pair for the column",
"\t\t\tnewNode = (ValueNode) getNodeFactory().getNode(",
"\t\t\t\t\t\t\tC_NodeTypes.BASE_COLUMN_NODE,",
"\t\t\t\t\t\t\torigCol.getName(),",
"\t\t\t\t\t\t\tmakeTableName(origCol.getSchemaName(),",
"\t\t\t\t\t\t\t\t\t\t origCol.getTableName()),\t\t\t\t\t\t\t\t",
"\t\t\t\t\t\t\torigCol.getTypeServices(),",
"\t\t\t\t\t\t\tgetContextManager());",
"\t\t\tnewCol = (ResultColumn) getNodeFactory().getNode(",
"\t\t\t\t\t\t\t\t\tC_NodeTypes.RESULT_COLUMN,",
"\t\t\t\t\t\t\t\t\torigCol.columnDescriptor,",
"\t\t\t\t\t\t\t\t\tnewNode,",
"\t\t\t\t\t\t\t\t\tgetContextManager());",
"",
"\t\t\t/* Build the ResultColumnList to return */",
"\t\t\tnewList.addResultColumn(newCol);",
"\t\t}",
"",
"\t\t// we save the result so we only do this once",
"\t\ttargetColumnDescriptors = newList.makeResultDescriptors();",
"\t\treturn targetColumnDescriptors;",
"\t}",
""
]
},
{
"added": [
" updatableColumns);"
],
"header": "@@ -795,8 +709,7 @@ public class CursorNode extends DMLStatementNode",
"removed": [
"\t\t\t\t\t\t\t\tgenTargetResultColList(),",
"\t\t\t\t\t\t\t\tgetUpdatableColumns());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [],
"header": "@@ -803,23 +803,6 @@ public abstract class QueryTreeNode implements Node, Visitable",
"removed": [
"\tpublic boolean foundString(String[] list, String search)",
"\t{",
"\t\tif (list == null)",
"\t\t{",
"\t\t\treturn false;",
"\t\t}",
"",
"\t\tfor (int i = 0; i < list.length; i++)",
"\t\t{",
"\t\t\tif (list[i].equals(search))",
"\t\t\t{\t",
"\t\t\t\treturn true;",
"\t\t\t}",
"\t\t}",
"\t\treturn false;",
"\t}",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;"
],
"header": "@@ -50,6 +50,7 @@ import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;",
"removed": []
},
{
"added": [
" * @param cursorStmt the statement that owns the cursor",
" void checkColumnUpdateability(",
" ExecPreparedStatement cursorStmt, String cursorName)"
],
"header": "@@ -2267,12 +2268,13 @@ public class ResultColumnList extends QueryTreeNodeVector",
"removed": [
"\t * @param ucl\t\t\tThe cursor's FOR UPDATE OF list. (May be null.)",
"\tpublic void checkColumnUpdateability(String[] ucl, String cursorName) "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java",
"hunks": [
{
"added": [
" if (!cursorStmt.hasUpdateColumns())"
],
"header": "@@ -390,13 +390,12 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\t\tString[] ucl = cursorStmt.getUpdateColumns();",
"\t\t\tif (ucl == null || (ucl.length == 0))"
]
},
{
"added": [
" resultSet.getResultColumns().checkColumnUpdateability(",
" cursorStmt, currentOfNode.getCursorName());"
],
"header": "@@ -426,8 +425,8 @@ public final class UpdateNode extends DMLModStatementNode",
"removed": [
"\t\t\t\tresultSet.getResultColumns().checkColumnUpdateability(ucl,",
"\t\t\t\t\t\t\t\tcurrentOfNode.getCursorName());"
]
}
]
}
] |
derby-DERBY-6169-e22e8dc7
|
DERBY-6169: Reduce visibility of classes and methods under impl/sql
Remove unused methods and make DDColumnDependableFinder's constructor
package private.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1471382 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DDColumnDependableFinder.java",
"hunks": [
{
"added": [
" DDColumnDependableFinder(int formatId, byte[] columnBitMap)"
],
"header": "@@ -70,7 +70,7 @@ public class DDColumnDependableFinder extends DDdependableFinder",
"removed": [
"\tpublic DDColumnDependableFinder(int formatId, byte[] columnBitMap)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java",
"hunks": [
{
"added": [],
"header": "@@ -395,19 +395,6 @@ class InternalTriggerExecutionContext",
"removed": [
"\t/**",
"\t * Get the columns that have been modified by the statement",
"\t * that caused this trigger to fire. If all columns are",
"\t * modified, will return null (e.g. for INSERT or DELETE will",
"\t * return null).",
"\t *",
"\t * @return an array of Strings",
"\t */",
"\tpublic String[] getModifiedColumns()",
"\t{",
"\t\treturn changedColNames;",
"\t}",
""
]
}
]
}
] |
derby-DERBY-6178-9b362a64
|
DERBY-6178 AutoloadTest does not proprogate original jvm -D flags to spawned JVM, leading to LAB regression test failures
This change disables the AutoloadTest when a non-default base port is
passed to the test run. Currently the test does not work correctly
for multiple concurrent runs using different base ports.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467664 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
" /**",
" * Return if the base port is default or not.",
" *",
" * @return true if base port is default.",
" */",
" public static boolean isDefaultBasePort() {",
" return (basePort == DEFAULT_PORT);",
" }",
""
],
"header": "@@ -1620,6 +1620,15 @@ public final class TestConfiguration {",
"removed": []
}
]
}
] |
derby-DERBY-6179-96110786
|
DERBY-6179 Insert some guarding code into the first replication test to check port availability
Add simplification suggested ny Knut; no functional change.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469165 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java",
"hunks": [
{
"added": [
" waitForAvailablePort(TestConfiguration.getCurrent().getPort());"
],
"header": "@@ -240,7 +240,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" waitForAvailablePort(-1);"
]
},
{
"added": [
" * @param port value."
],
"header": "@@ -249,8 +249,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" * @param port If -1, use default port for configuration, else use this",
" * value."
]
},
{
"added": [
" InetAddress serverAddress = InetAddress.getByName(",
" TestConfiguration.getCurrent().getHostName());"
],
"header": "@@ -260,12 +259,8 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" TestConfiguration conf = TestConfiguration.getCurrent();",
" InetAddress serverAddress = InetAddress.getByName(conf.getHostName());",
"",
" if (port == -1) {",
" port = conf.getPort();",
" }"
]
}
]
}
] |
derby-DERBY-6179-a40bc130
|
DERBY-6179 Insert some guarding code into the first replication test to check port availability
Patch replscratch: checks the availability of the ports needed for the
replication test testReplication_Local_TestStraightReplication (the
first fixture) of the first test in the replication suite. This should
make it readily apparent in test log if there is such a
problem. Presently one needs to dig into the master or slaves' log
files to find that root cause.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1467722 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java",
"hunks": [
{
"added": [
" waitForAvailablePort(-1);",
" }",
"",
"",
" /**",
" * Wait until the specified port has been released by",
" * by earlier test cases, or until the timeout specified by",
" * {@link #getWaitTime()} has elapsed.",
" *",
" * @param port If -1, use default port for configuration, else use this",
" * value.",
" * @throws AssertionFailedError if the port didn't become available before",
" * the timeout",
" * @throws InterruptedException if the thread was interrupted while waiting",
" * for the port to become available",
" * @throws UnknownHostException if the host name couldn't be resolved",
" */",
" public static void waitForAvailablePort(int port)",
" throws InterruptedException, UnknownHostException {",
"",
"",
" if (port == -1) {",
" port = conf.getPort();",
" }",
"",
" BaseTestCase.println(",
" \"probing port for availability: \" + serverAddress + \":\" + port);"
],
"header": "@@ -240,10 +240,36 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" int port = conf.getPort();"
]
},
{
"added": [
" getTimeoutErrorMsg(\"server port to become available\",",
" port),"
],
"header": "@@ -254,7 +280,8 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" getTimeoutErrorMsg(\"server port to become available\"),"
]
},
{
"added": [
" private static String getTimeoutErrorMsg(String failedAction, int port) {",
"",
" private static String getTimeoutErrorMsg(String failedAction) {",
" TestConfiguration conf = TestConfiguration.getCurrent();",
" int port = conf.getPort();",
" return getTimeoutErrorMsg(failedAction, port);",
" }"
],
"header": "@@ -714,11 +741,16 @@ final public class NetworkServerTestSetup extends BaseTestSetup {",
"removed": [
" private static String getTimeoutErrorMsg(String failedAction) {",
" int port = conf.getPort();"
]
}
]
}
] |
derby-DERBY-618-1c4f638d
|
DERBY-1121: remove redundant check for DERBY-618 in checkDriver.out so the
test will run in a remote server configuration.
Committed for Deepa Remesh <dremesh@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@394815 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-618-41c14e50
|
DERBY-618 Make the client driver connection URL work when spaces are in the URL.
Contributed by Deepa Remesh
Attaching a patch 'derby-618-v2.diff' which includes code change and a test for this issue. Patch does the following:
* Modifies ClientDriver.java - removes the space separator in the call to nextToken in tokenizeDatabase method. This allows use of URL containing database name with spaces.
* Adds tests to jdbcapi/checkDriver.java for an url with spaces in database name. Since embedded and jcc driver work with spaces, I added this test for all three frameworks. Test verfies that the specified database gets created.
* Modifies master files for the test
Ran derbyall with Sun JDK 1.4.2 on Windows XP. I also ran jdbcapi/checkDriver.java with j9 vms.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@382917 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6180-35bdb15a
|
DERBY-6180; DatabaseMetaDataTest should not fail if there are extra columns but only check the expected ones
Moving the assertDatabaseMetaDataColumns method to junit.JDBC and making jdbc4.TestDbMetaData use it.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1627578 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
" /**",
" * Takes a result set and an array of expected colum names (as",
" * Strings) and asserts that the column names in the result",
" * set metadata match the number, order, and names of those",
" * in the array.",
" * Does the same for column types",
" * *",
" * @param rs ResultSet for which we're checking column names.",
" * @param expectedTypes Array of expected types for the columns.",
" * @param expectedColNames Array of expected column names.",
" */",
" public static void assertDatabaseMetaDataColumns(ResultSet rs,",
" int[] expectedTypes, ",
" String... expectedColNames) throws SQLException",
" {",
" assertDatabaseMetaDataColumns(rs, null, expectedTypes, expectedColNames);",
" } ",
" /**",
" * Takes a result set and an array of expected colum names (as",
" * Strings) and asserts that the column names in the result",
" * set metadata match the number, order, and names of those",
" * in the array.",
" * Does the same for column types and nullability.",
" * ",
" * This is a variation of JDBC.assertColumnNames, here we only compare",
" * the expected columns and ignore additional ones, because columns ",
" * returned from DatabaseMetaData can be added to with newer JDBC versions.",
" * If the ResultSet can not change over time, JDBC.assertColumnNames ",
" * should be used. See DERBY-6180.",
" *",
" * @param rs ResultSet for which we're checking column names.",
" * @param expectedTypes Array of expected types for the columns.",
" * @param nullability Array of expected nullability values for the columns.",
" * @param expectedColNames Array of expected column names.",
" */",
" public static void assertDatabaseMetaDataColumns(ResultSet rs,",
" boolean[] nullability, int[] expectedTypes, ",
" String... expectedColNames) throws SQLException",
" {",
" ResultSetMetaData rsmd = rs.getMetaData();",
" int actualCols = rsmd.getColumnCount();",
" String actualColNames=\"[\";",
" for (int c = 0; c < rsmd.getColumnCount(); c++) {",
" if (c==0)",
" actualColNames=actualColNames + rsmd.getColumnName(c+1);",
" else",
" actualColNames=actualColNames + \", \" + rsmd.getColumnName(c+1);",
" }",
" actualColNames=actualColNames + \"]\";",
" ",
" if (nullability != null)",
" Assert.assertEquals(\"Number of items in expected ColumnNames and \" +",
" \"expected nullability arrays don't match; fix up the test\", ",
" expectedColNames.length, nullability.length);",
" if (expectedTypes != null)",
" Assert.assertEquals(\"Number of items in expected ColumnNames and \" +",
" \"expected ColumnTypes arrays don't match; fix up the test\", ",
" expectedColNames.length, expectedTypes.length);",
" ",
" if (expectedColNames.length == rsmd.getColumnCount()) {",
" // the count is the same, expect the names to be the same too",
" for (int i = 0; i < actualCols; i++)",
" {",
" Assert.assertEquals(\"Column names do not match:\",",
" expectedColNames[i], rsmd.getColumnName(i+1));",
" if (expectedTypes != null)",
" Assert.assertEquals(\"Column types do not match for column \" ",
" + (i+1),",
" expectedTypes[i], rsmd.getColumnType(i+1));",
" if (nullability != null) {",
" int expected = nullability[i] ?",
" ResultSetMetaData.columnNullable : ",
" ResultSetMetaData.columnNoNulls;",
" Assert.assertEquals(",
" \"Column nullability do not match for column \" +",
" (i+1), expected, rsmd.isNullable(i+1));",
" }",
" }",
" }",
" else",
" {",
" for (int i = 0; i < expectedColNames.length; i++)",
" {",
" String expectedColName = expectedColNames[i];",
" boolean found=false;",
" for (int j = 0 ; j < rsmd.getColumnCount(); j++)",
" {",
" if (expectedColNames[i].equalsIgnoreCase(",
" rsmd.getColumnName(j+1)))",
" {",
" found = true;",
" if (expectedTypes != null)",
" Assert.assertEquals(\"Column Type does not match for column \" +",
" expectedColNames[i] + \"(\" + (i) + \")\",",
" expectedTypes[i], rsmd.getColumnType(j+1));",
" if (nullability != null) {",
" int expected = nullability[i] ?",
" ResultSetMetaData.columnNullable : ",
" ResultSetMetaData.columnNoNulls;",
" Assert.assertEquals(",
" \"Column nullability does not match for \" +",
" \"column \" + (i), expected, rsmd.isNullable(j+1));",
" }",
" break;",
" }",
" else {",
" continue;",
" }",
" }",
" Assert.assertTrue(\"Missing an expected column: \" + expectedColName + ",
" \"\\n Expected: \" + Arrays.toString(expectedColNames) +",
" \"\\n Actual : \" + actualColNames,",
" found);",
" }",
" }",
" }"
],
"header": "@@ -844,6 +844,122 @@ public class JDBC {",
"removed": []
}
]
}
] |
derby-DERBY-6180-5b451646
|
DERBY-6180; DatabaseMetaDataTest should not fail if there are extra columns but only check the expected ones
Making DatabaseMetaDataTest use a local method that only checks the expected columns.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1627436 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6181-b5468e93
|
DERBY-6181; fix AutoloadTest to support running concurrently when different base ports are specified.
Re-enable the test, passing the baseport on to when set, including on to spawned processes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480462 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6184-0fad4e6d
|
DERBY-6184: Clean up warnings in XA transaction id classes
- simplify existing cloning of arrays by using clone() instead of
calling new and arraycopy
- reduce visibility of array-returning methods in GlobalXactId to make
it clearer for code analysis tools that they are not called from
outside of the package in which the class lives
- remove said methods from the GlobalTransactionId to allow them to be
non-public
- make the public, array-returning methods in XAXactId return copies
of the internal arrays to protect the internal state, as instances
of this class may be returned all the way out to the user
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469243 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/store/access/xa/XAXactId.java",
"hunks": [
{
"added": [
" this.global_id = (byte[]) global_id.clone();",
" this.branch_id = (byte[]) branch_id.clone();"
],
"header": "@@ -64,10 +64,8 @@ public class XAXactId extends GlobalXact implements Xid",
"removed": [
"\t\tthis.global_id = new byte[global_id.length];",
"\t\tSystem.arraycopy(global_id, 0, this.global_id, 0, global_id.length);",
"\t\tthis.branch_id = new byte[branch_id.length];",
"\t\tSystem.arraycopy(branch_id, 0, this.branch_id, 0, branch_id.length);"
]
},
{
"added": [
" return (byte[]) global_id.clone();"
],
"header": "@@ -229,7 +227,7 @@ public class XAXactId extends GlobalXact implements Xid",
"removed": [
" return(global_id);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java",
"hunks": [
{
"added": [],
"header": "@@ -38,8 +38,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import org.apache.derby.catalog.UUID;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/GlobalXactId.java",
"hunks": [
{
"added": [],
"header": "@@ -23,15 +23,11 @@ package org.apache.derby.impl.store.raw.xact;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.catalog.UUID;",
"import org.apache.derby.iapi.util.ByteArray;",
""
]
},
{
"added": [
" GlobalXactId(",
" this.global_id = (byte[]) global_id.clone();",
" this.branch_id = (byte[]) branch_id.clone();"
],
"header": "@@ -47,16 +43,14 @@ public class GlobalXactId extends GlobalXact implements GlobalTransactionId",
"removed": [
"\tpublic GlobalXactId(",
"\t\tthis.global_id = new byte[global_id.length];",
"\t\tSystem.arraycopy(global_id, 0, this.global_id, 0, global_id.length);",
"\t\tthis.branch_id = new byte[branch_id.length];",
"\t\tSystem.arraycopy(branch_id, 0, this.branch_id, 0, branch_id.length);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/XactFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -35,7 +35,6 @@ import org.apache.derby.iapi.services.monitor.ModuleSupportable;",
"removed": [
"import org.apache.derby.iapi.services.io.FormatIdUtil;"
]
},
{
"added": [],
"header": "@@ -43,14 +42,8 @@ import org.apache.derby.iapi.store.access.AccessFactoryGlobals;",
"removed": [
"import org.apache.derby.iapi.store.access.AccessFactory;",
"",
"import org.apache.derby.iapi.store.access.xa.XAResourceManager;",
"",
"import org.apache.derby.iapi.store.raw.GlobalTransactionId;",
"import org.apache.derby.iapi.store.raw.Transaction;"
]
},
{
"added": [],
"header": "@@ -60,7 +53,6 @@ import org.apache.derby.iapi.store.raw.log.LogInstant;",
"removed": [
"import org.apache.derby.impl.store.raw.xact.XactXAResourceManager;"
]
},
{
"added": [],
"header": "@@ -68,9 +60,7 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import java.util.Enumeration;",
"import java.util.Hashtable;"
]
},
{
"added": [
" private Xact startCommonTransaction("
],
"header": "@@ -311,7 +301,7 @@ public class XactFactory implements TransactionFactory, ModuleControl, ModuleSup",
"removed": [
"\tprivate RawTransaction startCommonTransaction("
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/XactXAResourceManager.java",
"hunks": [
{
"added": [],
"header": "@@ -33,7 +33,6 @@ import org.apache.derby.iapi.store.access.xa.XAResourceManager;",
"removed": [
"import org.apache.derby.iapi.store.raw.GlobalTransactionId;"
]
},
{
"added": [
" GlobalXactId xa_id = (GlobalXactId) xact.getGlobalId();"
],
"header": "@@ -253,7 +252,7 @@ public class XactXAResourceManager implements XAResourceManager",
"removed": [
" GlobalTransactionId xa_id = xact.getGlobalId();"
]
}
]
}
] |
derby-DERBY-6185-8c151840
|
DERBY-6185 (Query against view with "where name LIKE 'Col1' ESCAPE '\' " failed)
During optimizer's pre-processing phase, while cloning a BinaryComparisonOperatorNode, we were not copying the entire state.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1471022 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\t\t\t \tBoolean.FALSE,"
],
"header": "@@ -123,6 +123,7 @@ public class BetweenOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\t\t\t \tBoolean.FALSE,"
],
"header": "@@ -139,6 +140,7 @@ public class BetweenOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\t \tBoolean.FALSE,"
],
"header": "@@ -224,6 +226,7 @@ public class BetweenOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t \tBoolean.FALSE,"
],
"header": "@@ -243,6 +246,7 @@ public class BetweenOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\t\t \tBoolean.FALSE,"
],
"header": "@@ -302,6 +306,7 @@ public class BetweenOperatorNode extends BinaryListOperatorNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java",
"hunks": [
{
"added": [
"\t//DERBY-6185 (Query against view with \"where name LIKE ",
"\t// 'Col1' ESCAPE '\\' \" failed)",
"\t//4th argument forQueryRewrite can be true only if this node has been ",
"\t// added by an internal rewrite of the query. This allows binding to ",
"\t// be more liberal when checking it against allowed syntax.",
"\t// This parameter will be passed FALSE when a new instance of the node",
"\t// is being created(which is the majority of the cases). But when an ",
"\t// existing node is getting cloned, the value of this parameter should ",
"\t// be passed as the originalNode.getForQueryRewrite(). Examples of this",
"\t// can be found in Predicate.Java and PredicateList.java",
"\tpublic void init(Object leftOperand, Object rightOperand,",
" Object forQueryRewrite)"
],
"header": "@@ -86,7 +86,18 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\tpublic void init(Object leftOperand, Object rightOperand)"
]
},
{
"added": [
"\t\tsuper.init(leftOperand, rightOperand, operatorName, methodName, forQueryRewrite);"
],
"header": "@@ -135,7 +146,7 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\t\tsuper.init(leftOperand, rightOperand, operatorName, methodName);"
]
},
{
"added": [
"\t * DERBY-6185 (Query against view with \"where name LIKE ",
"\t * 'Col1' ESCAPE '\\' \" failed)",
"\t * 4th argument forQueryRewrite can be true only if this node has been",
"\t * added by an internal rewrite of the query. This allows binding to",
"\t * be more liberal when checking it against allowed syntax.",
"\t * This parameter will be passed FALSE when a new instance of the node",
"\t * is being created(which is the majority of the cases). But when an ",
"\t * existing node is getting cloned, the value of this parameter should",
"\t * be passed as the originalNode.getForQueryRewrite(). Examples of this",
"\t * can be found in Predicate.Java and PredicateList.java",
"\tpublic void init(Object leftOperand, Object rightOperand,",
"\t\t\t Object inListOp, Object forQueryRewrite)",
"\t\tinit(leftOperand, rightOperand, forQueryRewrite);"
],
"header": "@@ -144,10 +155,21 @@ public class BinaryRelationalOperatorNode",
"removed": [
"\tpublic void init(Object leftOperand, Object rightOperand, Object inListOp)",
"\t\tinit(leftOperand, rightOperand);"
]
},
{
"added": [
"\t\t\t\t\t\t\t\t\t Boolean.FALSE,"
],
"header": "@@ -1047,6 +1069,7 @@ public class BinaryRelationalOperatorNode",
"removed": []
},
{
"added": [
" Boolean.FALSE,"
],
"header": "@@ -1092,6 +1115,7 @@ public class BinaryRelationalOperatorNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/InListOperatorNode.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -145,6 +145,7 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -287,6 +288,7 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -356,6 +358,7 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
},
{
"added": [
"\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -450,6 +453,7 @@ public final class InListOperatorNode extends BinaryListOperatorNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java",
"hunks": [
{
"added": [
" Boolean.FALSE,"
],
"header": "@@ -396,6 +396,7 @@ public final class LikeEscapeOperatorNode extends TernaryOperatorNode",
"removed": []
},
{
"added": [
" Boolean.FALSE,",
" getContextManager());"
],
"header": "@@ -675,7 +676,8 @@ public final class LikeEscapeOperatorNode extends TernaryOperatorNode",
"removed": [
" getContextManager());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\t\t\t\t\tBoolean.valueOf(opNode.getForQueryRewrite()),"
],
"header": "@@ -1571,6 +1571,7 @@ public class PredicateList extends QueryTreeNodeVector implements OptimizablePre",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -1615,6 +1615,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
},
{
"added": [
" \t\t\t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -2379,6 +2380,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
},
{
"added": [
" \t\t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -2387,6 +2389,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
},
{
"added": [
" \t\t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -2395,6 +2398,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
},
{
"added": [
" \t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -2403,6 +2407,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
},
{
"added": [
" \t\t\t\t\t\t\tBoolean.FALSE,"
],
"header": "@@ -2411,6 +2416,7 @@ public class SubqueryNode extends ValueNode",
"removed": []
}
]
}
] |
derby-DERBY-6186-3221b8c5
|
DERBY-6186: Encapsulation improvements
- Use DataDescriptorGenerator.newTriggerDescriptor() to build descriptor
in SYSTRIGGERSRowFactory instead of calling constructor directly
- Make TriggerDescriptor's constructor package private
- Make UserDescriptor's constructor package private
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469240 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/UserDescriptor.java",
"hunks": [
{
"added": [],
"header": "@@ -24,10 +24,6 @@ package org.apache.derby.iapi.sql.dictionary;",
"removed": [
"import org.apache.derby.iapi.error.StandardException;",
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -25,15 +25,10 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": [
"import org.apache.derby.iapi.types.SQLTimestamp;",
"import org.apache.derby.iapi.types.TypeId;",
"import org.apache.derby.iapi.types.TypeId;",
"",
"import org.apache.derby.iapi.types.RowLocation;"
]
},
{
"added": [],
"header": "@@ -42,13 +37,11 @@ import org.apache.derby.iapi.sql.dictionary.SystemColumn;",
"removed": [
"import org.apache.derby.iapi.sql.execute.ExecIndexRow;",
"import org.apache.derby.iapi.services.monitor.Monitor;"
]
},
{
"added": [
" descriptor = ddg.newTriggerDescriptor("
],
"header": "@@ -399,8 +392,7 @@ public class SYSTRIGGERSRowFactory extends CatalogRowFactory",
"removed": [
"\t\tdescriptor = new TriggerDescriptor(",
"\t\t\t\t\t\t\t\t\tdd,"
]
}
]
}
] |
derby-DERBY-6193-9b33bd11
|
DERBY-6193: AutomaticIndexStatisticsTest doesn't delete its single-use database
Delete the extra database on successful completion. Also wrap the test
in a CleanDatabaseTestSetup so that it also cleans up the default
database when it's done.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1471264 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6211-049f993f
|
DERBY-6211: Cleanup optimizer trace support.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1478932 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/db/OptimizerTrace.java",
"hunks": [
{
"added": [
"import java.io.PrintWriter;",
"import java.io.StringWriter;",
"import org.apache.derby.iapi.sql.compile.OptTrace;",
"import org.apache.derby.impl.sql.compile.DefaultOptTrace;",
""
],
"header": "@@ -21,11 +21,16 @@",
"removed": []
},
{
"added": [
"\t * Turn default optimizer tracing on or off.",
"\t * @param onOrOff Whether to turn optimizer tracing on (true) or off (false).",
"\tpublic static void setOptimizerTrace( boolean onOrOff )",
" OptTrace optimizerTracer = onOrOff ? new DefaultOptTrace() : null;",
" setOptimizerTracer( optimizerTracer );",
"\t * Install an optimizer tracer (to enable tracing) or uninstall the current optimizer tracer",
" * (to disable tracing).",
"\t * @param tracer Null if tracing is being turned off, otherwise an optimizer tracer",
"\tpublic static void setOptimizerTracer( OptTrace tracer )",
" ConnectionUtil.getCurrentLCC().setOptimizerTracer( tracer );",
"\t\tcatch (Throwable t) {}",
"\t}",
"",
"\t/**",
"\t * Get the current optimizer tracer, if any.",
"\t */",
"\tpublic static OptTrace getOptimizerTracer()",
"\t{",
"\t\ttry",
" return ConnectionUtil.getCurrentLCC().getOptimizerTracer();",
"\t\tcatch (Throwable t) { return null; }",
"",
"\t * Get the optimizer trace output for the last optimized query as a String."
],
"header": "@@ -35,68 +40,47 @@ import org.apache.derby.iapi.sql.conn.ConnectionUtil;",
"removed": [
"\t * Control whether or not optimizer trace is on.",
"\t *",
"\t * @param onOrOff Whether to turn optimizer trace on (true) or off (false).",
"\t * @return Whether or not the call was successful. (false will be returned when optimizer tracing is not supported.)",
"\tpublic static boolean setOptimizerTrace(boolean onOrOff)",
"\t\tboolean retCode = false;",
"",
"\t\ttry",
"\t\t{",
"\t\t\t// Get the current language connection context. This is associated",
"\t\t\t// with the current database.",
"\t\t\tLanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();",
"\t\t\tretCode = lcc.setOptimizerTrace(onOrOff);",
"\t\t}",
"\t\tcatch (Throwable t)",
"\t\t{",
"\t\t\t// eat all exceptions, simply return false",
"\t\t}",
"\t\treturn retCode;",
" /**",
" * Null out the optimizer trace.",
" */",
" public static void nullifyTrace() throws SQLException",
" {",
" ConnectionUtil.getCurrentLCC().setOptimizerTraceOutput( null );",
" }",
"",
"\t * Control whether or not optimizer trace is generated in html.",
"\t *",
"\t * @param onOrOff Whether or not optimizer trace will be in html (true) or not (false).",
"\t * @return Whether or not the call was successful. (false will be returned when optimizer tracing is not supported.)",
"\tpublic static boolean setOptimizerTraceHtml(boolean onOrOff)",
"\t\tboolean retCode = false;",
"",
"\t\t\t// Get the current language connection context. This is associated",
"\t\t\t// with the current database.",
"\t\t\tLanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();",
"\t\t\tretCode = lcc.setOptimizerTraceHtml(onOrOff);",
"\t\tcatch (Throwable t)",
"\t\t\t// eat all exceptions, simply return false",
"",
"\t\treturn retCode;",
"\t * Get the optimizer trace output for the last optimized query as a String. If optimizer trace",
"\t * html is on, then the String will contain the html tags."
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/OptTrace.java",
"hunks": [
{
"added": [
"import java.io.PrintWriter;",
""
],
"header": "@@ -21,6 +21,8 @@",
"removed": []
},
{
"added": [
" /** Start the start of tracing a statement. */",
" public void traceStartStatement( String statementText );",
"",
" public void traceStart( long timeOptimizationStarted, int optimizerID );"
],
"header": "@@ -41,8 +43,11 @@ public interface OptTrace",
"removed": [
" public void traceStart( long timeOptimizationStarted );"
]
},
{
"added": [
" public void traceModifyingAccessPaths( int optimizerID );"
],
"header": "@@ -60,7 +65,7 @@ public interface OptTrace",
"removed": [
" public void traceModifyingAccessPaths();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptTrace;"
],
"header": "@@ -23,6 +23,7 @@ package org.apache.derby.iapi.sql.conn;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultOptTrace.java",
"hunks": [
{
"added": [
"import java.io.PrintWriter;",
""
],
"header": "@@ -21,8 +21,9 @@",
"removed": [
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;"
]
},
{
"added": [
" private StringBuffer _buffer;"
],
"header": "@@ -52,8 +53,7 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" private LanguageConnectionContext _lcc;",
" private int _optimizerID;"
]
},
{
"added": [
" public DefaultOptTrace()",
" _buffer = new StringBuffer();"
],
"header": "@@ -62,10 +62,9 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" public DefaultOptTrace( LanguageConnectionContext lcc, int optimizerID )",
" _lcc = lcc;",
" _optimizerID = optimizerID;"
]
},
{
"added": [
" public void traceStartStatement( String statementText )",
" {",
" appendTraceString( statementText );",
" }",
" ",
" public void traceStart( long timeOptimizationStarted, int optimizerID )",
" \" using optimizer \" + optimizerID"
],
"header": "@@ -74,13 +73,18 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" public void traceStart( long timeOptimizationStarted )",
" \" using optimizer \" + _optimizerID"
]
},
{
"added": [
" public void traceModifyingAccessPaths( int optimizerID )",
" appendTraceString( \"Modifying access paths using optimizer \" + optimizerID );"
],
"header": "@@ -114,9 +118,9 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" public void traceModifyingAccessPaths()",
" appendTraceString( \"Modifying access paths using optimizer \" + _optimizerID );"
]
},
{
"added": [
" public void printToWriter( PrintWriter out )",
" {",
" out.println( _buffer.toString() );",
" }",
" "
],
"header": "@@ -473,6 +477,11 @@ public class DefaultOptTrace implements OptTrace",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -135,11 +135,6 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t// optimizer trace",
"\tprotected boolean optimizerTrace;",
"\tprotected boolean optimizerTraceHtml;",
" private OptTrace _tracer;",
""
]
},
{
"added": [
" public boolean tracingIsOn() { return lcc.optimizerTracingIsOn(); }"
],
"header": "@@ -359,7 +354,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
" public boolean tracingIsOn() { return optimizerTrace; }"
]
},
{
"added": [
"\t\t\tif ( tracingIsOn() ) { tracer().traceVacuous(); }"
],
"header": "@@ -377,7 +372,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace) { tracer().traceVacuous(); }"
]
},
{
"added": [
"\t\t\tif (tracingIsOn() && timeExceeded) { tracer().traceTimeout( currentTime, bestCost ); }"
],
"header": "@@ -407,7 +402,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace && timeExceeded) { tracer().traceTimeout( currentTime, bestCost ); }"
]
},
{
"added": [
" if (tracingIsOn())"
],
"header": "@@ -563,7 +558,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
" if (optimizerTrace)"
]
},
{
"added": [
"\t\t\t\t\t\tif (tracingIsOn())"
],
"header": "@@ -792,7 +787,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\tif (optimizerTrace)"
]
},
{
"added": [
"\t\t\t\t\t\t\tif (tracingIsOn()) { tracer().traceIllegalUserJoinOrder(); }"
],
"header": "@@ -803,7 +798,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\t\tif (optimizerTrace) { tracer().traceIllegalUserJoinOrder(); }"
]
},
{
"added": [
"\t\t\t\t\t\tif (tracingIsOn()) { tracer().traceIllegalUserJoinOrder(); }",
"\t\t\t\t\tif (tracingIsOn()) { tracer().traceUserJoinOrderOptimized(); }"
],
"header": "@@ -828,12 +823,12 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\tif (optimizerTrace) { tracer().traceIllegalUserJoinOrder(); }",
"\t\t\t\t\tif (optimizerTrace) { tracer().traceUserJoinOrderOptimized(); }"
]
},
{
"added": [
"\t\t\tif (tracingIsOn())"
],
"header": "@@ -953,7 +948,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace)"
]
},
{
"added": [
"\t\t\tif (tracingIsOn())",
" tracer().traceCostWithoutSortAvoidance( currentCost );",
"\t\t\t\tif (tracingIsOn()) { tracer().traceCompleteJoinOrder(); }"
],
"header": "@@ -1614,15 +1609,16 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace) { tracer().traceCostWithoutSortAvoidance( currentCost ); }",
"\t\t\t\tif (optimizerTrace) { tracer().traceCompleteJoinOrder(); }"
]
},
{
"added": [
"\t\t\t\t\tif (tracingIsOn()) { tracer().traceSortCost( sortCost, currentCost ); }"
],
"header": "@@ -1704,7 +1700,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\tif (optimizerTrace) { tracer().traceSortCost( sortCost, currentCost ); }"
]
},
{
"added": [
"\t\t\t\t\t\tif (tracingIsOn()) { tracer().traceCurrentPlanAvoidsSort( bestCost, currentSortAvoidanceCost ); }"
],
"header": "@@ -1772,7 +1768,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\t\t\t\tif (optimizerTrace) { tracer().traceCurrentPlanAvoidsSort( bestCost, currentSortAvoidanceCost ); }"
]
},
{
"added": [
"\t\tif (tracingIsOn()) { tracer().traceCheapestPlanSoFar( planType, currentCost ); }"
],
"header": "@@ -1802,7 +1798,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\tif (optimizerTrace) { tracer().traceCheapestPlanSoFar( planType, currentCost ); }"
]
},
{
"added": [
"\t\tif (tracingIsOn())"
],
"header": "@@ -1843,7 +1839,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\tif (optimizerTrace)"
]
},
{
"added": [
"\t\t\tif (tracingIsOn()) { tracer().traceSkippingBecauseTooMuchMemory( maxMemoryPerTable ); }"
],
"header": "@@ -2163,7 +2159,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace) { tracer().traceSkippingBecauseTooMuchMemory( maxMemoryPerTable ); }"
]
},
{
"added": [
"\t\t\tif (tracingIsOn()) { tracer().traceSkippingBecauseTooMuchMemory( maxMemoryPerTable ); }"
],
"header": "@@ -2297,7 +2293,7 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\t\tif (optimizerTrace) { tracer().traceSkippingBecauseTooMuchMemory( maxMemoryPerTable ); }"
]
},
{
"added": [
"\t\tif (tracingIsOn()) { tracer().traceModifyingAccessPaths( hashCode() ); }",
"\t\t\tif (tracingIsOn()) { tracer().traceNoBestPlan(); }"
],
"header": "@@ -2383,11 +2379,11 @@ public class OptimizerImpl implements Optimizer",
"removed": [
"\t\tif (optimizerTrace) { tracer().traceModifyingAccessPaths(); }",
"\t\t\tif (optimizerTrace) { tracer().traceNoBestPlan(); }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptTrace;"
],
"header": "@@ -41,6 +41,7 @@ import org.apache.derby.iapi.db.Database;",
"removed": []
},
{
"added": [
" private OptTrace optimizerTracer;"
],
"header": "@@ -273,10 +274,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" private boolean optimizerTrace;",
" private boolean optimizerTraceHtml;",
" private String lastOptimizerTraceOutput;",
" private String optimizerTraceOutput;"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java",
"hunks": [
{
"added": [
"import java.io.PrintWriter;",
"import org.apache.derby.iapi.sql.compile.OptTrace;"
],
"header": "@@ -21,10 +21,11 @@",
"removed": [
"import java.io.FileWriter;"
]
},
{
"added": [
" * Print the optimizer trace and turn off tracing. Takes optional parameters:"
],
"header": "@@ -75,7 +76,7 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": [
" * Dump the optimizer trace and turn off tracing. Takes optional parameters:"
]
},
{
"added": [
" try {",
" OptTrace tracer = OptimizerTrace.getOptimizerTracer();",
" boolean needsClosing = false;",
"",
" PrintWriter pw;",
" if (",
" (configurationParameters != null) &&",
" (configurationParameters.length > 0)",
" )",
" {",
" pw = new PrintWriter( configurationParameters[ 0 ] );",
" needsClosing = true;",
" }",
" else { pw = new PrintWriter( System.out ); }",
" if ( tracer != null )",
" {",
" tracer.printToWriter( pw );",
" pw.flush();",
" }",
" if ( needsClosing ) { pw.close(); }",
" catch (Exception e) { throw wrap( e ); }",
" finally",
" OptimizerTrace.setOptimizerTracer( null );"
],
"header": "@@ -85,30 +86,34 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": [
" String trace = OptimizerTrace.getOptimizerTraceOutput();",
" if ( trace == null ) { trace = \"\"; }",
"",
" OptimizerTrace.nullifyTrace();",
" if (",
" (configurationParameters != null) &&",
" (configurationParameters.length > 0)",
" )",
" {",
" try {",
" FileWriter writer = new FileWriter( configurationParameters[ 0 ] );",
" writer.write( trace );",
" writer.flush();",
" writer.close();",
" } catch (Exception e) { throw wrap( e ); }",
" else",
" System.out.println( trace );",
"",
" OptimizerTrace.setOptimizerTrace( false );"
]
}
]
}
] |
derby-DERBY-6211-23e89ebd
|
DERBY-6211: Add basic tests for xml-based optimizer tracing; tests passed cleanly on derby-6211-09-aa-addTests.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1500056 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java",
"hunks": [
{
"added": [
"import java.io.IOException;",
"import java.security.AccessController;",
"import java.security.PrivilegedAction;"
],
"header": "@@ -21,7 +21,10 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/XMLOptTrace.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptimizerPlan;",
"import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"import org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor;"
],
"header": "@@ -39,10 +39,13 @@ import org.apache.derby.iapi.sql.compile.OptTrace;",
"removed": []
},
{
"added": [],
"header": "@@ -106,7 +109,6 @@ class XMLOptTrace implements OptTrace",
"removed": [
" private static final String PC_VERBOSE= \"pcVerbose\";"
]
},
{
"added": [],
"header": "@@ -140,7 +142,6 @@ class XMLOptTrace implements OptTrace",
"removed": [
" \" verbose varchar( 32672 ),\\n\" +"
]
},
{
"added": [
" \" asList( '\" + PC_COMPLETE + \"', '\" + PC_SUMMARY + \"', '\" + PC_TYPE + \"', '\" +"
],
"header": "@@ -158,7 +159,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" \" asList( '\" + PC_COMPLETE + \"', '\" + PC_SUMMARY + \"', '\" + PC_VERBOSE + \"', '\" + PC_TYPE + \"', '\" +"
]
},
{
"added": [
" // context",
" private ContextManager _cm;",
" private LanguageConnectionContext _lcc;",
""
],
"header": "@@ -186,6 +187,10 @@ class XMLOptTrace implements OptTrace",
"removed": []
},
{
"added": [
"",
" if ( i == 0 )",
" {",
" _cm = ((QueryTreeNode) opt).getContextManager();",
" _lcc = (LanguageConnectionContext) _cm.getContext( LanguageConnectionContext.CONTEXT_ID );",
" }",
" "
],
"header": "@@ -248,6 +253,13 @@ class XMLOptTrace implements OptTrace",
"removed": []
},
{
"added": [
" return makeTableName( td.getSchemaName(), td.getName(), _cm );"
],
"header": "@@ -489,15 +501,13 @@ class XMLOptTrace implements OptTrace",
"removed": [
" ContextManager cm = ((QueryTreeNode) optimizable).getContextManager();",
" ",
" return makeTableName( td.getSchemaName(), td.getName(), cm );"
]
},
{
"added": [
" return makeTableName( ad.getSchemaName(), ad.getName(), _cm );"
],
"header": "@@ -505,7 +515,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return makeTableName( ad.getSchemaName(), ad.getName(), cm );"
]
},
{
"added": [
" return makeTableName( null, unqualifiedName, _cm );"
],
"header": "@@ -523,7 +533,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return makeTableName( null, unqualifiedName, cm );"
]
},
{
"added": [
" createElement( cost, PC_SUMMARY, formatPlanSummary( planOrder, planType ) );"
],
"header": "@@ -597,8 +607,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" createElement( cost, PC_SUMMARY, formatPlanSummary( planOrder, planType, false ) );",
" createElement( cost, PC_VERBOSE, formatPlanSummary( planOrder, planType, true ) );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/vti/XmlVTI.java",
"hunks": [
{
"added": [
"import java.io.IOException;",
"import java.security.AccessController;",
"import java.security.PrivilegedAction;"
],
"header": "@@ -23,6 +23,9 @@ package org.apache.derby.vti;",
"removed": []
},
{
"added": [
"import org.xml.sax.SAXException;"
],
"header": "@@ -34,6 +37,7 @@ import org.w3c.dom.Document;",
"removed": []
}
]
}
] |
derby-DERBY-6211-270c77b2
|
DERBY-6211: Mark the end of join optimization with a call to traceEndQueryBlock(); commit derby-6211-13-aa-SelectNode_optimizer.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1512294 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptimizableList;",
"import org.apache.derby.iapi.sql.compile.OptimizablePredicateList;",
"import org.apache.derby.iapi.sql.compile.OptimizerFactory;",
"import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;"
],
"header": "@@ -32,8 +32,12 @@ import org.apache.derby.iapi.services.context.ContextManager;",
"removed": []
}
]
}
] |
derby-DERBY-6211-2c50eb38
|
DERBY-6211: Move optimizer tracer from tools jar to engine jar.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479642 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java",
"hunks": [
{
"added": [
" Derby - Class org.apache.derby.impl.sql.compile.OptimizerTracer"
],
"header": "@@ -1,6 +1,6 @@",
"removed": [
" Derby - Class org.apache.derby.impl.tools.optional.OptimizerTracer"
]
},
{
"added": [
"package org.apache.derby.impl.sql.compile;",
"import org.apache.derby.iapi.reference.SQLState;",
"import org.apache.derby.iapi.services.i18n.MessageService;",
" * OptionalTool for tracing the Optimizer."
],
"header": "@@ -19,25 +19,23 @@",
"removed": [
"package org.apache.derby.impl.tools.optional;",
"import org.apache.derby.iapi.tools.i18n.LocalizedResource;",
"import org.apache.derby.impl.sql.compile.DefaultOptTrace;",
"",
" * OptionalTool to create wrapper functions and views for all of the user tables",
" * in a foreign database."
]
},
{
"added": [
" { throw wrap( MessageService.getTextMessage( SQLState.LANG_BAD_OPTIONAL_TOOL_ARGS ) ); }"
],
"header": "@@ -93,7 +91,7 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": [
" { throw wrap( LocalizedResource.getMessage( \"OT_BadLoadUnloadArgs\" ) ); }"
]
}
]
}
] |
derby-DERBY-6211-3c3e7dbf
|
DERBY-6211: Trace the end of optimizing a query block so that the xml-based optimizer tracer can associate trace information with the correct query block; commits derby-6211-12-aa-traceEndOfQueryBlock.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1511315 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/OptimizerPlan.java",
"hunks": [
{
"added": [
" public abstract OptimizerPlan leftmostLeaf();"
],
"header": "@@ -116,7 +116,7 @@ public abstract class OptimizerPlan",
"removed": [
" public abstract RowSource leftmostLeaf();"
]
},
{
"added": [
" public OptimizerPlan leftmostLeaf() { return leftChild.leftmostLeaf(); }"
],
"header": "@@ -179,7 +179,7 @@ public abstract class OptimizerPlan",
"removed": [
" public RowSource leftmostLeaf() { return leftChild.leftmostLeaf(); }"
]
},
{
"added": [
" /** Generic plan for row sources we don't understand */",
" public static class DeadEnd extends OptimizerPlan",
" {",
" private String _name;",
"",
" public DeadEnd( String name )",
" {",
" _name = name;",
" }",
"",
" public void bind",
" (",
" DataDictionary dataDictionary,",
" LanguageConnectionContext lcc,",
" CompilerContext cc",
" )",
" throws StandardException",
" {}",
" ",
" public boolean isBound() { return true; }",
"",
" public int countLeafNodes() { return 1; }",
"",
" public OptimizerPlan leftmostLeaf() { return this; }",
" ",
" public boolean isLeftPrefixOf( OptimizerPlan that )",
" {",
" return this.equals( that.leftmostLeaf() );",
" }",
" ",
" public String toString() { return _name; }",
" }",
""
],
"header": "@@ -218,6 +218,39 @@ public abstract class OptimizerPlan",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultOptTrace.java",
"hunks": [
{
"added": [
" public void traceStartQueryBlock( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList )"
],
"header": "@@ -78,7 +78,7 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" public void traceStart( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java",
"hunks": [
{
"added": [
" // recursively create a new optimizer"
],
"header": "@@ -847,6 +847,7 @@ abstract class TableOperatorNode extends FromTable",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/XMLOptTrace.java",
"hunks": [
{
"added": [
"import java.util.Stack;"
],
"header": "@@ -22,6 +22,7 @@ package org.apache.derby.impl.sql.compile;",
"removed": []
},
{
"added": [
" ////////////////////////////////////////////////////////////////////////",
" //",
" //\tNESTED CLASSES",
" //",
" ////////////////////////////////////////////////////////////////////////",
"",
" public static final class QueryBlock",
" {",
" final int queryBlockID;",
" final OptimizableList optimizableList;",
" final Element queryBlockElement;",
" ",
" Element currentJoinsElement;",
" int[] currentJoinOrder;",
" Element currentBestPlan;",
"",
" // reset per join order",
" JoinStrategy currentDecorationStrategy;",
" Element currentDecoration;",
"",
" public QueryBlock",
" (",
" int queryBlockID,",
" OptimizableList optimizableList,",
" Element queryBlockElement",
" )",
" {",
" this.queryBlockID = queryBlockID;",
" this.optimizableList = optimizableList;",
" this.queryBlockElement = queryBlockElement;",
" }",
" }",
""
],
"header": "@@ -164,6 +165,39 @@ class XMLOptTrace implements OptTrace",
"removed": []
},
{
"added": [
" private QueryBlock _currentQueryBlock;",
" private int _maxQueryID;",
" // pushed and popped on query block boundaries",
" private Stack<QueryBlock> _queryBlockStack;"
],
"header": "@@ -175,17 +209,12 @@ class XMLOptTrace implements OptTrace",
"removed": [
" private Element _currentQuery;",
" private int _currentQueryID;",
" private OptimizableList _currentOptimizableList;",
" private Element _currentJoinsElement;",
" private int[] _currentJoinOrder;",
" private Element _currentBestPlan;",
" // reset per join order",
" private JoinStrategy _currentDecorationStrategy;",
" private Element _currentDecoration;"
]
},
{
"added": [
" _maxQueryID = 0;",
" _currentQueryBlock = null;",
" _queryBlockStack = new Stack<QueryBlock>();",
" public void traceStartQueryBlock( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList )",
" _maxQueryID++;",
" if ( _currentQueryBlock != null ) { _queryBlockStack.push( _currentQueryBlock ); }",
" Element queryElement = createElement( _currentStatement, QBLOCK, null );",
" queryElement.setAttribute( QBLOCK_OPTIMIZER_ID, Integer.toString( optimizerID ) );",
" queryElement.setAttribute( QBLOCK_START_TIME, formatTimestamp( timeOptimizationStarted ) );",
" queryElement.setAttribute( QBLOCK_ID, Integer.toString( _maxQueryID ) );",
" _currentQueryBlock = new QueryBlock( _maxQueryID, optimizableList, queryElement );",
" if ( optimizableList != null )",
" for ( int i = 0; i < optimizableList.size(); i++ )",
" Optimizable opt = optimizableList.getOptimizable( i );",
" if ( _cm == null )",
" ( queryElement, QBLOCK_OPTIMIZABLE, getOptimizableName( opt ).getFullSQLName() );",
" public void traceEndQueryBlock()",
" {",
" if ( _queryBlockStack.size() > 0 )",
" {",
" _currentQueryBlock = _queryBlockStack.pop();",
" }",
" }",
"",
" Element timeout = createElement( _currentQueryBlock.queryBlockElement, QBLOCK_TIMEOUT, null );",
" createElement( _currentQueryBlock.queryBlockElement, QBLOCK_VACUOUS, null );",
" if ( _currentQueryBlock.currentJoinsElement != null )",
" { _currentQueryBlock.currentJoinsElement.setAttribute( JO_COMPLETE, \"true\" ); }",
" Element sc = createElement( _currentQueryBlock.queryBlockElement, QBLOCK_SORT_COST, null );",
" Element tcis = createElement( _currentQueryBlock.queryBlockElement, QBLOCK_TOTAL_COST, null );",
" createElement( _currentQueryBlock.queryBlockElement, QBLOCK_NO_BEST_PLAN, null );"
],
"header": "@@ -215,86 +244,84 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentQueryID = 0;",
" _currentOptimizableList = null;",
" _currentJoinsElement = null;",
" _currentJoinOrder = null;",
"",
" _currentDecorationStrategy = null;",
" _currentDecoration = null;",
"",
" _currentBestPlan = null;",
" ",
" public void traceStart( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList )",
" _currentQueryID++;",
" _currentOptimizableList = optimizableList;",
" _currentJoinOrder = null;",
"",
" _currentDecorationStrategy = null;",
" _currentDecoration = null;",
" _currentBestPlan = null;",
" _currentQuery = createElement( _currentStatement, QBLOCK, null );",
" _currentQuery.setAttribute( QBLOCK_OPTIMIZER_ID, Integer.toString( optimizerID ) );",
" _currentQuery.setAttribute( QBLOCK_START_TIME, formatTimestamp( timeOptimizationStarted ) );",
" _currentQuery.setAttribute( QBLOCK_ID, Integer.toString( _currentQueryID ) );",
" if ( _currentOptimizableList != null )",
" for ( int i = 0; i < _currentOptimizableList.size(); i++ )",
" Optimizable opt = _currentOptimizableList.getOptimizable( i );",
" if ( i == 0 )",
" ( _currentQuery, QBLOCK_OPTIMIZABLE, getOptimizableName( opt ).getFullSQLName() );",
" Element timeout = createElement( _currentQuery, QBLOCK_TIMEOUT, null );",
" createElement( _currentQuery, QBLOCK_VACUOUS, null );",
" if ( _currentJoinsElement != null ) { _currentJoinsElement.setAttribute( JO_COMPLETE, \"true\" ); }",
" Element sc = createElement( _currentQuery, QBLOCK_SORT_COST, null );",
" Element tcis = createElement( _currentQuery, QBLOCK_TOTAL_COST, null );",
" createElement( _currentQuery, QBLOCK_NO_BEST_PLAN, null );"
]
},
{
"added": [
" Optimizable opt = _currentQueryBlock.optimizableList.getOptimizable( nextOptimizable );",
" _currentQueryBlock.queryBlockElement, QBLOCK_SKIP,"
],
"header": "@@ -303,11 +330,11 @@ class XMLOptTrace implements OptTrace",
"removed": [
" Optimizable opt = _currentOptimizableList.getOptimizable( nextOptimizable );",
" _currentQuery, QBLOCK_SKIP,"
]
},
{
"added": [
" _currentQueryBlock.currentJoinsElement = createElement( _currentQueryBlock.queryBlockElement, JO, null );",
" _currentQueryBlock.currentJoinOrder = proposedJoinOrder;",
" _currentQueryBlock.currentDecorationStrategy = null;",
" _currentQueryBlock.currentDecoration = null;",
" formatJoinOrder( _currentQueryBlock.currentJoinsElement, proposedJoinOrder );",
" _currentQueryBlock.currentJoinsElement, \"withoutSortAvoidance\",",
" _currentQueryBlock.currentJoinOrder, Optimizer.NORMAL_PLAN, currentCost"
],
"header": "@@ -318,21 +345,21 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentJoinsElement = createElement( _currentQuery, JO, null );",
" _currentJoinOrder = proposedJoinOrder;",
" _currentDecorationStrategy = null;",
" _currentDecoration = null;",
" formatJoinOrder( _currentJoinsElement, proposedJoinOrder );",
" _currentJoinsElement, \"withoutSortAvoidance\",",
" _currentJoinOrder, Optimizer.NORMAL_PLAN, currentCost"
]
},
{
"added": [
" _currentQueryBlock.currentJoinsElement, \"withSortAvoidance\",",
" _currentQueryBlock.currentJoinOrder, Optimizer.SORT_AVOIDANCE_PLAN, currentSortAvoidanceCost"
],
"header": "@@ -340,8 +367,8 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentJoinsElement, \"withSortAvoidance\",",
" _currentJoinOrder, Optimizer.SORT_AVOIDANCE_PLAN, currentSortAvoidanceCost"
]
},
{
"added": [
" if ( _currentQueryBlock.currentBestPlan != null )",
" { _currentQueryBlock.queryBlockElement.removeChild( _currentQueryBlock.currentBestPlan ); }",
" _currentQueryBlock.currentBestPlan = formatPlanCost",
" ( _currentQueryBlock.queryBlockElement, \"bestPlan\", bestJoinOrder, planType, planCost );",
" formatSkip",
" ( _currentQueryBlock.currentDecoration, DECORATION_SKIP, \"Exceeds limit on memory per table: \" + maxMemoryPerTable );",
" formatSkip",
" ( _currentQueryBlock.currentDecoration, DECORATION_SKIP, \"Hash strategy not possible because table is not materializable\" );",
" formatSkip( _currentQueryBlock.currentDecoration, DECORATION_SKIP, \"No hash keys\" );"
],
"header": "@@ -352,25 +379,29 @@ class XMLOptTrace implements OptTrace",
"removed": [
" if ( _currentBestPlan != null ) { _currentQuery.removeChild( _currentBestPlan ); }",
" _currentBestPlan = formatPlanCost( _currentQuery, \"bestPlan\", bestJoinOrder, planType, planCost );",
" formatSkip( _currentDecoration, DECORATION_SKIP, \"Exceeds limit on memory per table: \" + maxMemoryPerTable );",
" formatSkip( _currentDecoration, DECORATION_SKIP, \"Hash strategy not possible because table is not materializable\" );",
" formatSkip( _currentDecoration, DECORATION_SKIP, \"No hash keys\" );"
]
},
{
"added": [
" _currentQueryBlock.currentDecorationStrategy = js;"
],
"header": "@@ -378,7 +409,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentDecorationStrategy = js;"
]
},
{
"added": [
" _currentQueryBlock.currentDecoration = createElement( _currentQueryBlock.currentJoinsElement, DECORATION, null );",
" _currentQueryBlock.currentDecoration.setAttribute( DECORATION_CONGLOM_NAME, cd.getConglomerateName() );",
" _currentQueryBlock.currentDecoration.setAttribute( DECORATION_TABLE_NAME, getOptimizableName( opt ).toString() );",
" _currentQueryBlock.currentDecoration.setAttribute",
" ( DECORATION_JOIN_STRATEGY, _currentQueryBlock.currentDecorationStrategy.getName() );"
],
"header": "@@ -388,11 +419,12 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentDecoration = createElement( _currentJoinsElement, DECORATION, null );",
" _currentDecoration.setAttribute( DECORATION_CONGLOM_NAME, cd.getConglomerateName() );",
" _currentDecoration.setAttribute( DECORATION_TABLE_NAME, getOptimizableName( opt ).toString() );",
" _currentDecoration.setAttribute( DECORATION_JOIN_STRATEGY, _currentDecorationStrategy.getName() );"
]
},
{
"added": [
" createElement( _currentQueryBlock.currentDecoration, DECORATION_KEY, columnNames[ keyColumns[ i ] - 1 ] );"
],
"header": "@@ -402,7 +434,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" createElement( _currentDecoration, DECORATION_KEY, columnNames[ keyColumns[ i ] - 1 ] );"
]
},
{
"added": [
" Element cost = createElement( _currentQueryBlock.currentDecoration, DECORATION_CONGLOM_COST, null );"
],
"header": "@@ -444,7 +476,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" Element cost = createElement( _currentDecoration, DECORATION_CONGLOM_COST, null );"
]
},
{
"added": [
" for ( int i = 0; i < _currentQueryBlock.optimizableList.size(); i++ )",
" Optimizable candidate = _currentQueryBlock.optimizableList.getOptimizable( i );"
],
"header": "@@ -488,9 +520,9 @@ class XMLOptTrace implements OptTrace",
"removed": [
" for ( int i = 0; i < _currentOptimizableList.size(); i++ )",
" Optimizable candidate = _currentOptimizableList.getOptimizable( i );"
]
},
{
"added": [
" if ( joinOrder.length < _currentQueryBlock.optimizableList.size() ) { return false; }"
],
"header": "@@ -619,7 +651,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" if ( joinOrder.length < _currentOptimizableList.size() ) { return false; }"
]
},
{
"added": [
" Optimizable optimizable = _currentQueryBlock.optimizableList.getOptimizable( optimizableNumber );"
],
"header": "@@ -655,7 +687,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" Optimizable optimizable = _currentOptimizableList.getOptimizable( optimizableNumber );"
]
},
{
"added": [
" if ( listIndex >= _currentQueryBlock.optimizableList.size() )",
" Optimizable optimizable = _currentQueryBlock.optimizableList.getOptimizable( listIndex );"
],
"header": "@@ -696,14 +728,14 @@ class XMLOptTrace implements OptTrace",
"removed": [
" if ( listIndex >= _currentOptimizableList.size() )",
" Optimizable optimizable = _currentOptimizableList.getOptimizable( listIndex );"
]
}
]
}
] |
derby-DERBY-6211-6a270cbc
|
DERBY-6211: Don't instantiate new optimizers just to create empty CostEstimate objects; commit derby-6211-10-aa-makingCostEstimateObject.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1509671 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CurrentOfNode.java",
"hunks": [
{
"added": [
"\t\t\tsingleScanCostEstimate = getOptimizerFactory().getCostEstimate();"
],
"header": "@@ -109,7 +109,7 @@ public final class CurrentOfNode extends FromTable {",
"removed": [
"\t\t\tsingleScanCostEstimate = optimizer.newCostEstimate();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java",
"hunks": [
{
"added": [
"\t\t\tcostEstimate = getOptimizerFactory().getCostEstimate();"
],
"header": "@@ -1029,7 +1029,7 @@ abstract class FromTable extends ResultSetNode implements Optimizable",
"removed": [
"\t\t\tcostEstimate = optimizer.newCostEstimate();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java",
"hunks": [
{
"added": [
"\t\t\tcostEstimate = getOptimizerFactory().getCostEstimate();"
],
"header": "@@ -178,7 +178,7 @@ class RowResultSetNode extends FromTable",
"removed": [
"\t\t\tcostEstimate = optimizer.newCostEstimate();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/XMLOptTrace.java",
"hunks": [
{
"added": [
" TableName retval = ((FromTable) ((ProjectRestrictNode) optimizable).getChildResult()).getTableName();",
"",
" if ( retval != null ) { return retval; }"
],
"header": "@@ -519,7 +519,9 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return ((FromTable) ((ProjectRestrictNode) optimizable).getChildResult()).getTableName();"
]
}
]
}
] |
derby-DERBY-6211-85e98cb0
|
DERBY-6211: Add ability to plug custom trace logic into the optimizer.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479552 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.tools.i18n.LocalizedResource;",
"import org.apache.derby.iapi.services.loader.ClassFactory;",
"import org.apache.derby.iapi.services.context.ContextService;",
"import org.apache.derby.iapi.sql.compile.CompilerContext;",
"import org.apache.derby.impl.sql.compile.DefaultOptTrace;",
""
],
"header": "@@ -25,9 +25,15 @@ import java.io.PrintWriter;",
"removed": []
},
{
"added": [
" * Turns on optimizer tracing. May take optional parameters:",
" *",
" * <ul>",
" * <li>custom, $class - If the first arg is the \"custom\" literal, then the next arg must be",
" * the name of a class which implements org.apache.derby.iapi.sql.compile.OptTrace",
" * and which has a 0-arg constructor. The 0-arg constructor is called and the resulting",
" * OptTrace object is plugged in to trace the optimizer.</li>",
" * </ul>",
" OptTrace tracer;",
"",
" if ( (configurationParameters == null) || (configurationParameters.length == 0) )",
" {",
" tracer = new DefaultOptTrace();",
" }",
" else if ( \"custom\".equals( configurationParameters[ 0 ] ) )",
" {",
" if ( configurationParameters.length != 2 )",
" { throw wrap( LocalizedResource.getMessage( \"OT_BadLoadUnloadArgs\" ) ); }",
"",
" String customOptTraceName = configurationParameters[ 1 ];",
"",
" try {",
" CompilerContext cc = (CompilerContext) ContextService.getContext( CompilerContext.CONTEXT_ID );",
" ClassFactory classFactory = cc.getClassFactory();",
"",
" tracer = (OptTrace) classFactory.loadApplicationClass( customOptTraceName ).newInstance();",
" }",
" catch (InstantiationException cnfe) { throw cantInstantiate( customOptTraceName ); }",
" catch (ClassNotFoundException cnfe) { throw cantInstantiate( customOptTraceName ); }",
" catch (IllegalAccessException cnfe) { throw cantInstantiate( customOptTraceName ); }",
" catch (Throwable t) { throw wrap( t ); }",
" }",
" else { throw wrap( LocalizedResource.getMessage( \"OT_BadLoadUnloadArgs\" ) ); }",
" ",
" OptimizerTrace.setOptimizerTracer( tracer );",
" }",
" private SQLException cantInstantiate( String className )",
" {",
" return wrap( LocalizedResource.getMessage( \"OT_CantInstantiateClass\", className ) );"
],
"header": "@@ -65,13 +71,50 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": [
" * Turns on optimizer tracing.",
" OptimizerTrace.setOptimizerTrace( true );"
]
}
]
}
] |
derby-DERBY-6211-866d96b3
|
DERBY-6211: Fix NPE in xml-based optimizer tracing; committing derby-6211-08-aa-fixNPE.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1497537 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/XMLOptTrace.java",
"hunks": [
{
"added": [
" ContextManager cm = ((QueryTreeNode) optimizable).getContextManager();",
" ",
" return makeTableName( td.getSchemaName(), td.getName(), cm );"
],
"header": "@@ -489,15 +489,15 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return makeTableName( td.getSchemaName(),",
" td.getName(),",
" prn.getContextManager() );"
]
},
{
"added": [
" return makeTableName( ad.getSchemaName(), ad.getName(), cm );"
],
"header": "@@ -505,9 +505,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return makeTableName( ad.getSchemaName(), ",
" ad.getName(),",
" prn.getContextManager() );"
]
},
{
"added": [
" return makeTableName( null, unqualifiedName, cm );"
],
"header": "@@ -525,7 +523,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" return makeTableName( null, unqualifiedName, null );"
]
}
]
}
] |
derby-DERBY-6211-9881ca44
|
DERBY-6211: Move the tracer out of the optimizer; tests passed cleanly on derby-6211-11-ab-moveTracerOutOfOptimizer.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1509815 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java",
"hunks": [
{
"added": [],
"header": "@@ -87,9 +87,6 @@ public interface Optimizer",
"removed": [
" /** Return true if optimizer tracing is on */",
" public boolean tracingIsOn();",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" if ( optimizerTracingIsOn() )",
" { getOptimizerTracer().traceNextAccessPath( getExposedName(), ((predList == null) ? 0 : predList.size()) ); }"
],
"header": "@@ -275,8 +275,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() )",
" { optimizer.tracer().traceNextAccessPath( getExposedName(), ((predList == null) ? 0 : predList.size()) ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() )",
" { getOptimizerTracer().traceLookingForSpecifiedIndex( userSpecifiedIndexName, tableNumber ); }"
],
"header": "@@ -306,8 +306,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() )",
" { optimizer.tracer().traceLookingForSpecifiedIndex( userSpecifiedIndexName, tableNumber ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNoMoreConglomerates( tableNumber ); }",
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConsideringConglomerate( currentConglomerateDescriptor, tableNumber ); }"
],
"header": "@@ -414,13 +414,13 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNoMoreConglomerates( tableNumber ); }",
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConsideringConglomerate( currentConglomerateDescriptor, tableNumber ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() )",
" { getOptimizerTracer().traceAddingUnorderedOptimizable( ((predList == null) ? 0 : predList.size()) ); }",
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceScanningHeapWithUniqueKey(); }"
],
"header": "@@ -438,14 +438,14 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() )",
" { optimizer.tracer().traceAddingUnorderedOptimizable( ((predList == null) ? 0 : predList.size()) ); }",
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceScanningHeapWithUniqueKey(); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceEstimatingCostOfConglomerate( cd, tableNumber ); }"
],
"header": "@@ -957,7 +957,7 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceEstimatingCostOfConglomerate( cd, tableNumber ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceSingleMatchedRowCost( cost, tableNumber ); }"
],
"header": "@@ -998,7 +998,7 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceSingleMatchedRowCost( cost, tableNumber ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConstantStartStopPositions(); }",
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceCostOfNScans("
],
"header": "@@ -1054,15 +1054,15 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConstantStartStopPositions(); }",
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer().traceCostOfNScans("
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNonCoveringIndexCost( cost, tableNumber ); }"
],
"header": "@@ -1098,7 +1098,7 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNonCoveringIndexCost( cost, tableNumber ); }"
]
},
{
"added": [
" if ( optimizerTracingIsOn() )",
" getOptimizerTracer().traceCostOfConglomerateScan"
],
"header": "@@ -1531,9 +1531,9 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() )",
" optimizer.tracer().traceCostOfConglomerateScan"
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -1576,8 +1576,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer()."
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -1600,8 +1600,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer()."
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceCostIncludingExtraStartStop("
],
"header": "@@ -1619,8 +1619,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer().traceCostIncludingExtraStartStop("
]
},
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNoStartStopPosition(); }"
],
"header": "@@ -1668,7 +1668,7 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNoStartStopPosition(); }"
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceCostOfNoncoveringIndex("
],
"header": "@@ -1777,8 +1777,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer().traceCostOfNoncoveringIndex("
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -1795,8 +1795,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer()."
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceCostOfNScans("
],
"header": "@@ -1924,8 +1924,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer().traceCostOfNScans("
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -1952,8 +1952,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer()."
]
},
{
"added": [
" if ( optimizerTracingIsOn() )",
" { getOptimizerTracer().traceCompositeSelectivityFromStatistics( statCompositeSelectivity ); }"
],
"header": "@@ -1970,8 +1970,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if ( optimizer.tracingIsOn() )",
" { optimizer.tracer().traceCompositeSelectivityFromStatistics( statCompositeSelectivity ); }"
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -2001,8 +2001,8 @@ class FromBaseTable extends FromTable",
"removed": [
" if (optimizer.tracingIsOn()) {",
" optimizer.tracer()."
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java",
"hunks": [
{
"added": [
" if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConsideringJoinStrategy( ap.getJoinStrategy(), tableNumber ); }"
],
"header": "@@ -249,7 +249,7 @@ abstract class FromTable extends ResultSetNode implements Optimizable",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConsideringJoinStrategy( ap.getJoinStrategy(), tableNumber ); }"
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceRememberingJoinStrategy(",
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceRememberingBestAccessPathSubstring(",
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer()."
],
"header": "@@ -310,22 +310,22 @@ abstract class FromTable extends ResultSetNode implements Optimizable",
"removed": [
" if (opt.tracingIsOn()) {",
" opt.tracer().traceRememberingJoinStrategy(",
" if (opt.tracingIsOn()) {",
" opt.tracer().traceRememberingBestAccessPathSubstring(",
" if (opt.tracingIsOn()) {",
" opt.tracer()."
]
},
{
"added": [
" if (optimizerTracingIsOn()) {",
" getOptimizerTracer().traceRememberingBestUnknownAccessPathSubstring("
],
"header": "@@ -341,8 +341,8 @@ abstract class FromTable extends ResultSetNode implements Optimizable",
"removed": [
" if (opt.tracingIsOn()) {",
" opt.tracer().traceRememberingBestUnknownAccessPathSubstring("
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java",
"hunks": [
{
"added": [
" if ( innerTable.optimizerTracingIsOn() ) { innerTable.getOptimizerTracer().traceSkipUnmaterializableHashJoin(); }"
],
"header": "@@ -68,7 +68,7 @@ class HashJoinStrategy extends BaseJoinStrategy {",
"removed": [
" if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceSkipUnmaterializableHashJoin(); }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java",
"hunks": [
{
"added": [
" private boolean tracingIsOn() { return lcc.optimizerTracingIsOn(); }"
],
"header": "@@ -387,7 +387,7 @@ class OptimizerImpl implements Optimizer",
"removed": [
" public boolean tracingIsOn() { return lcc.optimizerTracingIsOn(); }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptTrace;"
],
"header": "@@ -42,6 +42,7 @@ import org.apache.derby.iapi.sql.StatementType;",
"removed": []
},
{
"added": [
" /** Convenience method for finding the optimizer tracer */",
" public OptTrace getOptimizerTracer() { return getLanguageConnectionContext().getOptimizerTracer(); }",
"",
" /** Convenience method for checking whether optimizer tracing is on */",
" public boolean optimizerTracingIsOn() { return getLanguageConnectionContext().optimizerTracingIsOn(); }",
" "
],
"header": "@@ -144,6 +145,12 @@ public abstract class QueryTreeNode implements Visitable",
"removed": []
}
]
}
] |
derby-DERBY-6211-a8f9739f
|
DERBY-6211: Use schema-qualified names in plan summaries printed by the xml-based optimizer tracer; commit derby-6211-07-ab-useSchemaQualifiedNamesInSummaries.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1494954 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TableName.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.util.IdUtil;"
],
"header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/XMLOptTrace.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.TableDescriptor;",
"import org.apache.derby.iapi.util.IdUtil;"
],
"header": "@@ -48,6 +48,9 @@ import org.apache.derby.iapi.sql.compile.Optimizable;",
"removed": []
},
{
"added": [
" // distinguish table function names from conglomerate names",
" private static final String TABLE_FUNCTION_FLAG = \"()\";",
" "
],
"header": "@@ -118,6 +121,9 @@ class XMLOptTrace implements OptTrace",
"removed": []
},
{
"added": [
" Element optElement = createElement",
" ( _currentQuery, QBLOCK_OPTIMIZABLE, getOptimizableName( opt ).getFullSQLName() );"
],
"header": "@@ -246,7 +252,8 @@ class XMLOptTrace implements OptTrace",
"removed": [
" Element optElement = createElement( _currentQuery, QBLOCK_OPTIMIZABLE, getOptimizableName( opt ) );"
]
},
{
"added": [
" \"Useless join order. \" + getOptimizableName( opt ).getFullSQLName() + \" depends on tables after it in the join order\""
],
"header": "@@ -293,7 +300,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" \"Useless join order. \" + getOptimizableName( opt ) + \" depends on tables after it in the join order\""
]
},
{
"added": [
" _currentDecoration.setAttribute( DECORATION_TABLE_NAME, getOptimizableName( opt ).toString() );"
],
"header": "@@ -376,7 +383,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" _currentDecoration.setAttribute( DECORATION_TABLE_NAME, getOptimizableName( opt ) );"
]
},
{
"added": [
" /** Get the name of an optimizable */",
" private TableName getOptimizableName( Optimizable optimizable )",
" try {",
" if ( isBaseTable( optimizable ) )",
" TableDescriptor td = ((FromBaseTable) ((ProjectRestrictNode) optimizable).getChildResult()).getTableDescriptor();",
" return makeTableName( td.getSchemaName(), td.getName() );",
" }",
" else if ( isTableFunction( optimizable ) )",
" {",
" AliasDescriptor ad =",
" ((StaticMethodCallNode) ((FromVTI) ((ProjectRestrictNode) optimizable).getChildResult()).getMethodCall() ).ad;",
" return makeTableName( ad.getSchemaName(), ad.getName() );",
" }",
" else if ( isFromTable( optimizable ) )",
" {",
" return ((FromTable) ((ProjectRestrictNode) optimizable).getChildResult()).getTableName();",
" catch (StandardException e)",
" // Technically, an exception could occur here if the table name",
" // was not previously bound and if an error occured while binding it.",
" // But the optimizable should have been bound long before optimization,",
" // so this should not be a problem.",
" String nodeClass = optimizable.getClass().getName();",
" String unqualifiedName = nodeClass.substring( nodeClass.lastIndexOf( \".\" ) + 1 );",
"",
" return makeTableName( null, unqualifiedName );",
" }",
"",
" /** Return true if the optimizable is a base table */",
" private boolean isBaseTable( Optimizable optimizable )",
" {",
" if ( !( optimizable instanceof ProjectRestrictNode ) ) { return false; }",
"",
" ResultSetNode rsn = ((ProjectRestrictNode) optimizable).getChildResult();",
"",
" return ( rsn instanceof FromBaseTable );",
" }",
"",
" /** Return true if the optimizable is a FromTable */",
" private boolean isFromTable( Optimizable optimizable )",
" {",
" if ( !( optimizable instanceof ProjectRestrictNode ) ) { return false; }",
"",
" ResultSetNode rsn = ((ProjectRestrictNode) optimizable).getChildResult();",
"",
" return ( rsn instanceof FromTable );",
" }",
"",
" /** Return true if the optimizable is a table function */",
" private boolean isTableFunction( Optimizable optimizable )",
" {",
" if ( !( optimizable instanceof ProjectRestrictNode ) ) { return false; }",
"",
" ResultSetNode rsn = ((ProjectRestrictNode) optimizable).getChildResult();",
" if ( !( rsn instanceof FromVTI ) ) { return false; }",
"",
" return ( ((FromVTI) rsn).getMethodCall() instanceof StaticMethodCallNode );",
" }",
"",
" /** Make a TableName */",
" private TableName makeTableName( String schemaName, String unqualifiedName )",
" {",
" TableName result = new TableName();",
" result.init( schemaName, unqualifiedName );",
"",
" return result;"
],
"header": "@@ -483,38 +490,78 @@ class XMLOptTrace implements OptTrace",
"removed": [
" /** Get the name of a optimizables */",
" private String getOptimizableName( Optimizable optimizable )",
" String name = null;",
" ",
" if ( optimizable instanceof ProjectRestrictNode )",
" {",
" ProjectRestrictNode prn = (ProjectRestrictNode) optimizable;",
" ResultSetNode rsn = prn.getChildResult();",
" if ( rsn instanceof FromBaseTable )",
" try {",
" name = ((FromBaseTable) rsn).getTableName().getFullTableName();",
" }",
" catch (StandardException e)",
" {",
" // Technically, an exception could occur here if the table name",
" // was not previously bound and if an error occured while binding it.",
" // But the FromBaseTable should have been bound long before optimization,",
" // so this should not be a problem.",
" }",
"",
" // fallback",
" if ( name == null )",
" String nodeClass = optimizable.getClass().getName();",
" name = nodeClass.substring( nodeClass.lastIndexOf( \".\" ) + 1 );",
" return name;"
]
},
{
"added": [
" createElement( parent, JO_SLOT, getOptimizableName( optimizable ).getFullSQLName() );"
],
"header": "@@ -607,7 +654,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" createElement( parent, JO_SLOT, getOptimizableName( optimizable ) );"
]
},
{
"added": [
" String conglomerateName = getSQLName( optimizable, cd, verbose );"
],
"header": "@@ -661,7 +708,7 @@ class XMLOptTrace implements OptTrace",
"removed": [
" String conglomerateName = getConglomerateName( optimizable, cd, verbose );"
]
},
{
"added": [
" private String getSQLName( Optimizable optimizable, ConglomerateDescriptor cd, boolean verbose )",
" if ( !verbose && (cd != null) )",
" {",
" String schemaName = getOptimizableName( optimizable ).getSchemaName();",
" String conglomerateName = cd.getConglomerateName();",
"",
" return IdUtil.mkQualifiedName( schemaName, conglomerateName );",
" }",
" boolean isTableFunction = isTableFunction( optimizable );",
" buffer.append( getOptimizableName( optimizable ).getFullSQLName() );",
" if ( isTableFunction ) { buffer.append( TABLE_FUNCTION_FLAG ); }",
" if ( (cd != null) && cd.isIndex() )"
],
"header": "@@ -684,14 +731,22 @@ class XMLOptTrace implements OptTrace",
"removed": [
" private String getConglomerateName( Optimizable optimizable, ConglomerateDescriptor cd, boolean verbose )",
" if ( !verbose ) { return cd.getConglomerateName(); }",
" buffer.append( getOptimizableName( optimizable ) );",
" if ( cd.isIndex() )"
]
}
]
}
] |
derby-DERBY-6211-b6cc9d73
|
DERBY-6211: Committed derby-6211-05-aa-xmlOptimizerTracer, which adds xml-based optimizer tracing.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1491893 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/compile/OptTrace.java",
"hunks": [
{
"added": [
" public void traceStart( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList );"
],
"header": "@@ -47,7 +47,7 @@ public interface OptTrace",
"removed": [
" public void traceStart( long timeOptimizationStarted, int optimizerID );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DefaultOptTrace.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.compile.OptimizableList;"
],
"header": "@@ -28,6 +28,7 @@ import org.apache.derby.iapi.sql.compile.AccessPath;",
"removed": []
},
{
"added": [
" public void traceStart( long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList )"
],
"header": "@@ -78,7 +79,7 @@ public class DefaultOptTrace implements OptTrace",
"removed": [
" public void traceStart( long timeOptimizationStarted, int optimizerID )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java",
"hunks": [
{
"added": [
" * <li>xml - If the first arg is the \"xml\" literal, then trace output will be",
" * formatted as xml.</li>"
],
"header": "@@ -73,6 +73,8 @@ public\tclass OptimizerTracer implements OptionalTool",
"removed": []
}
]
}
] |
derby-DERBY-6213-04fc939b
|
DERBY-6213: Deprecate support for Java 5 and CDC
Move getParentLogger() to ClientBaseDataSourceRoot and remove it
from all the *40 leaf classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482632 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/jdbc/BasicClientDataSource40.java",
"hunks": [
{
"added": [
" * BasicClientDataSource40 is similar to ClientDataSource except it"
],
"header": "@@ -21,18 +21,13 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.client.am.ClientMessageId;",
"import org.apache.derby.client.am.SqlException;",
"import org.apache.derby.shared.common.reference.SQLState;",
" * BasicClientDataSource40 is similar to ClientDataSource40 except it"
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.client.am.SQLExceptionFactory;"
],
"header": "@@ -31,15 +31,18 @@ import java.security.AccessController;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java",
"hunks": [
{
"added": [
" * <p>",
" * </p>",
" *",
" * <li>Java SE 6 (JDBC 4.0) and</li>",
" * <li>Java SE 7 (JDBC 4.1) and</li>",
" * <li>full Java SE 8 (JDBC 4.2).</li>",
" * </p>",
" *",
" * <p>",
" * Those platforms are also supported by {@code ClientConnectionPoolDataSource}",
" * now, and applications should use {@code ClientConnectionPoolDataSource}",
" * instead of this class. This class is provided only for backward",
" * compatibility and may be removed in later versions of Derby.",
" * </p>",
" *",
" * </p>",
" *",
" * </p>"
],
"header": "@@ -21,37 +21,40 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.client.am.ClientMessageId;",
"import org.apache.derby.client.am.SqlException;",
"import org.apache.derby.shared.common.reference.SQLState;",
" * <li>Java SE 7 (JDBC 4.1) and",
" * <li>full Java SE 8 (JDBC 4.2).",
" * <p>",
" * Use ClientConnectionPoolDataSource if your application",
" * runs on the following platforms:",
" * <p>",
" * <ul>",
" * <li> JDBC 4.0 - Java SE 6",
" * <li> JDBC 3.0 - J2SE 5.0",
" * </ul>"
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDataSource.java",
"hunks": [
{
"added": [
" * running on full Java SE 6, 7 or 8, corresponding to JDBC 4.0, 4.1 and 4.2."
],
"header": "@@ -23,8 +23,7 @@ package org.apache.derby.jdbc;",
"removed": [
" * running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.",
" * If running on Java SE 7 or higher, consider a more capable data source."
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDataSource40.java",
"hunks": [
{
"added": [
" * <p>",
" * </p>",
" *",
" * <li>Java SE 6 (JDBC 4.0) and</li>",
" * <li>Java SE 7 (JDBC 4.1) and</li>",
" * <li>full Java SE 8 (JDBC 4.2).</li>",
" * </p>",
" *",
" * <p>",
" * Those platforms are also supported by {@code ClientXADataSource}",
" * now, and applications should use {@code ClientXADataSource}",
" * instead of this class. This class is provided only for backward",
" * compatibility and may be removed in later versions of Derby.",
" * </p>",
" *",
" * </p>",
" *"
],
"header": "@@ -21,32 +21,34 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.client.am.ClientMessageId;",
"import org.apache.derby.client.am.SqlException;",
"import org.apache.derby.shared.common.reference.SQLState;",
" * <li>Java SE 7 (JDBC 4.1) and",
" * <li>full Java SE 8 (JDBC 4.2).",
" * <p>",
" * Use ClientDataSource if your application runs on the following",
" * platforms:",
" * <p>",
" * <ul>",
" * <li> JDBC 4.0 - Java SE 6",
" * <li> JDBC 3.0 - J2SE 5.0",
" * </ul>"
]
},
{
"added": [
" * </p>"
],
"header": "@@ -54,6 +56,7 @@ import org.apache.derby.shared.common.reference.SQLState;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientXADataSource.java",
"hunks": [
{
"added": [
" * <p>",
" * running on full Java SE 6, 7 or 8, corresponding to JDBC 4.0, 4.1 and 4.2."
],
"header": "@@ -25,9 +25,9 @@ import java.sql.SQLException;",
"removed": [
" * running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.",
" * If running on Java SE 7 or higher, consider a more capable data source."
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientXADataSource40.java",
"hunks": [
{
"added": [
" * <p>",
" * </p>",
" *",
" * <li>Java SE 6 (JDBC 4.0) and</li>",
" * <li>Java SE 7 (JDBC 4.1) and</li>",
" * <li>full Java SE 8 (JDBC 4.2).</li>",
" * </p>",
" *",
" * <p>",
" * Those platforms are also supported by {@code ClientXADataSource}",
" * now, and applications should use {@code ClientXADataSource}",
" * instead of this class. This class is provided only for backward",
" * compatibility and may be removed in later versions of Derby.",
" * </p>",
" *",
" * </p>",
" *",
" * </p>",
" *"
],
"header": "@@ -21,37 +21,40 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.client.am.ClientMessageId;",
"import org.apache.derby.client.am.SqlException;",
"import org.apache.derby.shared.common.reference.SQLState;",
" * <li>Java SE 7 (JDBC 4.1) and",
" * <li>full Java SE 8 (JDBC 4.2).",
" * <p>",
" * Use ClientXADataSource if your application runs on the following",
" * platforms:",
" * <p>",
" * <ul>",
" * <li> JDBC 4.0 - Java SE 6",
" * <li> JDBC 3.0 - J2SE 5.0",
" * </ul>",
" * <P>"
]
},
{
"added": [],
"header": "@@ -60,20 +63,4 @@ public class ClientXADataSource40 extends ClientXADataSource",
"removed": [
"",
" ////////////////////////////////////////////////////////////////////",
" //",
" // INTRODUCED BY JDBC 4.1 IN JAVA 7",
" //",
" ////////////////////////////////////////////////////////////////////",
"",
" public Logger getParentLogger()",
" throws SQLFeatureNotSupportedException",
" {",
" throw (SQLFeatureNotSupportedException)",
" (",
" new SqlException( null, new ClientMessageId(SQLState.NOT_IMPLEMENTED), \"getParentLogger\" )",
" ).getSQLException();",
" }",
" "
]
}
]
}
] |
derby-DERBY-6213-073b862d
|
DERBY-6213: Generify more classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1484818 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/cache/ClassSize.java",
"hunks": [
{
"added": [
"@SuppressWarnings(\"unchecked\")"
],
"header": "@@ -29,6 +29,7 @@ import java.security.AccessController;",
"removed": []
},
{
"added": [
" private static java.util.Hashtable<String,int[]> catalog;",
" catalog = (java.util.Hashtable<String,int[]>)"
],
"header": "@@ -59,12 +60,12 @@ public class ClassSize",
"removed": [
" private static java.util.Hashtable catalog;",
" catalog = (java.util.Hashtable)"
]
},
{
"added": [
" private static int estimateBaseFromCatalog( Class<?> cls, boolean addToCatalog)"
],
"header": "@@ -210,7 +211,7 @@ public class ClassSize",
"removed": [
" private static int estimateBaseFromCatalog( Class cls, boolean addToCatalog)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/context/ContextManager.java",
"hunks": [
{
"added": [
"\t\tprivate final ArrayList<Context> stack_ = new ArrayList<Context>();",
"\t\tprivate final List<Context> view_ = Collections.unmodifiableList(stack_);"
],
"header": "@@ -71,9 +71,9 @@ public class ContextManager",
"removed": [
"\t\tprivate final ArrayList stack_ = new ArrayList();",
"\t\tprivate final List view_ = Collections.unmodifiableList(stack_);"
]
},
{
"added": [
"\tprivate final HashMap<String,CtxStack> ctxTable = new HashMap<String,CtxStack>();",
"\tprivate final ArrayList<Context> holder = new ArrayList<Context>();"
],
"header": "@@ -116,12 +116,12 @@ public class ContextManager",
"removed": [
"\tprivate final HashMap ctxTable = new HashMap();",
"\tprivate final ArrayList holder = new ArrayList();"
]
},
{
"added": [
"\t\tCtxStack idStack = ctxTable.get(contextId);"
],
"header": "@@ -133,7 +133,7 @@ public class ContextManager",
"removed": [
"\t\tCtxStack idStack = (CtxStack) ctxTable.get(contextId);"
]
},
{
"added": [
"\t\tfinal CtxStack idStack = ctxTable.get(contextId);"
],
"header": "@@ -157,7 +157,7 @@ public class ContextManager",
"removed": [
"\t\tfinal CtxStack idStack = (CtxStack) ctxTable.get(contextId);"
]
},
{
"added": [
"\t\tContext theContext = holder.remove(holder.size()-1);",
"\t\tfinal CtxStack idStack = ctxTable.get(contextId);"
],
"header": "@@ -178,11 +178,11 @@ public class ContextManager",
"removed": [
"\t\tContext theContext = (Context) holder.remove(holder.size()-1);",
"\t\tfinal CtxStack idStack = (CtxStack) ctxTable.get(contextId);"
]
},
{
"added": [
"\t\tfinal CtxStack idStack = ctxTable.get(contextId);"
],
"header": "@@ -207,7 +207,7 @@ public class ContextManager",
"removed": [
"\t\tfinal CtxStack idStack = (CtxStack) ctxTable.get(contextId);"
]
},
{
"added": [
"\t\tfinal CtxStack cs = ctxTable.get(contextId);"
],
"header": "@@ -234,7 +234,7 @@ public class ContextManager",
"removed": [
"\t\tfinal CtxStack cs = (CtxStack) ctxTable.get(contextId);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/context/ContextService.java",
"hunks": [
{
"added": [
"\tprivate ThreadLocal<Object> threadContextList = new ThreadLocal<Object>();"
],
"header": "@@ -157,7 +157,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\tprivate ThreadLocal threadContextList = new ThreadLocal();"
]
},
{
"added": [
"\tprivate HashSet<ContextManager> allContexts;"
],
"header": "@@ -168,7 +168,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\tprivate HashSet allContexts;"
]
},
{
"added": [
"\t\tallContexts = new HashSet<ContextManager>();"
],
"header": "@@ -182,7 +182,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\tallContexts = new HashSet();"
]
},
{
"added": [
"\t\tThreadLocal<Object> tcl = threadContextList;"
],
"header": "@@ -262,7 +262,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\tThreadLocal tcl = threadContextList;"
]
},
{
"added": [
"\t\tThreadLocal<Object> tcl = threadContextList;"
],
"header": "@@ -294,7 +294,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\tThreadLocal tcl = threadContextList;"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")",
"\t\tThreadLocal<Object> tcl = threadContextList;"
],
"header": "@@ -389,9 +389,10 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\tThreadLocal tcl = threadContextList;"
]
},
{
"added": [
" \t\tjava.util.Stack<ContextManager> stack;"
],
"header": "@@ -411,7 +412,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
" \t\tjava.util.Stack stack;"
]
},
{
"added": [
"\t\t\tstack = new java.util.Stack<ContextManager>();"
],
"header": "@@ -431,7 +432,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\t\tstack = new java.util.Stack();"
]
},
{
"added": [
"\t\t\tstack = (java.util.Stack<ContextManager>) list;"
],
"header": "@@ -448,7 +449,7 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\t\tstack = (java.util.Stack) list;"
]
},
{
"added": [
"\t\t\tfor (Iterator<ContextManager> i = allContexts.iterator(); i.hasNext(); ) {",
"\t\t\t\tContextManager cm = i.next();"
],
"header": "@@ -544,9 +545,9 @@ public final class ContextService //OLD extends Hashtable",
"removed": [
"\t\t\tfor (Iterator i = allContexts.iterator(); i.hasNext(); ) {",
"\t\t\t\tContextManager cm = (ContextManager) i.next();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java",
"hunks": [
{
"added": [
"public final class ProductVersionHolder implements java.security.PrivilegedAction<Properties>"
],
"header": "@@ -109,7 +109,7 @@ import java.util.Properties;",
"removed": [
"public final class ProductVersionHolder implements java.security.PrivilegedAction"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/io/FileUtil.java",
"hunks": [
{
"added": [
" private static Class<File> fileClz = File.class;",
" private static Class<?> filesClz;",
" private static Class<?> pathClz;",
" private static Class<?> pathsClz;",
" private static Class<?> aclEntryClz;",
" private static Class<?> aclFileAttributeViewClz;",
" private static Class<?> posixFileAttributeViewClz;",
" private static Class<?> userPrincipalClz;",
" private static Class<?> linkOptionArrayClz;",
" private static Class<?> linkOptionClz;",
" private static Class<?> stringArrayClz;",
" private static Class<?> aclEntryBuilderClz;",
" private static Class<?> aclEntryTypeClz;",
" private static Class<?> fileStoreClz;",
" private static Class<?> aclEntryPermissionClz;"
],
"header": "@@ -600,21 +600,21 @@ nextFile:\tfor (int i = 0; i < list.length; i++) {",
"removed": [
" private static Class fileClz = File.class;",
" private static Class filesClz;",
" private static Class pathClz;",
" private static Class pathsClz;",
" private static Class aclEntryClz;",
" private static Class aclFileAttributeViewClz;",
" private static Class posixFileAttributeViewClz;",
" private static Class userPrincipalClz;",
" private static Class linkOptionArrayClz;",
" private static Class linkOptionClz;",
" private static Class stringArrayClz;",
" private static Class aclEntryBuilderClz;",
" private static Class aclEntryTypeClz;",
" private static Class fileStoreClz;",
" private static Class aclEntryPermissionClz;"
]
},
{
"added": [
" List<Object> newAcl = new ArrayList<Object>();"
],
"header": "@@ -948,7 +948,7 @@ nextFile:\tfor (int i = 0; i < list.length; i++) {",
"removed": [
" List newAcl = new ArrayList();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java",
"hunks": [
{
"added": [
"\t\t\tClass<?> toClass = getClass(toClassName);",
"\t\t\tClass<?> fromClass = getClass(fromClassName);"
],
"header": "@@ -94,13 +94,13 @@ public class ClassInspector",
"removed": [
"\t\t\tClass toClass = getClass(toClassName);",
"\t\t\tClass fromClass = getClass(fromClassName);"
]
},
{
"added": [
"\t\tClass<?> receiverClass = getClass(receiverType);"
],
"header": "@@ -228,7 +228,7 @@ public class ClassInspector",
"removed": [
"\t\tClass receiverClass = getClass(receiverType);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.types.DataValueDescriptor;"
],
"header": "@@ -48,6 +48,7 @@ import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java",
"hunks": [
{
"added": [
" private HashMap<Object,Object> hash_table;"
],
"header": "@@ -107,7 +107,7 @@ public class BackingStoreHashtable",
"removed": [
" private HashMap hash_table;"
]
},
{
"added": [
" new HashMap<Object,Object>(initialCapacity) :",
" new HashMap<Object,Object>(initialCapacity, loadFactor));"
],
"header": "@@ -217,8 +217,8 @@ public class BackingStoreHashtable",
"removed": [
" new HashMap(initialCapacity) :",
" new HashMap(initialCapacity, loadFactor));"
]
},
{
"added": [
" new HashMap<Object,Object>() :",
" new HashMap<Object,Object>((int) estimated_rowcnt) :"
],
"header": "@@ -249,9 +249,9 @@ public class BackingStoreHashtable",
"removed": [
" new HashMap() :",
" new HashMap((int) estimated_rowcnt) :"
]
},
{
"added": [
" new HashMap<Object,Object>((int)(max_inmemory_size / rowUsage));"
],
"header": "@@ -277,7 +277,7 @@ public class BackingStoreHashtable",
"removed": [
" new HashMap((int)(max_inmemory_size / rowUsage));"
]
},
{
"added": [
" hash_table = new HashMap<Object,Object>();"
],
"header": "@@ -292,7 +292,7 @@ public class BackingStoreHashtable",
"removed": [
" hash_table = new HashMap();"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -394,6 +394,7 @@ public class BackingStoreHashtable",
"removed": []
},
{
"added": [
" List<Object> row_vec;",
" row_vec = (List<Object>) duplicate_value;",
" row_vec = new ArrayList<Object>(2);"
],
"header": "@@ -413,18 +414,18 @@ public class BackingStoreHashtable",
"removed": [
" List row_vec;",
" row_vec = (List) duplicate_value;",
" row_vec = new ArrayList(2);"
]
},
{
"added": [
" public Enumeration<Object> elements()"
],
"header": "@@ -572,7 +573,7 @@ public class BackingStoreHashtable",
"removed": [
" public Enumeration elements()"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java",
"hunks": [
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -251,6 +251,7 @@ public class DiskHashtable",
"removed": []
},
{
"added": [
" Vector<Object> v;",
" v = new Vector<Object>( 2);",
" v = (Vector<Object>) retValue;"
],
"header": "@@ -296,19 +297,19 @@ public class DiskHashtable",
"removed": [
" Vector v;",
" v = new Vector( 2);",
" v = (Vector) retValue;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/UserType.java",
"hunks": [
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -349,6 +349,7 @@ public class UserType extends DataType",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/XML.java",
"hunks": [
{
"added": [
" Class<?> factoryClass =",
" Class<?> builderClass ="
],
"header": "@@ -1033,14 +1033,14 @@ public class XML",
"removed": [
" Class factoryClass =",
" Class builderClass ="
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/util/IdUtil.java",
"hunks": [
{
"added": [
"\t\tVector<String> v = new Vector<String>();"
],
"header": "@@ -125,7 +125,7 @@ public abstract class IdUtil",
"removed": [
"\t\tVector v = new Vector();"
]
},
{
"added": [
"\t\tVector<String[]> v = new Vector<String[]>();"
],
"header": "@@ -411,7 +411,7 @@ public abstract class IdUtil",
"removed": [
"\t\tVector v = new Vector();"
]
},
{
"added": [
"\t\tVector<String> v = new Vector<String>();"
],
"header": "@@ -486,7 +486,7 @@ public abstract class IdUtil",
"removed": [
"\t\tVector v = new Vector();"
]
},
{
"added": [
"\t\tHashSet<String> h = new HashSet<String>();",
"\t\tVector<String> v = new Vector<String>();"
],
"header": "@@ -529,9 +529,9 @@ public abstract class IdUtil",
"removed": [
"\t\tHashSet h = new HashSet();",
"\t\tVector v = new Vector();"
]
},
{
"added": [
"\tprivate static String vectorToIdList(Vector<String> v,boolean normal)"
],
"header": "@@ -543,7 +543,7 @@ public abstract class IdUtil",
"removed": [
"\tprivate static String vectorToIdList(Vector v,boolean normal)"
]
},
{
"added": [
"\t\tHashSet<String> h = new HashSet<String>();",
"\t\tVector<String> v = new Vector<String>();"
],
"header": "@@ -596,8 +596,8 @@ public abstract class IdUtil",
"removed": [
"\t\tHashSet h = new HashSet();",
"\t\tVector v = new Vector();"
]
},
{
"added": [
"\t\tHashSet<String> h = new HashSet<String>();",
"\t\tVector<String> v = new Vector<String>();"
],
"header": "@@ -619,8 +619,8 @@ public abstract class IdUtil",
"removed": [
"\t\tHashSet h = new HashSet();",
"\t\tVector v = new Vector();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java",
"hunks": [
{
"added": [
"\tprivate HashMap<String,PersistentService> serviceProviders = new HashMap<String,PersistentService>();"
],
"header": "@@ -102,7 +102,7 @@ abstract class BaseMonitor",
"removed": [
"\tprivate HashMap serviceProviders = new HashMap();"
]
},
{
"added": [
"\tprivate Vector<TopService>\t services;\t\t\t\t\t// Vector of TopServices"
],
"header": "@@ -111,7 +111,7 @@ abstract class BaseMonitor",
"removed": [
"\tprivate Vector\t services;\t\t\t\t\t// Vector of TopServices"
]
},
{
"added": [
"\t\tservices = new Vector<TopService>(0, 1);"
],
"header": "@@ -140,7 +140,7 @@ abstract class BaseMonitor",
"removed": [
"\t\tservices = new Vector(0, 1);"
]
},
{
"added": [
"\t\t\t\tts = services.get(position);"
],
"header": "@@ -182,7 +182,7 @@ abstract class BaseMonitor",
"removed": [
"\t\t\t\tts = (TopService) services.get(position);"
]
},
{
"added": [
"\t\t(services.get(0)).shutdown();"
],
"header": "@@ -203,7 +203,7 @@ abstract class BaseMonitor",
"removed": [
"\t\t((TopService) services.get(0)).shutdown();"
]
},
{
"added": [
"\t\tVector<Class<?>> bootImplementations = getImplementations(bootProperties, false);",
"\t\tVector<Class<?>> systemImplementations = null;",
"\t\tVector<Class<?>> applicationImplementations = null;"
],
"header": "@@ -279,10 +279,10 @@ abstract class BaseMonitor",
"removed": [
"\t\tVector bootImplementations = getImplementations(bootProperties, false);",
"\t\tVector systemImplementations = null;",
"\t\tVector applicationImplementations = null;"
]
},
{
"added": [
"\t\t\t\tTopService ts = services.get(i);"
],
"header": "@@ -417,7 +417,7 @@ abstract class BaseMonitor",
"removed": [
"\t\t\t\tTopService ts = (TopService) services.get(i);"
]
},
{
"added": [
"\t\t\treturn services.get(0);",
"\t\t\tTopService ts = services.get(i);"
],
"header": "@@ -548,10 +548,10 @@ abstract class BaseMonitor",
"removed": [
"\t\t\treturn (TopService) services.get(0);",
"\t\t\tTopService ts = (TopService) services.get(i);"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")",
"\tprotected Object loadInstance(Class<?> factoryInterface, Properties properties) {",
"\t\tVector<Class<?>> localImplementations = getImplementations(properties, false);",
"\t\t\tinstance = loadInstance( (Vector<Class<?>>) implementationSets[i], factoryInterface, properties);"
],
"header": "@@ -708,18 +708,18 @@ abstract class BaseMonitor",
"removed": [
"",
"\tprotected Object loadInstance(Class factoryInterface, Properties properties) {",
"\t\tVector localImplementations = getImplementations(properties, false);",
"\t\t\tinstance = loadInstance(implementationSets[i], factoryInterface, properties);"
]
},
{
"added": [
"\tprivate Object loadInstance(Vector<Class<?>> implementations, Class<?> factoryInterface, Properties properties) {"
],
"header": "@@ -728,7 +728,7 @@ abstract class BaseMonitor",
"removed": [
"\tprivate Object loadInstance(Vector implementations, Class factoryInterface, Properties properties) {"
]
},
{
"added": [
"\tprivate static int findImplementation(Vector<Class<?>> implementations, int startIndex, Class<?> factoryInterface) {",
"\t\t\t\tClass<?> factoryClass = implementations.get(i);"
],
"header": "@@ -751,12 +751,12 @@ abstract class BaseMonitor",
"removed": [
"\tprivate static int findImplementation(Vector implementations, int startIndex, Class factoryInterface) {",
"\t\t\t\tClass factoryClass = (Class) implementations.get(i);"
]
},
{
"added": [
"\t\t\t\tts = services.get(i);"
],
"header": "@@ -840,7 +840,7 @@ abstract class BaseMonitor",
"removed": [
"\t\t\t\tts = (TopService) services.get(i);"
]
},
{
"added": [
"\t\t\t\t\tts = services.get(i);"
],
"header": "@@ -852,7 +852,7 @@ abstract class BaseMonitor",
"removed": [
"\t\t\t\t\tts = (TopService) services.get(i);"
]
},
{
"added": [
"\tprivate Vector<Class<?>> getImplementations(Properties moduleList, boolean actualModuleList) {",
"\t\tVector<Class<?>> implementations = actualModuleList ? new Vector<Class<?>>(moduleList.size()) : new Vector<Class<?>>(0,1);"
],
"header": "@@ -1047,12 +1047,12 @@ abstract class BaseMonitor",
"removed": [
"\tprivate Vector getImplementations(Properties moduleList, boolean actualModuleList) {",
"\t\tVector implementations = actualModuleList ? new Vector(moduleList.size()) : new Vector(0,1);"
]
},
{
"added": [
"\t\t\t\tClass<?> possibleModule = Class.forName(className);"
],
"header": "@@ -1126,7 +1126,7 @@ nextModule:",
"removed": [
"\t\t\t\tClass possibleModule = Class.forName(className);"
]
},
{
"added": [
" private boolean getPersistentServiceImplementation( Class<?> possibleModule)"
],
"header": "@@ -1218,7 +1218,7 @@ nextModule:",
"removed": [
" private boolean getPersistentServiceImplementation( Class possibleModule)"
]
},
{
"added": [
"\tprivate Vector<Class<?>> getDefaultImplementations() {"
],
"header": "@@ -1232,7 +1232,7 @@ nextModule:",
"removed": [
"\tprivate Vector getDefaultImplementations() {"
]
},
{
"added": [
"\t\tfor (Iterator<PersistentService> i = serviceProviders.values().iterator(); i.hasNext(); ) {",
"\t\t\tPersistentService provider = i.next();"
],
"header": "@@ -1408,9 +1408,9 @@ nextModule:",
"removed": [
"\t\tfor (Iterator i = serviceProviders.values().iterator(); i.hasNext(); ) {",
"\t\t\tObject provider = i.next();"
]
},
{
"added": [
" return storageFactories.get( subSubProtocol);",
" private static final HashMap<String,String> storageFactories = new HashMap<String,String>();"
],
"header": "@@ -1651,10 +1651,10 @@ nextModule:",
"removed": [
" return (String) storageFactories.get( subSubProtocol);",
" private static final HashMap storageFactories = new HashMap();"
]
},
{
"added": [
"\t\t\t\t\tTopService ts2 = services.get(i);"
],
"header": "@@ -1724,7 +1724,7 @@ nextModule:",
"removed": [
"\t\t\t\t\tTopService ts2 = (TopService) services.get(i);"
]
},
{
"added": [
" class ProviderEnumeration implements Enumeration<PersistentService>",
" private Enumeration<String> serviceProvidersKeys = (serviceProviders == null) ? null :"
],
"header": "@@ -2101,9 +2101,9 @@ nextModule:",
"removed": [
" class ProviderEnumeration implements Enumeration",
" private Enumeration serviceProvidersKeys = (serviceProviders == null) ? null :"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java",
"hunks": [
{
"added": [
" return (AccessController.doPrivileged(new PrivilegedAction<Boolean>() {",
" public Boolean run() {"
],
"header": "@@ -194,8 +194,8 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" return ((Boolean) AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" return AccessController.doPrivileged(",
" new PrivilegedAction<Properties>() {",
" public Properties run() {"
],
"header": "@@ -203,9 +203,9 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" return (Properties) AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" return AccessController.doPrivileged(new PrivilegedAction<String>() {",
" public String run() {"
],
"header": "@@ -216,8 +216,8 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" return (String) AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" return AccessController.doPrivileged(new PrivilegedAction<Thread>() {",
" public Thread run() {"
],
"header": "@@ -227,8 +227,8 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" return (Thread) AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" AccessController.doPrivileged(new PrivilegedAction<Object>() {"
],
"header": "@@ -250,7 +250,7 @@ public final class FileMonitor extends BaseMonitor",
"removed": [
" AccessController.doPrivileged(new PrivilegedAction() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java",
"hunks": [
{
"added": [
"\tprotected Class<?> factoryInterface;"
],
"header": "@@ -39,7 +39,7 @@ class ProtocolKey {",
"removed": [
"\tprotected Class factoryInterface;"
]
},
{
"added": [
"\tprotected ProtocolKey(Class<?> factoryInterface, String identifier)"
],
"header": "@@ -50,7 +50,7 @@ class ProtocolKey {",
"removed": [
"\tprotected ProtocolKey(Class factoryInterface, String identifier)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java",
"hunks": [
{
"added": [
" new java.security.PrivilegedExceptionAction<Object>()"
],
"header": "@@ -94,7 +94,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new java.security.PrivilegedExceptionAction()"
]
},
{
"added": [
" new java.security.PrivilegedAction<Object>()"
],
"header": "@@ -130,7 +130,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new java.security.PrivilegedAction()"
]
},
{
"added": [
" return AccessController.doPrivileged(",
" new PrivilegedExceptionAction<StorageFactory>()",
" public StorageFactory run() throws InstantiationException, IllegalAccessException, IOException"
],
"header": "@@ -181,10 +181,10 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" return (StorageFactory) AccessController.doPrivileged(",
" new PrivilegedExceptionAction()",
" public Object run() throws InstantiationException, IllegalAccessException, IOException"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -265,7 +265,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -337,7 +337,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" \t new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -434,7 +434,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" \t new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -488,7 +488,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -679,7 +679,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -726,7 +726,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -783,7 +783,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" new PrivilegedExceptionAction<Object>()"
],
"header": "@@ -888,7 +888,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" new PrivilegedExceptionAction()"
]
},
{
"added": [
" return getProtocolLeadIn() + AccessController.doPrivileged(",
" new PrivilegedExceptionAction<String>()",
" public String run()"
],
"header": "@@ -949,10 +949,10 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" return getProtocolLeadIn() + (String) AccessController.doPrivileged(",
" new PrivilegedExceptionAction()",
" public Object run()"
]
},
{
"added": [
" return (AccessController.doPrivileged(",
" new PrivilegedAction<Boolean>() {",
" public Boolean run() {"
],
"header": "@@ -1010,9 +1010,9 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" return ((Boolean)AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" final class DirectoryList implements Enumeration, PrivilegedAction<DirectoryList>"
],
"header": "@@ -1046,7 +1046,7 @@ final class StorageFactoryService implements PersistentService",
"removed": [
" final class DirectoryList implements Enumeration, PrivilegedAction"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/monitor/TopService.java",
"hunks": [
{
"added": [
"\tHashtable<ProtocolKey,ModuleInstance>\t\tprotocolTable;",
"\tVector<ModuleInstance>\t\tmoduleInstances;"
],
"header": "@@ -61,11 +61,11 @@ final class TopService {",
"removed": [
"\tHashtable\t\tprotocolTable;",
"\tVector\t\tmoduleInstances;"
]
},
{
"added": [
"\t\tprotocolTable = new Hashtable<ProtocolKey,ModuleInstance>();",
"\t\tmoduleInstances = new Vector<ModuleInstance>(0, 5);"
],
"header": "@@ -88,8 +88,8 @@ final class TopService {",
"removed": [
"\t\tprotocolTable = new Hashtable();",
"\t\tmoduleInstances = new Vector(0, 5);"
]
},
{
"added": [
"\t\tModuleInstance module = protocolTable.get(key);"
],
"header": "@@ -208,7 +208,7 @@ final class TopService {",
"removed": [
"\t\tModuleInstance module = (ModuleInstance) protocolTable.get(key);"
]
},
{
"added": [
" ModuleInstance module = moduleInstances.get(i);"
],
"header": "@@ -235,7 +235,7 @@ final class TopService {",
"removed": [
" ModuleInstance module = (ModuleInstance) moduleInstances.get(i);"
]
},
{
"added": [
" module = moduleInstances.get(i);"
],
"header": "@@ -281,7 +281,7 @@ final class TopService {",
"removed": [
" module = (ModuleInstance) moduleInstances.get(i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java",
"hunks": [
{
"added": [
"\t\tHashtable<Object,Object> defaults = (Hashtable<Object,Object>)"
],
"header": "@@ -366,7 +366,7 @@ class PropertyConglomerate",
"removed": [
"\t\tDictionary<String,Object> defaults = (Dictionary<String,Object>)"
]
}
]
}
] |
derby-DERBY-6213-0758fb61
|
DERBY-6213: Convert misc packages to Java 6.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480251 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/diag/ErrorMessages.java",
"hunks": [
{
"added": [
"public final class ErrorMessages extends VTITemplate implements VTICosting, java.security.PrivilegedAction<InputStream> {"
],
"header": "@@ -63,7 +63,7 @@ import org.apache.derby.iapi.sql.ResultColumnDescriptor;",
"removed": [
"public final class ErrorMessages extends VTITemplate implements VTICosting, java.security.PrivilegedAction {"
]
},
{
"added": [
"\t\t\tInputStream is = java.security.AccessController.doPrivileged(this);"
],
"header": "@@ -162,7 +162,7 @@ public final class ErrorMessages extends VTITemplate implements VTICosting, java",
"removed": [
"\t\t\tInputStream is = (InputStream) java.security.AccessController.doPrivileged(this);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/diag/StatementCache.java",
"hunks": [
{
"added": [
"\tprivate Vector<GenericPreparedStatement> data;"
],
"header": "@@ -70,7 +70,7 @@ import org.apache.derby.vti.VTITemplate;",
"removed": [
"\tprivate Vector data;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/diag/StatementDuration.java",
"hunks": [
{
"added": [
"\tprivate Hashtable<String,String[]> hashTable;"
],
"header": "@@ -87,7 +87,7 @@ public class StatementDuration extends VTITemplate",
"removed": [
"\tprivate Hashtable hashTable;"
]
},
{
"added": [
" final String home = AccessController.doPrivileged",
" new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -116,11 +116,11 @@ public class StatementDuration extends VTITemplate",
"removed": [
" final String home = (String)AccessController.doPrivileged",
" new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
"\t\t\thashTable = new Hashtable<String,String[]>();"
],
"header": "@@ -169,7 +169,7 @@ public class StatementDuration extends VTITemplate",
"removed": [
"\t\t\thashTable = new Hashtable();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/vti/UpdatableVTITemplate.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLXML;"
],
"header": "@@ -30,13 +30,16 @@ import java.sql.Blob;",
"removed": []
}
]
},
{
"file": "java/tools/org/apache/derby/tools/SignatureChecker.java",
"hunks": [
{
"added": [
" private ArrayList<SQLRoutine> _procedures = new ArrayList<SQLRoutine>();",
" private ArrayList<SQLRoutine> _functions = new ArrayList<SQLRoutine>();"
],
"header": "@@ -84,8 +84,8 @@ public class SignatureChecker",
"removed": [
" private ArrayList _procedures = new ArrayList();",
" private ArrayList _functions = new ArrayList();"
]
},
{
"added": [
" Class<?> driverManagerClass = Class.forName( \"java.sql.DriverManager\" );",
" ( \"getConnection\", String.class );"
],
"header": "@@ -453,9 +453,9 @@ public class SignatureChecker",
"removed": [
" Class driverManagerClass = Class.forName( \"java.sql.DriverManager\" );",
" ( \"getConnection\", new Class[] { String.class } );"
]
},
{
"added": [
" return _procedures.get( idx );"
],
"header": "@@ -518,7 +518,7 @@ public class SignatureChecker",
"removed": [
" return (SQLRoutine) _procedures.get( idx );"
]
},
{
"added": [
" return _functions.get( idx );"
],
"header": "@@ -534,7 +534,7 @@ public class SignatureChecker",
"removed": [
" return (SQLRoutine) _functions.get( idx );"
]
},
{
"added": [
" private ArrayList<String> _argList = new ArrayList<String>();"
],
"header": "@@ -639,7 +639,7 @@ public class SignatureChecker",
"removed": [
" private ArrayList _argList = new ArrayList();"
]
}
]
}
] |
derby-DERBY-6213-16d3334c
|
DERBY-6213: Generify remaining classes needed to remove lint warnings in Derby build.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1485822 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/shared/org/apache/derby/shared/common/sanity/AssertFailure.java",
"hunks": [
{
"added": [
" Class<?> c = Class.forName("
],
"header": "@@ -166,7 +166,7 @@ public class AssertFailure extends RuntimeException {",
"removed": [
" Class c = Class.forName("
]
}
]
},
{
"file": "java/shared/org/apache/derby/shared/common/sanity/SanityManager.java",
"hunks": [
{
"added": [
"\tstatic private Hashtable<String,Boolean> DebugFlags = new Hashtable<String,Boolean>();"
],
"header": "@@ -72,7 +72,7 @@ public class SanityManager {",
"removed": [
"\tstatic private Hashtable DebugFlags = new Hashtable();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java",
"hunks": [
{
"added": [
" Vector<String> errors = new Vector<String>();"
],
"header": "@@ -40,7 +40,7 @@ public class AttributeHolder {",
"removed": [
" Vector errors = new Vector();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java",
"hunks": [
{
"added": [
"\tHashtable<String,Session> sessions = new Hashtable<String,Session>();"
],
"header": "@@ -42,7 +42,7 @@ import org.apache.derby.iapi.tools.i18n.LocalizedOutput;",
"removed": [
"\tHashtable sessions = new Hashtable();"
]
},
{
"added": [
" Properties p = AccessController.doPrivileged(new PrivilegedAction<Properties>() {",
" \tpublic Properties run() {"
],
"header": "@@ -66,8 +66,8 @@ class ConnectionEnv {",
"removed": [
" Properties p = (Properties) AccessController.doPrivileged(new PrivilegedAction() {",
" \tpublic Object run() {"
]
},
{
"added": [
" Enumeration<String> e;",
" if ((e.nextElement()).equals(newConnectionName))"
],
"header": "@@ -122,13 +122,13 @@ class ConnectionEnv {",
"removed": [
" Enumeration e;",
" if (((String)e.nextElement()).equals(newConnectionName))"
]
},
{
"added": [
"\tHashtable<String,Session> getSessions() {",
"\t\treturn sessions.get(name);",
"\t\tcurrSession = sessions.get(name);"
],
"header": "@@ -140,16 +140,16 @@ class ConnectionEnv {",
"removed": [
"\tHashtable getSessions() {",
"\t\treturn (Session) sessions.get(name);",
"\t\tcurrSession = (Session) sessions.get(name);"
]
},
{
"added": [
"\t\tSession s = sessions.remove(name);"
],
"header": "@@ -165,7 +165,7 @@ class ConnectionEnv {",
"removed": [
"\t\tSession s = (Session) sessions.remove(name);"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/Main.java",
"hunks": [
{
"added": [
" \tin1 = AccessController.doPrivileged(new PrivilegedExceptionAction<FileInputStream>() {",
" \t\t\t\tpublic FileInputStream run() throws FileNotFoundException {"
],
"header": "@@ -117,8 +117,8 @@ public class Main {",
"removed": [
" \tin1 = (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" \t\t\t\tpublic Object run() throws FileNotFoundException {"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/Session.java",
"hunks": [
{
"added": [
"\tHashtable<String,PreparedStatement> prepStmts = new Hashtable<String,PreparedStatement>();",
"\tHashtable<String,Statement> cursorStmts = new Hashtable<String,Statement>();",
"\tHashtable<String,ResultSet> cursors = new Hashtable<String,ResultSet>();",
"\tHashtable<String,AsyncStatement> asyncStmts = new Hashtable<String,AsyncStatement>();"
],
"header": "@@ -46,10 +46,10 @@ class Session {",
"removed": [
"\tHashtable prepStmts = new Hashtable();",
"\tHashtable cursorStmts = new Hashtable();",
"\tHashtable cursors = new Hashtable();",
"\tHashtable asyncStmts = new Hashtable();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/URLCheck.java",
"hunks": [
{
"added": [
" private Vector<AttributeHolder> attributes;",
" private static Vector<String> booleanAttributes;",
" private Vector<String> validProps;"
],
"header": "@@ -42,11 +42,11 @@ import java.sql.SQLException;",
"removed": [
" private Vector attributes;",
" private static Vector booleanAttributes;",
" private Vector validProps;"
]
},
{
"added": [
" Enumeration<AttributeHolder> e = attributes.elements();",
" AttributeHolder anAttribute = e.nextElement();"
],
"header": "@@ -70,9 +70,9 @@ public class URLCheck {",
"removed": [
" Enumeration e = attributes.elements();",
" AttributeHolder anAttribute = (AttributeHolder)e.nextElement();"
]
},
{
"added": [
" Enumeration<AttributeHolder> e = attributes.elements();",
" AttributeHolder aHolder = e.nextElement();"
],
"header": "@@ -82,9 +82,9 @@ public class URLCheck {",
"removed": [
" Enumeration e = attributes.elements();",
" AttributeHolder aHolder = (AttributeHolder)e.nextElement();"
]
},
{
"added": [
"\t\tattributes = new Vector<AttributeHolder>();"
],
"header": "@@ -113,7 +113,7 @@ public class URLCheck {",
"removed": [
"\t\tattributes = new Vector();"
]
},
{
"added": [
" public static Vector<String> getBooleanAttributes(){",
" booleanAttributes = new Vector<String>();"
],
"header": "@@ -139,9 +139,9 @@ public class URLCheck {",
"removed": [
" public static Vector getBooleanAttributes(){",
" booleanAttributes = new Vector();"
]
},
{
"added": [
" private static Vector<String> validDerbyProps;",
" private Vector<String> getValidDerbyProps()",
" Vector<String> props = new Vector<String>();"
],
"header": "@@ -150,14 +150,14 @@ public class URLCheck {",
"removed": [
" private static Vector validDerbyProps;",
" private Vector getValidDerbyProps()",
" Vector props = new Vector();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/ijMultipleResultSetResult.java",
"hunks": [
{
"added": [
" private ArrayList<ResultSet> resultSets = null;"
],
"header": "@@ -39,7 +39,7 @@ import org.apache.derby.iapi.tools.ToolUtils;",
"removed": [
" private ArrayList resultSets = null;"
]
},
{
"added": [
" public ijMultipleResultSetResult(List<ResultSet> resultSets, int[] display,",
" this.resultSets = new ArrayList<ResultSet>();"
],
"header": "@@ -54,9 +54,9 @@ public class ijMultipleResultSetResult extends ijResultImpl {",
"removed": [
" public ijMultipleResultSetResult(List resultSets, int[] display,",
" this.resultSets = new ArrayList();"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")",
" public List<ResultSet> getMultipleResultSets() {",
" return (List<ResultSet>) resultSets.clone();",
" rs = resultSets.get(i);"
],
"header": "@@ -72,15 +72,16 @@ public class ijMultipleResultSetResult extends ijResultImpl {",
"removed": [
" public List getMultipleResultSets() {",
" return (List) resultSets.clone();",
" rs = (ResultSet)resultSets.get(i);"
]
},
{
"added": [
" rs = resultSets.get(i);"
],
"header": "@@ -97,7 +98,7 @@ public class ijMultipleResultSetResult extends ijResultImpl {",
"removed": [
" rs = (ResultSet)resultSets.get(i);"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/ijVectorResult.java",
"hunks": [
{
"added": [
"\tVector<Object> vec;",
"\tijVectorResult(Vector<Object> v, SQLWarning w) {"
],
"header": "@@ -30,10 +30,10 @@ import java.sql.SQLWarning;",
"removed": [
"\tVector vec;",
"\tijVectorResult(Vector v, SQLWarning w) {"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/util.java",
"hunks": [
{
"added": [
"public final class util implements java.security.PrivilegedAction<String> {"
],
"header": "@@ -53,7 +53,7 @@ import java.util.Locale;",
"removed": [
"public final class util implements java.security.PrivilegedAction {"
]
},
{
"added": [
"\t\tInputStream is = AccessController.doPrivileged(new PrivilegedAction<InputStream>() {",
" public InputStream run() { "
],
"header": "@@ -185,8 +185,8 @@ public final class util implements java.security.PrivilegedAction {",
"removed": [
"\t\tInputStream is = (InputStream) AccessController.doPrivileged(new PrivilegedAction() {",
" public Object run() { "
]
},
{
"added": [
"\t\t Class<?> dc = Class.forName(dsName);"
],
"header": "@@ -367,7 +367,7 @@ public final class util implements java.security.PrivilegedAction {",
"removed": [
"\t\t Class dc = Class.forName(dsName);"
]
},
{
"added": [
"\t\t\t\treturn java.security.AccessController.doPrivileged(u);"
],
"header": "@@ -695,7 +695,7 @@ AppUI.out.println(\"SIZE=\"+l);",
"removed": [
"\t\t\t\treturn (String) java.security.AccessController.doPrivileged(u);"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/utilMain.java",
"hunks": [
{
"added": [
"public class utilMain implements java.security.PrivilegedAction<Object> {"
],
"header": "@@ -51,7 +51,7 @@ import java.sql.PreparedStatement;",
"removed": [
"public class utilMain implements java.security.PrivilegedAction {"
]
},
{
"added": [
"\tStack<StatementFinder> oldGrabbers = new Stack<StatementFinder>();"
],
"header": "@@ -86,7 +86,7 @@ public class utilMain implements java.security.PrivilegedAction {",
"removed": [
"\tStack oldGrabbers = new Stack();"
]
},
{
"added": [
"\t\t\t\t\tcommandGrabber[currCE] = oldGrabbers.pop();"
],
"header": "@@ -315,7 +315,7 @@ public class utilMain implements java.security.PrivilegedAction {",
"removed": [
"\t\t\t\t\tcommandGrabber[currCE] = (StatementFinder)oldGrabbers.pop();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/sysinfo/Main.java",
"hunks": [
{
"added": [
" classpath = AccessController.doPrivileged( new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -222,9 +222,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" classpath = (String) AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
" String property = AccessController.doPrivileged( new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -347,9 +347,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" String property = (String) AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
" return AccessController",
" .doPrivileged(new PrivilegedExceptionAction<String>() {",
" public String run() throws IOException {"
],
"header": "@@ -376,9 +376,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" return (String) AccessController",
" .doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {"
]
},
{
"added": [
" \tInputStream is = AccessController.doPrivileged",
" (new PrivilegedAction<InputStream>() {",
" public InputStream run() {"
],
"header": "@@ -447,9 +447,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" \tInputStream is = (InputStream) AccessController.doPrivileged",
" (new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
"\t\t\t\tVector<ZipInfoProperties> v = new Vector<ZipInfoProperties>();"
],
"header": "@@ -825,7 +825,7 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
"\t\t\t\tVector v = new Vector();"
]
},
{
"added": [
"\t\tjava.util.ArrayList<ZipInfoProperties> al = new java.util.ArrayList<ZipInfoProperties>();",
" InputStream is = AccessController.doPrivileged",
" (new PrivilegedAction<InputStream>() {",
" public InputStream run() {"
],
"header": "@@ -874,15 +874,15 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
"\t\tjava.util.ArrayList al = new java.util.ArrayList();",
" InputStream is = (InputStream) AccessController.doPrivileged",
" (new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" URL locUrl = AccessController.doPrivileged",
" (new PrivilegedAction<URL>() {",
" public URL run() {"
],
"header": "@@ -896,9 +896,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" URL locUrl = (URL) AccessController.doPrivileged",
" (new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" return AccessController.doPrivileged( new PrivilegedAction<ZipInfoProperties>()",
" public ZipInfoProperties run()"
],
"header": "@@ -954,9 +954,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" return (ZipInfoProperties) AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
" return AccessController.doPrivileged( new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -1111,9 +1111,9 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" return (String)AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
" Vector<ZipInfoProperties> v = new Vector<ZipInfoProperties>();"
],
"header": "@@ -1163,7 +1163,7 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
" Vector v = new Vector();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/tools/JDBCDisplayUtil.java",
"hunks": [
{
"added": [
" static public void DisplayMultipleResults(PrintWriter out, List<ResultSet> resultSets,"
],
"header": "@@ -306,7 +306,7 @@ public class JDBCDisplayUtil {",
"removed": [
" static public void DisplayMultipleResults(PrintWriter out, List resultSets,"
]
},
{
"added": [
" List<ResultSet> resultSets = new ArrayList<ResultSet>();",
" (PrintWriter out, List<ResultSet> resultSets, Connection conn, int indentLevel,"
],
"header": "@@ -339,14 +339,14 @@ public class JDBCDisplayUtil {",
"removed": [
" List resultSets = new ArrayList();",
" (PrintWriter out, List resultSets, Connection conn, int indentLevel,"
]
},
{
"added": [
" rsmd = (resultSets.get(0)).getMetaData();",
" Vector<ResultSet> nestedResults;",
" nestedResults = new Vector<ResultSet>();"
],
"header": "@@ -354,16 +354,16 @@ public class JDBCDisplayUtil {",
"removed": [
" rsmd = ((ResultSet)resultSets.get(0)).getMetaData();",
" Vector nestedResults;",
" nestedResults = new Vector();"
]
},
{
"added": [
" rs = resultSets.get(i);"
],
"header": "@@ -381,7 +381,7 @@ public class JDBCDisplayUtil {",
"removed": [
" rs = (ResultSet)resultSets.get(i);"
]
},
{
"added": [
"\tstatic private void DisplayNestedResults(PrintWriter out, Vector<ResultSet> nr, Connection conn, int indentLevel )"
],
"header": "@@ -430,7 +430,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\tstatic private void DisplayNestedResults(PrintWriter out, Vector nr, Connection conn, int indentLevel )"
]
},
{
"added": [
"\t\tVector<ResultSet> nestedResults;",
"\t\t\tnestedResults = new Vector<ResultSet>();"
],
"header": "@@ -477,12 +477,12 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\tVector nestedResults;",
"\t\t\tnestedResults = new Vector();"
]
},
{
"added": [
"\t\tVector<ResultSet> nestedResults;"
],
"header": "@@ -529,7 +529,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\tVector nestedResults;"
]
},
{
"added": [
"\t\t\tnestedResults = new Vector<ResultSet>();"
],
"header": "@@ -539,7 +539,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\t\tnestedResults = new Vector();"
]
},
{
"added": [
"\tstatic private void DisplayRow(PrintWriter out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int indentLevel,"
],
"header": "@@ -660,7 +660,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\tstatic private void DisplayRow(PrintWriter out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector nestedResults, Connection conn, int indentLevel,"
]
},
{
"added": [
"\t\t\t\t\tnestedResults.addElement( (ResultSet) o);"
],
"header": "@@ -691,7 +691,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\t\t\t\tnestedResults.addElement(o);"
]
},
{
"added": [
"\t\tVector<ResultSet> nestedResults;",
"\t\t\tnestedResults = new Vector<ResultSet>();"
],
"header": "@@ -927,13 +927,13 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\tVector nestedResults;",
"\t\t\tnestedResults = new Vector();"
]
},
{
"added": [
"\tstatic private void DisplayNestedResults(PrintStream out, Vector<ResultSet> nr, Connection conn, int indentLevel )"
],
"header": "@@ -981,7 +981,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\tstatic private void DisplayNestedResults(PrintStream out, Vector nr, Connection conn, int indentLevel )"
]
},
{
"added": [
"\t\t\tindent_DisplayResults(out, nr.elementAt(i), conn, "
],
"header": "@@ -1003,7 +1003,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\t\tindent_DisplayResults(out, (ResultSet) nr.elementAt(i), conn, "
]
},
{
"added": [
"\t\tVector<ResultSet> nestedResults;",
"\t\t\tnestedResults = new Vector<ResultSet>();"
],
"header": "@@ -1019,12 +1019,12 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\tVector nestedResults;",
"\t\t\tnestedResults = new Vector();"
]
},
{
"added": [
"\t\tVector<ResultSet> nestedResults;"
],
"header": "@@ -1061,7 +1061,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\tVector nestedResults;"
]
},
{
"added": [
"\t\t\tnestedResults = new Vector<ResultSet>();"
],
"header": "@@ -1071,7 +1071,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\t\tnestedResults = new Vector();"
]
},
{
"added": [
"\tstatic private void DisplayRow(PrintStream out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector<ResultSet> nestedResults, Connection conn, int indentLevel,"
],
"header": "@@ -1170,7 +1170,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\tstatic private void DisplayRow(PrintStream out, ResultSet rs, ResultSetMetaData rsmd, int rowLen, Vector nestedResults, Connection conn, int indentLevel,"
]
},
{
"added": [
"\t\t\t\t\tnestedResults.addElement( (ResultSet) o);"
],
"header": "@@ -1201,7 +1201,7 @@ public class JDBCDisplayUtil {",
"removed": [
"\t\t\t\t\tnestedResults.addElement(o);"
]
}
]
},
{
"file": "java/tools/org/apache/derby/tools/dblook.java",
"hunks": [
{
"added": [
"\tprivate static HashMap<String,String> schemaMap;",
"\tprivate static HashMap<String,String> tableIdToNameMap;",
"\tprivate static ArrayList<String> tableList;"
],
"header": "@@ -64,15 +64,15 @@ public final class dblook {",
"removed": [
"\tprivate static HashMap schemaMap;",
"\tprivate static HashMap tableIdToNameMap;",
"\tprivate static ArrayList tableList;"
]
},
{
"added": [
"\t\tschemaMap = new HashMap<String,String>();",
"\t\ttableIdToNameMap = new HashMap<String,String>();"
],
"header": "@@ -135,8 +135,8 @@ public final class dblook {",
"removed": [
"\t\tschemaMap = new HashMap();",
"\t\ttableIdToNameMap = new HashMap();"
]
},
{
"added": [
"\t\ttableList = new ArrayList<String>();"
],
"header": "@@ -432,7 +432,7 @@ public final class dblook {",
"removed": [
"\t\ttableList = new ArrayList();"
]
},
{
"added": [
"\t\t\tString tableName = tableList.get(i);"
],
"header": "@@ -895,7 +895,7 @@ public final class dblook {",
"removed": [
"\t\t\tString tableName = (String)tableList.get(i);"
]
},
{
"added": [
"\t\treturn schemaMap.get(schemaId);"
],
"header": "@@ -1055,7 +1055,7 @@ public final class dblook {",
"removed": [
"\t\treturn (String)(schemaMap.get(schemaId));"
]
},
{
"added": [
"\t\treturn tableIdToNameMap.get(tableId);"
],
"header": "@@ -1069,7 +1069,7 @@ public final class dblook {",
"removed": [
"\t\treturn (String)(tableIdToNameMap.get(tableId));"
]
}
]
}
] |
derby-DERBY-6213-209fdc06
|
DERBY-6213: Remove java15compile.classpath build variable and the JDBC 3 and JSR 169 stubs.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1487040 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/build/org/apache/derbyPreBuild/PropertySetter.java",
"hunks": [
{
"added": [],
"header": "@@ -51,7 +51,6 @@ import org.apache.tools.ant.taskdefs.Property;",
"removed": [
" * <li>java15compile.classpath</li>"
]
},
{
"added": [],
"header": "@@ -63,7 +62,6 @@ import org.apache.tools.ant.taskdefs.Property;",
"removed": [
" * <li>j15lib</li>"
]
}
]
},
{
"file": "java/stubs/jsr169/javax/sql/RowSetWriter.java",
"hunks": [
{
"added": [],
"header": "@@ -1,52 +0,0 @@",
"removed": [
"/* ",
" * 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 javax.sql;",
"",
"import java.sql.SQLException;",
"",
"/**",
" * An interface which provides functionality for a disconnected RowSet to put",
" * data updates back to the data source from which the RowSet was originally",
" * populated. An object implementing this interface is called a Writer.",
" * <p>",
" * The Writer must establish a connection to the RowSet's data source before",
" * writing the data. The RowSet calling this interface must implement the",
" * RowSetInternal interface.",
" * <p>",
" * The Writer may encounter a situation where the updated data being written",
" * back to the data source has already been updated in the data source. How a",
" * conflict of this kind is handled is determined by the implementation of the",
" * Writer.",
" */",
"public interface RowSetWriter {",
"",
" /**",
" * Writes changes in the RowSet associated with this RowSetWriter back to",
" * its data source.",
" * ",
" * @param theRowSet",
" * the RowSet object. This RowSet must a) Implement the",
" * RowSetInternal interface and b) have have this RowSetWriter",
" * registered with it and c) must call this method internally",
" * @return true if the modified data was written, false otherwise (which",
" * typically implies some form of conflict)",
" * @throws SQLException",
" * if a problem occurs accessing the database",
" */",
" public boolean writeData(RowSetInternal theRowSet) throws SQLException;",
"}"
]
}
]
}
] |
derby-DERBY-6213-274c5ba4
|
DERBY-6213: Generify impl/sql/conn package.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1484498 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java",
"hunks": [
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -127,6 +127,7 @@ public class CreateAliasNode extends DDLStatementNode",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java",
"hunks": [
{
"added": [
"\tprivate List<Provider> descriptorList; "
],
"header": "@@ -49,7 +49,7 @@ public class TablePrivilegesNode extends QueryTreeNode",
"removed": [
"\tprivate List descriptorList; "
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java",
"hunks": [
{
"added": [
" private final ArrayList<Activation> acts;"
],
"header": "@@ -113,7 +113,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" private final ArrayList acts;"
]
},
{
"added": [
" private Map<Object,Object> xplain_statements = new HashMap<Object,Object>();",
" private ArrayList<TempTableInfo> allDeclaredGlobalTempTables;"
],
"header": "@@ -141,10 +141,10 @@ public class GenericLanguageConnectionContext",
"removed": [
" private Map xplain_statements = new HashMap();",
" private ArrayList allDeclaredGlobalTempTables;"
]
},
{
"added": [
" private ArrayList<ExecutionStmtValidator> stmtValidators;",
" private ArrayList<TriggerExecutionContext> triggerExecutionContexts;",
" private ArrayList <TableDescriptor> triggerTables;"
],
"header": "@@ -269,9 +269,9 @@ public class GenericLanguageConnectionContext",
"removed": [
" private ArrayList stmtValidators;",
" private ArrayList triggerExecutionContexts;",
" private ArrayList triggerTables;"
]
},
{
"added": [
" private HashMap<Object,Long> autoincrementHT;"
],
"header": "@@ -282,7 +282,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" private HashMap autoincrementHT;"
]
},
{
"added": [
" private HashMap<String,AutoincrementCounter> autoincrementCacheHashtable;"
],
"header": "@@ -291,7 +291,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" private HashMap autoincrementCacheHashtable;"
]
},
{
"added": [
" private WeakHashMap<TableDescriptor,FormatableBitSet> referencedColumnMap;"
],
"header": "@@ -308,7 +308,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" private WeakHashMap referencedColumnMap;"
]
},
{
"added": [
" acts = new ArrayList<Activation>();"
],
"header": "@@ -328,7 +328,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" acts = new ArrayList();"
]
},
{
"added": [
" stmtValidators = new ArrayList<ExecutionStmtValidator>();",
" triggerExecutionContexts = new ArrayList<TriggerExecutionContext>();",
" triggerTables = new ArrayList<TableDescriptor>();"
],
"header": "@@ -360,9 +360,9 @@ public class GenericLanguageConnectionContext",
"removed": [
" stmtValidators = new ArrayList();",
" triggerExecutionContexts = new ArrayList();",
" triggerTables = new ArrayList();"
]
},
{
"added": [
" referencedColumnMap = new WeakHashMap<TableDescriptor,FormatableBitSet>();"
],
"header": "@@ -396,7 +396,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" referencedColumnMap = new WeakHashMap();"
]
},
{
"added": [
" Activation a1 = acts.get(i);"
],
"header": "@@ -520,7 +520,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a1 = (Activation) acts.get(i);"
]
},
{
"added": [
" allDeclaredGlobalTempTables = new ArrayList<TempTableInfo>();"
],
"header": "@@ -577,7 +577,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" allDeclaredGlobalTempTables = new ArrayList();"
]
},
{
"added": [
" allDeclaredGlobalTempTables.get(i);"
],
"header": "@@ -654,7 +654,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TempTableInfo)allDeclaredGlobalTempTables.get(i);"
]
},
{
"added": [
" allDeclaredGlobalTempTables.get(i);"
],
"header": "@@ -705,7 +705,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TempTableInfo)allDeclaredGlobalTempTables.get(i);"
]
},
{
"added": [
" allDeclaredGlobalTempTables.",
" get(i).getTableDescriptor();"
],
"header": "@@ -739,8 +739,8 @@ public class GenericLanguageConnectionContext",
"removed": [
" ((TempTableInfo) (allDeclaredGlobalTempTables.",
" get(i))).getTableDescriptor();"
]
},
{
"added": [
" allDeclaredGlobalTempTables.get(i).getTableDescriptor();"
],
"header": "@@ -784,8 +784,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" ((TempTableInfo) ",
" (allDeclaredGlobalTempTables.get(i))).getTableDescriptor();"
]
},
{
"added": [
" referencedColumnMap = new WeakHashMap<TableDescriptor,FormatableBitSet>();"
],
"header": "@@ -821,7 +820,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" referencedColumnMap = new WeakHashMap();"
]
},
{
"added": [
" allDeclaredGlobalTempTables.get(i);"
],
"header": "@@ -851,7 +850,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TempTableInfo)allDeclaredGlobalTempTables.get(i);"
]
},
{
"added": [
" allDeclaredGlobalTempTables.get(i);"
],
"header": "@@ -937,7 +936,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TempTableInfo)allDeclaredGlobalTempTables.get(i);"
]
},
{
"added": [
" if ((allDeclaredGlobalTempTables.get(i)).matches(tableName))",
" return allDeclaredGlobalTempTables.get(i);"
],
"header": "@@ -1076,8 +1075,8 @@ public class GenericLanguageConnectionContext",
"removed": [
" if (((TempTableInfo)allDeclaredGlobalTempTables.get(i)).matches(tableName))",
" return (TempTableInfo)allDeclaredGlobalTempTables.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -1163,7 +1162,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -1970,7 +1969,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -1998,7 +1997,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -2037,7 +2036,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -2094,7 +2093,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -2131,7 +2130,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" triggerExecutionContexts.get( triggerExecutionContexts.size() - 1 ); "
],
"header": "@@ -2713,8 +2712,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TriggerExecutionContext)triggerExecutionContexts.get(",
" triggerExecutionContexts.size() - 1); "
]
},
{
"added": [
" for (Iterator<ExecutionStmtValidator> it = stmtValidators.iterator(); it.hasNext(); )",
" it.next()"
],
"header": "@@ -2737,9 +2735,9 @@ public class GenericLanguageConnectionContext",
"removed": [
" for (Iterator it = stmtValidators.iterator(); it.hasNext(); )",
" ((ExecutionStmtValidator)it.next())"
]
},
{
"added": [
" triggerTables.get(triggerTables.size() - 1);"
],
"header": "@@ -2786,7 +2784,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (TableDescriptor)triggerTables.get(triggerTables.size() - 1);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -3093,7 +3091,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" Activation a = acts.get(i);"
],
"header": "@@ -3159,7 +3157,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" Activation a = (Activation) acts.get(i);"
]
},
{
"added": [
" TriggerExecutionContext itec = triggerExecutionContexts.get(i);"
],
"header": "@@ -3328,8 +3326,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" TriggerExecutionContext itec =",
" (TriggerExecutionContext) triggerExecutionContexts.get(i);"
]
},
{
"added": [
" autoincrementCacheHashtable = new HashMap<String,AutoincrementCounter>();",
" autoincrementCacheHashtable.get(key);"
],
"header": "@@ -3368,11 +3365,11 @@ public class GenericLanguageConnectionContext",
"removed": [
" autoincrementCacheHashtable = new HashMap();",
" (AutoincrementCounter)autoincrementCacheHashtable.get(key);"
]
},
{
"added": [
" autoincrementCacheHashtable.get(key);"
],
"header": "@@ -3407,7 +3404,7 @@ public class GenericLanguageConnectionContext",
"removed": [
" (AutoincrementCounter)autoincrementCacheHashtable.get(key);"
]
},
{
"added": [
" autoincrementHT = new HashMap<Object,Long>();",
" for (Iterator<String> it = autoincrementCacheHashtable.keySet().iterator();",
" autoincrementCacheHashtable.get(key);"
],
"header": "@@ -3440,15 +3437,15 @@ public class GenericLanguageConnectionContext",
"removed": [
" autoincrementHT = new HashMap();",
" for (Iterator it = autoincrementCacheHashtable.keySet().iterator();",
" (AutoincrementCounter)autoincrementCacheHashtable.get(key);"
]
},
{
"added": [
" public void copyHashtableToAIHT(Map<Object,Long> from)",
" autoincrementHT = new HashMap<Object,Long>();"
],
"header": "@@ -3464,12 +3461,12 @@ public class GenericLanguageConnectionContext",
"removed": [
" public void copyHashtableToAIHT(Map from)",
" autoincrementHT = new HashMap();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java",
"hunks": [
{
"added": [
"\tprivate ArrayList<Dependency>\t\tdependencies;"
],
"header": "@@ -65,7 +65,7 @@ final class GenericStatementContext",
"removed": [
"\tprivate ArrayList\t\tdependencies;"
]
},
{
"added": [
"\t\t\tdependencies = new ArrayList<Dependency>();"
],
"header": "@@ -462,7 +462,7 @@ final class GenericStatementContext",
"removed": [
"\t\t\tdependencies = new ArrayList();"
]
}
]
}
] |
derby-DERBY-6213-2e4b1b18
|
DERBY-6213: Remove more references to EmbeddedSimpleDataSource; tests passed cleanly on derby-6213-25-aa-remove-reflective-references-to-EmbeddedSimpleDataSource.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1495471 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBCClient.java",
"hunks": [
{
"added": [],
"header": "@@ -60,17 +60,6 @@ public final class JDBCClient {",
"removed": [
" /**",
" * The embedded JDBC client for JSR 169",
" */",
" private static final JDBCClient EMBEDDED_169 = new JDBCClient(",
" \"Embedded_169\", ",
" null, // No driver",
" \"org.apache.derby.jdbc.EmbeddedSimpleDataSource\", ",
" null, // No connection pooling",
" null, // No XA",
" null); // No JDBC URLs",
" "
]
},
{
"added": [],
"header": "@@ -80,8 +69,6 @@ public final class JDBCClient {",
"removed": [
" if (JDBC.vmSupportsJSR169())",
" return EMBEDDED_169;"
]
}
]
}
] |
derby-DERBY-6213-38c638d9
|
DERBY-6213: Deprecate support for Java 5 and CDC
- Remove checks for the JVMInfo.J2ME constant
- Move functionality from DirStorageFactory4 to the base class
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1492111 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/info/JVMInfo.java",
"hunks": [
{
"added": [],
"header": "@@ -61,8 +61,6 @@ public abstract class JVMInfo",
"removed": [
"\tpublic static final boolean J2ME;",
""
]
},
{
"added": [],
"header": "@@ -79,16 +77,6 @@ public abstract class JVMInfo",
"removed": [
"\t\tString javaSpec;",
"\t\tboolean isJ2ME;",
"",
"\t\ttry {",
"\t\t\tjavaSpec = System.getProperty(\"java.specification.name\");",
"\t\t} catch (SecurityException se) {",
"\t\t\t// some vms do not know about this property so they",
"\t\t\t// throw a security exception when access is restricted.",
"\t\t\tjavaSpec = null;",
"\t\t}"
]
},
{
"added": [
" if (javaVersion.equals(\"1.4\"))",
" {",
" String vmVersion = System.getProperty(\"java.version\", \"1.4.0\");",
" if (JVMInfo.vmCheck(vmVersion, \"1.4.0\") || JVMInfo.vmCheck(vmVersion, \"1.4.1\"))",
" id = J2SE_14;",
" else",
" id = J2SE_142;",
" }",
" else if (javaVersion.equals(\"1.5\"))",
" {",
" id = J2SE_15;",
" }",
" else if (javaVersion.equals(\"1.6\"))",
" {",
" id = J2SE_16;",
" }",
" else if (javaVersion.equals(\"1.7\"))",
" {",
" id = J2SE_17;",
" }",
" else if (javaVersion.equals(\"1.8\")) {",
" id = J2SE_18;",
" }",
" else",
" {",
" // aussme our lowest support unless the java spec",
" // is greater than our highest level.",
" id = J2SE_14;",
" try {",
" if (Float.parseFloat(javaVersion) > 1.8f)",
" id = J2SE_18;",
" } catch (NumberFormatException nfe) {",
" }",
" }"
],
"header": "@@ -99,66 +87,45 @@ public abstract class JVMInfo",
"removed": [
"\t\tif (javaSpec != null &&",
" (",
" javaSpec.startsWith(\"J2ME\") || // recognize IBM WCTME",
" javaSpec.startsWith(\"CDC\") || // Oracle Java ME Embedded Client",
" (",
" (javaSpec.indexOf( \"Profile\" ) > -1) && // recognize phoneME",
" (javaSpec.indexOf( \"Specification\" ) > -1)",
" )",
" )",
" )",
"\t\t{",
"\t\t\tid = J2SE_14;",
"\t\t\tisJ2ME = true;",
"\t\t}",
"\t\telse",
"\t\t{",
"\t\t\t// J2SE/J2EE",
"\t\t\tisJ2ME = false;",
"",
"\t\t\tif (javaVersion.equals(\"1.4\"))",
"\t\t\t{",
"\t\t\t\tString vmVersion = System.getProperty(\"java.version\", \"1.4.0\");",
"\t\t\t\tif (JVMInfo.vmCheck(vmVersion, \"1.4.0\") || JVMInfo.vmCheck(vmVersion, \"1.4.1\"))",
"\t\t\t\t\tid = J2SE_14;",
"\t\t\t\telse",
"\t\t\t\t\tid = J2SE_142;",
"\t\t\t}",
"\t\t\telse if (javaVersion.equals(\"1.5\"))",
"\t\t\t{",
"\t\t\t\tid = J2SE_15;",
"\t\t\t}",
"\t\t\telse if (javaVersion.equals(\"1.6\"))",
"\t\t\t{",
"\t\t\t\tid = J2SE_16;",
"\t\t\t}",
" else if (javaVersion.equals(\"1.7\"))",
" {",
" id = J2SE_17;",
" }",
" else if (javaVersion.equals(\"1.8\")) {",
" id = J2SE_18;",
" }",
"\t\t\telse",
"\t\t\t{",
"\t\t\t\t// aussme our lowest support unless the java spec",
"\t\t\t\t// is greater than our highest level.",
"\t\t\t\tid = J2SE_14;",
"\t\t\t\ttry {",
" if (Float.parseFloat(javaVersion) > 1.8f)",
" id = J2SE_18;",
"\t\t\t\t} catch (NumberFormatException nfe) {",
"\t\t\t\t}",
"\t\t\t}",
"\t\t}",
"\t\tJ2ME = isJ2ME;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/io/DirFile.java",
"hunks": [
{
"added": [
"import java.nio.channels.AsynchronousCloseException;",
"import java.nio.channels.FileChannel;",
"import java.nio.channels.FileLock;",
"import java.nio.channels.OverlappingFileLockException;"
],
"header": "@@ -36,11 +36,13 @@ import java.io.FileNotFoundException;",
"removed": [
"import java.security.AccessControlException;",
"import org.apache.derby.shared.common.reference.SQLState;"
]
},
{
"added": [
" private RandomAccessFile lockFileOpen;",
" private FileChannel lockFileChannel;",
" private FileLock dbLock;"
],
"header": "@@ -48,6 +50,9 @@ import org.apache.derby.shared.common.reference.SQLState;",
"removed": []
},
{
"added": [
" OutputStream result = new FileOutputStream(this, append);"
],
"header": "@@ -132,7 +137,7 @@ class DirFile extends File implements StorageFile",
"removed": [
" OutputStream result = new FileOutputStream( getPath(), append);"
]
},
{
"added": [
" {",
" boolean validExclusiveLock = false;",
" int status;",
"",
" /*",
" ** There can be a scenario where there is some other JVM that is before jkdk1.4",
" ** had booted the system and jdk1.4 trying to boot it, in this case we will get the",
" ** Exclusive Lock even though some other JVM has already booted the database. But",
" ** the lock is not a reliable one , so we should still throw the warning.",
" ** The Way we identify this case is if \"dbex.lck\" file size is differen",
" ** for pre jdk1.4 jvms and jdk1.4 or above.",
" ** Zero size \"dbex.lck\" file is created by a jvm i.e before jdk1.4 and",
" ** File created by jdk1.4 or above writes EXCLUSIVE_FILE_LOCK value into the file.",
" ** If we are unable to acquire the lock means other JVM that",
" ** currently booted the system is also JDK1.4 or above;",
" ** In this case we could confidently throw a exception instead of",
" ** of a warning.",
" **/",
"",
" try",
" //create the file that us used to acquire exclusive lock if it does not exists.",
" if (createNewFile())",
" {",
" validExclusiveLock = true;",
" }",
" else if (length() > 0)",
" {",
" validExclusiveLock = true;",
" }",
"",
" //If we can acquire a reliable exclusive lock , try to get it.",
" if (validExclusiveLock)",
" {",
" int retries = InterruptStatus.MAX_INTERRUPT_RETRIES;",
" while (true) {",
" lockFileOpen = new RandomAccessFile((File) this, \"rw\");",
" limitAccessToOwner(); // tamper-proof..",
" lockFileChannel = lockFileOpen.getChannel();",
"",
" try {",
" dbLock =lockFileChannel.tryLock();",
" if(dbLock == null) {",
" lockFileChannel.close();",
" lockFileChannel=null;",
" lockFileOpen.close();",
" lockFileOpen = null;",
" status = EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE;",
" } else {",
" lockFileOpen.writeInt(EXCLUSIVE_FILE_LOCK);",
" lockFileChannel.force(true);",
" status = EXCLUSIVE_FILE_LOCK;",
" }",
" } catch (AsynchronousCloseException e) {",
" // JDK bug 6979009: use AsynchronousCloseException",
" // instead of the logically correct",
" // ClosedByInterruptException",
"",
" InterruptStatus.setInterrupted();",
" lockFileOpen.close();",
"",
" if (retries-- > 0) {",
" continue;",
" } else {",
" throw e;",
" }",
" }",
"",
" break;",
" }",
" }",
" else",
" {",
" status = NO_FILE_LOCK_SUPPORT;",
" }",
"",
" } catch(IOException ioe)",
" {",
" // do nothing - it may be read only medium, who knows what the",
" // problem is",
"",
" //release all the possible resource we created in this functions.",
" releaseExclusiveFileLock();",
" status = NO_FILE_LOCK_SUPPORT;",
" if (SanityManager.DEBUG)",
" {",
" SanityManager.THROWASSERT(\"Unable to Acquire Exclusive Lock on \"",
" + getPath(), ioe);",
" }",
" } catch (OverlappingFileLockException ofle)",
" {",
" //",
" // Under Java 6 and later, this exception is raised if the database",
" // has been opened by another Derby instance in a different",
" // ClassLoader in this VM. See DERBY-700.",
" //",
" // The OverlappingFileLockException is raised by the",
" // lockFileChannel.tryLock() call above.",
" //",
" try {",
" lockFileChannel.close();",
" lockFileOpen.close();",
" } catch (IOException e)",
" {",
" if (SanityManager.DEBUG)",
" {",
" SanityManager.THROWASSERT(\"Error closing file channel \"",
" + getPath(), e);",
" }",
" }",
" lockFileChannel = null;",
" lockFileOpen = null;",
" status = EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE;",
" }",
"",
" return status;",
" } // end of getExclusiveFileLock",
" public synchronized void releaseExclusiveFileLock()",
" {",
" try",
" {",
" if (dbLock!=null)",
" {",
" dbLock.release();",
" dbLock = null;",
" }",
"",
" if (lockFileChannel != null)",
" {",
" lockFileChannel.close();",
" lockFileChannel = null;",
" }",
"",
" if (lockFileOpen != null)",
" {",
" lockFileOpen.close();",
" lockFileOpen = null;",
" }",
"",
" // delete the exclusive lock file name.",
" if (exists())",
" {",
" delete();",
" }",
" }",
" catch (IOException ioe)",
" {",
" // do nothing - it may be read only medium, who knows what the",
" // problem is",
" }",
" } // End of releaseExclusiveFileLock"
],
"header": "@@ -163,44 +168,163 @@ class DirFile extends File implements StorageFile",
"removed": [
"\t{",
"\t\tif (exists())",
"\t\t{",
"\t\t\tdelete();",
"\t\t}",
"\t\ttry",
"\t\t\t//Just create an empty file",
"\t\t\tRandomAccessFile lockFileOpen = new RandomAccessFile( (File) this, \"rw\");",
" limitAccessToOwner();",
"\t\t\tlockFileOpen.getFD().sync( );",
"\t\t\tlockFileOpen.close();",
"\t\t}catch(IOException ioe)",
"\t\t{",
"\t\t\t// do nothing - it may be read only medium, who knows what the",
"\t\t\t// problem is",
"\t\t\tif (SanityManager.DEBUG)",
"\t\t\t{",
"\t\t\t\tSanityManager.THROWASSERT(",
" \"Unable to create Exclusive Lock File \" + getPath(), ioe);",
"\t\t\t}",
"\t\t}",
"\t\t",
"\t\treturn NO_FILE_LOCK_SUPPORT;",
"\t} // end of getExclusiveFileLock",
"\tpublic synchronized void releaseExclusiveFileLock()",
"\t{",
"\t\tif( exists())",
"\t\t{",
"\t\t\tdelete(); ",
"\t\t}",
"\t} // End of releaseExclusiveFileLock"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/io/DirStorageFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -21,22 +21,15 @@",
"removed": [
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import org.apache.derby.io.StorageRandomAccessFile;",
"import java.io.FileNotFoundException;",
"import java.io.FileInputStream;",
"import java.io.InputStream;",
"import java.util.Properties;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java",
"hunks": [
{
"added": [],
"header": "@@ -30,7 +30,6 @@ import org.apache.derby.iapi.sql.compile.TypeCompiler;",
"removed": [
"import org.apache.derby.iapi.services.info.JVMInfo;"
]
},
{
"added": [],
"header": "@@ -42,10 +41,6 @@ import org.apache.derby.iapi.types.TypeId;",
"removed": [
"import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;",
"",
"import org.apache.derby.iapi.util.ReuseFactory;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java",
"hunks": [
{
"added": [],
"header": "@@ -29,14 +29,11 @@ import org.apache.derby.iapi.services.loader.ClassFactory;",
"removed": [
"import org.apache.derby.iapi.services.info.JVMInfo;",
"import org.apache.derby.iapi.types.DataTypeDescriptor;",
"import org.apache.derby.iapi.types.DataValueFactory;"
]
}
]
}
] |
derby-DERBY-6213-400f6eb4
|
DERBY-6213: Cleanup Java6 related lint warnings in types, load, db, io, and security.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482443 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/io/vfmem/DataStore.java",
"hunks": [
{
"added": [
" private final Map<String,DataStoreEntry> files = new HashMap<String,DataStoreEntry>(80);"
],
"header": "@@ -54,7 +54,7 @@ public final class DataStore {",
"removed": [
" private final Map files = new HashMap(80);"
]
},
{
"added": [
" DataStoreEntry entry = files.get(parents[i]);"
],
"header": "@@ -119,7 +119,7 @@ public final class DataStore {",
"removed": [
" DataStoreEntry entry = (DataStoreEntry)files.get(parents[i]);"
]
},
{
"added": [
" DataStoreEntry entry = files.get(subPath);"
],
"header": "@@ -145,7 +145,7 @@ public final class DataStore {",
"removed": [
" DataStoreEntry entry = (DataStoreEntry)files.get(subPath);"
]
},
{
"added": [
" entry = files.remove(nPath);"
],
"header": "@@ -170,7 +170,7 @@ public final class DataStore {",
"removed": [
" entry = (DataStoreEntry)files.remove(nPath);"
]
},
{
"added": [
" return files.get(new File(iPath).getPath());"
],
"header": "@@ -203,7 +203,7 @@ public final class DataStore {",
"removed": [
" return (DataStoreEntry)files.get(new File(iPath).getPath());"
]
},
{
"added": [
" DataStoreEntry entry = files.remove(nPath);"
],
"header": "@@ -217,7 +217,7 @@ public final class DataStore {",
"removed": [
" DataStoreEntry entry = (DataStoreEntry)files.remove(nPath);"
]
},
{
"added": [
" ArrayList<String> children = new ArrayList<String>();",
" Iterator<String> paths = files.keySet().iterator();",
" candidate = paths.next();"
],
"header": "@@ -255,12 +255,12 @@ public final class DataStore {",
"removed": [
" ArrayList children = new ArrayList();",
" Iterator paths = files.keySet().iterator();",
" candidate = (String)paths.next();"
]
},
{
"added": [
" DataStoreEntry current = files.remove(currentPath);"
],
"header": "@@ -284,8 +284,7 @@ public final class DataStore {",
"removed": [
" DataStoreEntry current = (DataStoreEntry)",
" files.remove(currentPath);"
]
},
{
"added": [
" Iterator<DataStoreEntry> fileIter = files.values().iterator();",
" (fileIter.next()).release();"
],
"header": "@@ -299,9 +298,9 @@ public final class DataStore {",
"removed": [
" Iterator fileIter = files.values().iterator();",
" ((DataStoreEntry)fileIter.next()).release();"
]
},
{
"added": [
" ArrayList<String> toDelete = new ArrayList<String>();",
" Iterator<String> paths = files.keySet().iterator();",
" String path = paths.next();"
],
"header": "@@ -323,11 +322,11 @@ public final class DataStore {",
"removed": [
" ArrayList toDelete = new ArrayList();",
" Iterator paths = files.keySet().iterator();",
" String path = (String)paths.next();"
]
},
{
"added": [
" DataStoreEntry entry = files.remove((String)keys.next());"
],
"header": "@@ -337,8 +336,7 @@ public final class DataStore {",
"removed": [
" DataStoreEntry entry = (DataStoreEntry)",
" files.remove((String)keys.next());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/load/ColumnInfo.java",
"hunks": [
{
"added": [
"\tprivate ArrayList<String> vtiColumnNames ;",
" private ArrayList<String> insertColumnNames;",
" private ArrayList<String> columnTypes ;",
" private ArrayList<Integer> jdbcColumnTypes;"
],
"header": "@@ -49,10 +49,10 @@ import org.apache.derby.iapi.jdbc.EngineConnection;",
"removed": [
"\tprivate ArrayList vtiColumnNames ;",
" private ArrayList insertColumnNames;",
" private ArrayList columnTypes ;",
" private ArrayList jdbcColumnTypes;"
]
},
{
"added": [
" private HashMap<String,String> udtClassNames;"
],
"header": "@@ -61,7 +61,7 @@ class ColumnInfo {",
"removed": [
" private HashMap udtClassNames;"
]
},
{
"added": [
"\t\tvtiColumnNames = new ArrayList<String>(1);",
"\t\tinsertColumnNames = new ArrayList<String>(1);",
"\t\tcolumnTypes = new ArrayList<String>(1);",
" jdbcColumnTypes = new ArrayList<Integer>(1);",
" udtClassNames = new HashMap<String,String>();"
],
"header": "@@ -82,11 +82,11 @@ class ColumnInfo {",
"removed": [
"\t\tvtiColumnNames = new ArrayList(1);",
"\t\tinsertColumnNames = new ArrayList(1);",
"\t\tcolumnTypes = new ArrayList(1);",
" jdbcColumnTypes = new ArrayList(1);",
" udtClassNames = new HashMap();"
]
},
{
"added": [
" @SuppressWarnings({\"unchecked\"})",
" ArrayList<String> list = (ArrayList<String>) ImportAbstract.destringifyObject( columnTypeNamesString );"
],
"header": "@@ -528,7 +528,8 @@ class ColumnInfo {",
"removed": [
" ArrayList list = (ArrayList) ImportAbstract.destringifyObject( columnTypeNamesString );"
]
},
{
"added": [
" HashMap<String,Class<?>> retval = new HashMap<String,Class<?>>();"
],
"header": "@@ -554,7 +555,7 @@ class ColumnInfo {",
"removed": [
" HashMap retval = new HashMap();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/security/DatabasePermission.java",
"hunks": [
{
"added": [
" static protected final Set<String> LEGAL_ACTIONS = new HashSet<String>();"
],
"header": "@@ -119,7 +119,7 @@ final public class DatabasePermission extends Permission {",
"removed": [
" static protected final Set LEGAL_ACTIONS = new HashSet();"
]
},
{
"added": [
" final String cwd = AccessController.doPrivileged(",
" new PrivilegedAction<String>() {",
" public String run() {"
],
"header": "@@ -310,9 +310,9 @@ final public class DatabasePermission extends Permission {",
"removed": [
" final String cwd = (String)AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/security/SystemPermission.java",
"hunks": [
{
"added": [
" static private final Set<String> LEGAL_NAMES = new HashSet<String>(); "
],
"header": "@@ -91,7 +91,7 @@ final public class SystemPermission extends BasicPermission {",
"removed": [
" static private final Set LEGAL_NAMES = new HashSet(); "
]
}
]
}
] |
derby-DERBY-6213-54655611
|
DERBY-6213: Deprecate support for Java 5 and CDC
Remove reflection code that guards access to the BigDecimal class,
which is now available on all supported platforms.
Remove J2SEDataValueFactory and move all functionality to the base
class DataValueFactoryImpl.
Remove initalization code for DECIMAL in DataValueFactory.boot(), no
longer needed since there is just a single implementation of the
DECIMAL type.
Make the parser represent DECIMAL literals as BigDecimals instead of
Strings.
Remove now unused methods in DataValueFactory for constructing
SQLDecimal values from String values.
Clean up references to CDC in comments.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1516715 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java",
"hunks": [
{
"added": [
" /* 200 */ \"org.apache.derby.iapi.types.DTSClassInfo\", //InstanceGetter"
],
"header": "@@ -249,7 +249,7 @@ private static final String[] TwoByte = {",
"removed": [
" /* 200 */ null, // DECIMAL - register dynamically by DataValueFactory implementation"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/DataValueFactory.java",
"hunks": [
{
"added": [],
"header": "@@ -21,7 +21,6 @@",
"removed": [
"import org.apache.derby.iapi.types.RowLocation;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java",
"hunks": [
{
"added": [],
"header": "@@ -21,43 +21,22 @@",
"removed": [
"import org.apache.derby.iapi.types.NumberDataValue;",
"import org.apache.derby.iapi.types.BooleanDataValue;",
"import org.apache.derby.iapi.types.BitDataValue;",
"import org.apache.derby.iapi.types.DateTimeDataValue;",
"import org.apache.derby.iapi.types.StringDataValue;",
"import org.apache.derby.iapi.types.UserDataValue;",
"import org.apache.derby.iapi.types.RefDataValue;",
"",
"import org.apache.derby.iapi.types.DataValueFactory;",
"import org.apache.derby.iapi.types.DataValueDescriptor;",
"",
"import org.apache.derby.iapi.types.RowLocation;",
"",
"import org.apache.derby.iapi.services.io.FormatableInstanceGetter;",
"import org.apache.derby.iapi.services.io.FormatIdUtil;",
"import org.apache.derby.iapi.services.io.RegisteredFormatIds;",
"import org.apache.derby.iapi.services.loader.ClassInfo;",
"import org.apache.derby.iapi.services.loader.InstanceGetter;",
"",
"import org.apache.derby.iapi.reference.Property;",
"import java.sql.SQLException;"
]
},
{
"added": [
" * Core implementation of DataValueFactory.",
"public final class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
" private LocaleFinder localeFinder;"
],
"header": "@@ -71,25 +50,19 @@ import org.apache.derby.iapi.db.DatabaseContext;",
"removed": [
" * Core implementation of DataValueFactory. Does not implement",
" * methods required to generate DataValueDescriptor implementations",
" * for the DECIMAL datatype. J2ME and J2SE require different implementations.",
"abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
" LocaleFinder localeFinder;",
" DataValueFactoryImpl()",
" {",
" }",
" "
]
},
{
"added": [],
"header": "@@ -99,16 +72,6 @@ abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
"removed": [
" \t\tDataValueDescriptor decimalImplementation = getNullDecimal(null);",
" \t\t",
" \t\tTypeId.decimalImplementation = decimalImplementation;",
" \t\tRegisteredFormatIds.setDecimalClassName( decimalImplementation.getClass().getName() );",
" \t\t \t\t",
" \t\t// Generate a DECIMAL value represetentation of 0",
" \t\tdecimalImplementation = decimalImplementation.getNewNull();",
" \t\tdecimalImplementation.setValue(0L);",
" \t\tNumberDataType.ZERO_DECIMAL = decimalImplementation; \t\t",
""
]
},
{
"added": [
" NumberDataValue retValue =",
" (previous == null) ? getNullDecimal(null) : previous;",
" retValue.setValue(value);",
" return retValue;"
],
"header": "@@ -294,33 +257,14 @@ abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
"removed": [
" public final NumberDataValue getDecimalDataValue(Number value)",
"\t\t\tthrows StandardException",
" {",
"\t\t\tNumberDataValue ndv = getNullDecimal((NumberDataValue) null);",
"\t\t\tndv.setValue(value);",
"\t\t\treturn ndv;",
" }",
" if (previous == null)",
" return getDecimalDataValue(value);",
"",
" previous.setValue(value);",
" return previous;",
" }",
"",
" public final NumberDataValue getDecimalDataValue(String value,",
" NumberDataValue previous)",
" throws StandardException",
" {",
" if (previous == null)",
" return getDecimalDataValue(value);",
"",
" previous.setValue(value);",
" return previous;"
]
},
{
"added": [
" public final NumberDataValue getNullDecimal(NumberDataValue dataValue)",
" {",
" if (dataValue == null) {",
" return new SQLDecimal();",
" }",
"",
" dataValue.setToNull();",
" return dataValue;",
" }",
""
],
"header": "@@ -708,6 +652,16 @@ abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
"removed": []
},
{
"added": [
" DataValueDescriptor returnDVD =",
" DataValueFactoryImpl.getNullDVDWithUCS_BASICcollation(formatId);",
"",
" // If we are dealing with default collation, then we have got the",
" // right DVD already. Just return it.",
" if (collationType == StringDataValue.COLLATION_TYPE_UCS_BASIC) {",
" return returnDVD;",
" }",
"",
" // If we are dealing with territory based collation and returnDVD is",
" // of type StringDataValue, then we need to return a StringDataValue",
" // with territory based collation.",
" if (returnDVD instanceof StringDataValue) {",
" return ((StringDataValue) returnDVD)",
" .getValue(getCharacterCollator(collationType));",
" }",
"",
" // Otherwise, it's not a StringDataValue, and it can be returned",
" // as it is.",
" return returnDVD;"
],
"header": "@@ -1111,28 +1065,26 @@ abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
"removed": [
" \t//For StoredFormatIds.SQL_DECIMAL_ID, different implementations are ",
" \t//required for different VMs. getNullDecimal method is not static and ",
" \t//hence can't be called in the static getNullDVDWithUCS_BASICcollation",
" \t//method in this class. That is why StoredFormatIds.SQL_DECIMAL_ID is ",
" \t//getting handled here.",
" \tif (formatId == StoredFormatIds.SQL_DECIMAL_ID)",
" \t\treturn getNullDecimal(null);",
"\t\telse {",
"\t\t\tDataValueDescriptor returnDVD = ",
"\t\t\t\tDataValueFactoryImpl.getNullDVDWithUCS_BASICcollation(formatId);",
"\t\t\t//If we are dealing with default collation, then we have got the",
"\t\t\t//right DVD already. Just return it.",
"\t\t\tif (collationType == StringDataValue.COLLATION_TYPE_UCS_BASIC)",
"\t\t\t\treturn returnDVD;\t\t\t",
"\t\t\t//If we are dealing with territory based collation and returnDVD is ",
"\t\t\t//of type StringDataValue, then we need to return a StringDataValue ",
"\t\t\t//with territory based collation.",
"\t\t\tif (returnDVD instanceof StringDataValue) ",
"\t\t\t\treturn ((StringDataValue)returnDVD).getValue(getCharacterCollator(collationType));",
"\t\t\telse",
"\t\t\t\treturn returnDVD;\t\t\t",
"\t\t}"
]
},
{
"added": [
" * with them. If collation associated should be territory based, then that"
],
"header": "@@ -1140,16 +1092,10 @@ abstract class DataValueFactoryImpl implements DataValueFactory, ModuleControl",
"removed": [
" * with them. If collation associated should be terriotry based, then that",
" * Another thing to note is this method does not deal with format id",
" * associated with decimal. This is because different implementation are",
" * required for different VMs. This is again something that needs to be",
" * handled by the caller. An example of such code in the caller can be ",
" * seen in DataValueFactory.getNull method.",
" * "
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/NumberDataType.java",
"hunks": [
{
"added": [
" static final BigDecimal MAXLONG_PLUS_ONE =",
" BigDecimal.valueOf(Long.MAX_VALUE).add(BigDecimal.ONE);",
" static final BigDecimal MINLONG_MINUS_ONE =",
" BigDecimal.valueOf(Long.MIN_VALUE).subtract(BigDecimal.ONE);"
],
"header": "@@ -42,16 +42,10 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary;",
"removed": [
"\t/**",
"\t * Set by the booting DataValueFactory implementation.",
"\t */",
"\tstatic DataValueDescriptor ZERO_DECIMAL;",
"\t",
"\tstatic final BigDecimal ZERO = BigDecimal.valueOf(0L);",
"\tstatic final BigDecimal ONE = BigDecimal.valueOf(1L);",
"\tstatic final BigDecimal MAXLONG_PLUS_ONE = BigDecimal.valueOf(Long.MAX_VALUE).add(ONE);",
"\tstatic final BigDecimal MINLONG_MINUS_ONE = BigDecimal.valueOf(Long.MIN_VALUE).subtract(ONE);",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/SQLDecimal.java",
"hunks": [
{
"added": [
"\t\treturn localValue.compareTo(BigDecimal.ZERO) != 0;"
],
"header": "@@ -298,7 +298,7 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
"\t\treturn localValue.compareTo(ZERO) != 0;"
]
},
{
"added": [
"\t\tsetCoreValue(theValue ? BigDecimal.ONE : BigDecimal.ZERO);"
],
"header": "@@ -673,7 +673,7 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
"\t\tsetCoreValue(theValue ? ONE : ZERO);"
]
},
{
"added": [
"\t\tif (divisorBigDecimal.compareTo(BigDecimal.ZERO) == 0)"
],
"header": "@@ -885,7 +885,7 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
"\t\tif (divisorBigDecimal.compareTo(ZERO) == 0)"
]
},
{
"added": [
" return !isNull() && (getBigDecimal().compareTo(BigDecimal.ZERO) == -1);"
],
"header": "@@ -948,7 +948,7 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
" return !isNull() && (getBigDecimal().compareTo(ZERO) == -1);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/types/TypeId.java",
"hunks": [
{
"added": [],
"header": "@@ -335,12 +335,6 @@ public final class TypeId",
"removed": [
" /**",
" * Implementation of DECIMAL datatype for generating holders through getNull.",
" * Set by the booted DataValueFactory implementation.",
" */",
" static DataValueDescriptor\t\tdecimalImplementation;",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java",
"hunks": [
{
"added": [
"import java.math.BigDecimal;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
"import org.apache.derby.iapi.types.SQLDecimal;"
],
"header": "@@ -28,6 +29,7 @@ import org.apache.derby.iapi.services.context.ContextManager;",
"removed": []
},
{
"added": [
" NumericConstantNode(TypeId t, Number value, ContextManager cm)"
],
"header": "@@ -77,7 +79,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" NumericConstantNode(TypeId t, Object value, ContextManager cm)"
]
},
{
"added": [
" private int getPrecision(TypeId t, Number val) throws StandardException {"
],
"header": "@@ -89,7 +91,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" private int getPrecision(TypeId t, Object val) throws StandardException {"
]
},
{
"added": [
" SQLDecimal constantDecimal = new SQLDecimal((BigDecimal) val);"
],
"header": "@@ -103,8 +105,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" NumberDataValue constantDecimal =",
" getDataValueFactory().getDecimalDataValue((String)val);"
]
},
{
"added": [
" SQLDecimal constantDecimal = new SQLDecimal((BigDecimal) val);"
],
"header": "@@ -133,8 +134,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" NumberDataValue constantDecimal =",
" getDataValueFactory().getDecimalDataValue((String)val);"
]
},
{
"added": [
" SQLDecimal constantDecimal = new SQLDecimal((BigDecimal) val);"
],
"header": "@@ -163,8 +163,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" NumberDataValue constantDecimal =",
" getDataValueFactory().getDecimalDataValue((String) val);"
]
},
{
"added": [
" private void setValue(TypeId t, Number value ) throws StandardException {"
],
"header": "@@ -210,7 +209,7 @@ public final class NumericConstantNode extends ConstantNode",
"removed": [
" private void setValue(TypeId t, Object value ) throws StandardException {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java",
"hunks": [
{
"added": [
" /**",
" * Return the method name to get a Derby DataValueDescriptor object of the",
" * correct type. This implementation returns {@code \"getDataValue\"}, unless",
" * the type is {@code DECIMAL}, in which case {@code \"getDecimalDataValue\"}",
" * is returned.",
" */"
],
"header": "@@ -317,10 +317,12 @@ public final class NumericTypeCompiler extends BaseTypeCompiler",
"removed": [
"\t/**",
"\t\tReturn the method name to get a Derby DataValueDescriptor",
"\t\tobject of the correct type. This implementation returns \"getDataValue\".",
"\t*/"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/AvgAggregator.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.types.SQLDecimal;"
],
"header": "@@ -21,11 +21,11 @@",
"removed": [
"import org.apache.derby.shared.common.sanity.SanityManager;"
]
},
{
"added": [
"\t\t\t\tscale = ((SQLDecimal) addend).getDecimalValueScale();"
],
"header": "@@ -70,7 +70,7 @@ public final class AvgAggregator extends SumAggregator",
"removed": [
"\t\t\t\tscale = ((NumberDataValue) addend).getDecimalValueScale();"
]
}
]
},
{
"file": "java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java",
"hunks": [
{
"added": [],
"header": "@@ -23,7 +23,6 @@ package org.apache.derby.iapi.tools.i18n;",
"removed": [
"import java.lang.reflect.Method;"
]
},
{
"added": [],
"header": "@@ -46,26 +45,6 @@ import java.sql.Types;",
"removed": [
"\tprivate static final boolean SUPPORTS_BIG_DECIMAL_CALLS;",
"\t",
"\tstatic {",
"\t\tboolean supportsBigDecimalCalls;",
"\t\ttry {",
"\t\t\t// This class attempts to make a call to a ",
"\t\t\t// ResultSet.getBigDecimal method, which may not be available.",
"\t\t\t// For instance, java.math.BigDecimal is not available with",
"\t\t\t// J2ME/CDC/Foundation 1.0 profile.",
"\t\t\tClass.forName(\"java.math.BigDecimal\");",
"\t\t\tsupportsBigDecimalCalls = true;",
"\t\t\t// And no methods using BigDecimal are available with JSR169 spec.",
"\t\t\tMethod getbd = ResultSet.class.getMethod(\"getBigDecimal\", new Class[] {int.class});",
"\t\t\tsupportsBigDecimalCalls = true;",
"\t\t} catch (Throwable t) {",
"\t\t\tsupportsBigDecimalCalls = false;",
"\t\t}",
"\t\tSUPPORTS_BIG_DECIMAL_CALLS = supportsBigDecimalCalls;",
"\t}",
"\t"
]
},
{
"added": [],
"header": "@@ -77,7 +56,6 @@ public final class LocalizedResource implements java.security.PrivilegedAction<",
"removed": [
"\tprivate boolean unicodeEscape;"
]
}
]
},
{
"file": "java/tools/org/apache/derby/impl/tools/ij/util.java",
"hunks": [
{
"added": [],
"header": "@@ -26,7 +26,6 @@ import org.apache.derby.iapi.tools.i18n.*;",
"removed": [
"import java.io.FileNotFoundException;"
]
},
{
"added": [],
"header": "@@ -36,7 +35,6 @@ import java.security.PrivilegedAction;",
"removed": [
"import java.sql.SQLWarning;"
]
},
{
"added": [],
"header": "@@ -55,23 +53,6 @@ import java.util.Locale;",
"removed": [
"\tprivate static boolean IS_AT_LEAST_JDBC2;",
"\t",
"\t{",
"\t\tboolean isAtLeastJDBC2;",
"\t\ttry {",
" // Need to test to see if this is",
" // currently JDBC 2 or JSR169.",
" // Checking for BigDecimal doesn't work because",
" // BigDecimal exists in J2ME/CDC/Foundation 1.1",
" Class.forName(\"java.sql.Driver\");",
"\t\t\tisAtLeastJDBC2 = true;",
"\t\t} catch (Throwable t) {",
"\t\t\tisAtLeastJDBC2 = false;",
"\t\t}",
"\t\tIS_AT_LEAST_JDBC2 = isAtLeastJDBC2;",
"\t}",
"\t"
]
},
{
"added": [
" if (driverName != null) {",
"\tif (jdbcProtocol != null)"
],
"header": "@@ -424,12 +405,12 @@ public final class util implements java.security.PrivilegedAction<String> {",
"removed": [
" if (driverName != null && IS_AT_LEAST_JDBC2) {",
"\tif (jdbcProtocol != null && IS_AT_LEAST_JDBC2)"
]
},
{
"added": [
"\tif (databaseURL != null) {"
],
"header": "@@ -439,7 +420,7 @@ public final class util implements java.security.PrivilegedAction<String> {",
"removed": [
"\tif (databaseURL != null && IS_AT_LEAST_JDBC2) {"
]
}
]
}
] |
derby-DERBY-6213-5570eb08
|
DERBY-6213: Remove CDC DataSource and Driver.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1481248 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/demo/simplemobile/SimpleMobileApp.java",
"hunks": [
{
"added": [
"import org.apache.derby.jdbc.EmbeddedDataSource40; // from derby.jar"
],
"header": "@@ -24,7 +24,7 @@ import java.sql.PreparedStatement;",
"removed": [
"import org.apache.derby.jdbc.EmbeddedSimpleDataSource; // from derby.jar"
]
},
{
"added": [
" * Derby databases: <code>org.apache.derby.jdbc.EmbeddedDataSource40</code>."
],
"header": "@@ -51,7 +51,7 @@ import org.apache.derby.jdbc.EmbeddedSimpleDataSource; // from derby.jar",
"removed": [
" * Derby databases: <code>org.apache.derby.jdbc.EmbeddedSimpleDataSource</code>."
]
},
{
"added": [
" * org.apache.derby.jdbc.EmbeddedDataSource40 that we need to ",
" EmbeddedDataSource40 ds = new EmbeddedDataSource40();"
],
"header": "@@ -105,11 +105,11 @@ public class SimpleMobileApp {",
"removed": [
" * org.apache.derby.jdbc.EmbeddedSimpleDataSource that we need to ",
" EmbeddedSimpleDataSource ds = new EmbeddedSimpleDataSource();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/diag/ContainedRoles.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.util.IdUtil;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/ErrorLogReader.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -43,6 +43,7 @@ import org.apache.derby.iapi.util.StringUtil;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/ErrorMessages.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -44,6 +44,7 @@ import org.apache.derby.vti.VTICosting;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/LockTable.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -38,6 +38,7 @@ import org.apache.derby.iapi.error.PublicAPI;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/SpaceTable.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -39,6 +39,7 @@ import org.apache.derby.iapi.error.PublicAPI;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/StatementCache.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.sql.ResultColumnDescriptor;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/StatementDuration.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -41,6 +41,7 @@ import org.apache.derby.vti.VTITemplate;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/diag/TransactionTable.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -32,6 +32,7 @@ import org.apache.derby.vti.VTIEnvironment;",
"removed": []
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java",
"hunks": [
{
"added": [
"\t * Location of derby.jar via org.apache.derby.jdbc.EmbeddedDataSource"
],
"header": "@@ -306,7 +306,7 @@ public final class SecurityManagerSetup extends TestSetup {",
"removed": [
"\t * Location of derby.jar via org.apache.derby.jdbc.EmbeddedSimpleDataSource"
]
}
]
},
{
"file": "java/tools/org/apache/derby/tools/SignatureChecker.java",
"hunks": [
{
"added": [
"import org.apache.derby.jdbc.EmbeddedDataSource40;"
],
"header": "@@ -30,7 +30,7 @@ import java.sql.SQLException;",
"removed": [
"import org.apache.derby.jdbc.EmbeddedSimpleDataSource;"
]
}
]
}
] |
derby-DERBY-6213-70516989
|
DERBY-6213: Generify the Felix stubs in order to remove a lint diagnostic at build time.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1487051 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/stubs/felix/org/osgi/framework/AdminPermission.java",
"hunks": [
{
"added": [
"\tprivate static class ImplHolder implements PrivilegedAction<Constructor[]> {",
"\t\t\tConstructor[] constructors = AccessController.doPrivileged(new ImplHolder());"
],
"header": "@@ -145,12 +145,12 @@ public final class AdminPermission extends BasicPermission {",
"removed": [
"\tprivate static class ImplHolder implements PrivilegedAction {",
"\t\t\tConstructor[] constructors = (Constructor[]) AccessController.doPrivileged(new ImplHolder());"
]
},
{
"added": [
"\t\tpublic Constructor[] run() {"
],
"header": "@@ -159,7 +159,7 @@ public final class AdminPermission extends BasicPermission {",
"removed": [
"\t\tpublic Object run() {"
]
}
]
},
{
"file": "java/stubs/felix/org/osgi/framework/BundlePermission.java",
"hunks": [
{
"added": [
"\tprivate Hashtable<String,Permission>\t\t\tpermissions;"
],
"header": "@@ -438,7 +438,7 @@ final class BundlePermissionCollection extends PermissionCollection {",
"removed": [
"\tprivate Hashtable\t\t\tpermissions;"
]
},
{
"added": [
"\t\tpermissions = new Hashtable<String,Permission>();"
],
"header": "@@ -453,7 +453,7 @@ final class BundlePermissionCollection extends PermissionCollection {",
"removed": [
"\t\tpermissions = new Hashtable();"
]
}
]
},
{
"file": "java/stubs/felix/org/osgi/framework/FrameworkUtil.java",
"hunks": [
{
"added": [
"\tprivate static class ImplHolder implements PrivilegedAction<Method> {"
],
"header": "@@ -47,7 +47,7 @@ public class FrameworkUtil {",
"removed": [
"\tprivate static class ImplHolder implements PrivilegedAction {"
]
},
{
"added": [
"\t\t\tcreateFilter = AccessController.doPrivileged(new ImplHolder());",
"\t\tpublic Method run() {"
],
"header": "@@ -56,13 +56,13 @@ public class FrameworkUtil {",
"removed": [
"\t\t\tcreateFilter = (Method) AccessController.doPrivileged(new ImplHolder());",
"\t\tpublic Object run() {"
]
}
]
},
{
"file": "java/stubs/felix/org/osgi/framework/PackagePermission.java",
"hunks": [
{
"added": [
"\tprivate Hashtable<String,Permission>\tpermissions;"
],
"header": "@@ -394,7 +394,7 @@ final class PackagePermissionCollection extends PermissionCollection {",
"removed": [
"\tprivate Hashtable\tpermissions;"
]
},
{
"added": [
"\t\tpermissions = new Hashtable<String,Permission>();"
],
"header": "@@ -408,7 +408,7 @@ final class PackagePermissionCollection extends PermissionCollection {",
"removed": [
"\t\tpermissions = new Hashtable();"
]
}
]
},
{
"file": "java/stubs/felix/org/osgi/framework/ServicePermission.java",
"hunks": [
{
"added": [
"\tprivate Hashtable<String,Permission>\tpermissions;"
],
"header": "@@ -364,7 +364,7 @@ final class ServicePermissionCollection extends PermissionCollection {",
"removed": [
"\tprivate Hashtable\tpermissions;"
]
},
{
"added": [
"\t\tpermissions = new Hashtable<String,Permission>();"
],
"header": "@@ -378,7 +378,7 @@ final class ServicePermissionCollection extends PermissionCollection {",
"removed": [
"\t\tpermissions = new Hashtable();"
]
},
{
"added": [
"\tpublic Enumeration<Permission> elements() {"
],
"header": "@@ -502,7 +502,7 @@ final class ServicePermissionCollection extends PermissionCollection {",
"removed": [
"\tpublic Enumeration elements() {"
]
}
]
}
] |
derby-DERBY-6213-78bdf360
|
DERBY-6213: Collapse the embedded DataSources into their Java 6 base classes.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1486921 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedConnectionPoolDataSource.java",
"hunks": [
{
"added": [
"/**",
" <P>",
" running on full Java SE 6 and higher, corresponding to 4.0 and higher.",
" </P>",
"\tregistered with a JNDI service.</P>",
" ",
"\tfor the Java Virtual Machine's environment.</P>",
" ",
" <LI>JDBC 4.0 - Java SE 6</LI>",
" <LI>JDBC 4.1 - Java SE 7</LI>",
" <LI>JDBC 4.2 - full Java SE 8</LI>",
" <P>",
" Use BasicEmbeddedConnectionPoolDataSource40 if your application runs on Java 8",
" Compact Profile 2.",
" </P>",
"",
"\t<P>EmbeddedConnectionPoolDataSource is serializable and referenceable.</P>",
"\t<P>See EmbeddedDataSource for DataSource properties.</P>"
],
"header": "@@ -28,29 +28,36 @@ import javax.sql.PooledConnection;",
"removed": [
"/** ",
" running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.",
" If running on Java SE 7 or higher, consider a more capable data source.",
" <p/>",
"",
"\tregistered with a JNDI service.",
"\tfor the Java Virtual Machine's environment.",
" <LI> JDBC 3.0 - J2SE 5.0 </LI>",
" <LI> JDBC 4.0 - Java SE 6 </LI>",
"\t<P>EmbeddedConnectionPoolDataSource is serializable and referenceable.",
"\t<P>See EmbeddedDataSource for DataSource properties."
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedDataSource40.java",
"hunks": [
{
"added": [
" <P>",
" This is a vacuous, deprecated class. At one time, it had real behavior and helped us support",
" separate datasources for Java 5 and Java 6.",
" Now that we no longer support Java 5, all functionality has migrated into the superclass, EmbeddedDataSource.",
" </P>"
],
"header": "@@ -21,169 +21,12 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.impl.jdbc.Util;",
"",
"",
" This datasource is suitable for an application using embedded Derby,",
" running on the following platforms:",
" <p>",
" <ul>",
" <li>Java SE 7 (JDBC 4.1) and",
" <li>full Java SE 8 (JDBC 4.2).",
" </ul>",
" <p>",
" Use BasicEmbeddedDataSource40 if your application runs on Java 8",
" Compact Profile 2.",
" <p>",
" Use EmbeddedDataSource if your application runs on the following",
" platforms:",
" <p>",
" <ul>",
" <li> JDBC 3.0 - J2SE 5.0 </li>",
" <li> JDBC 4.0 - Java SE 6 </li>",
" </ul>",
" <p>",
" EmbeddedDataSource40 is a DataSource implementation.",
"",
"\t<P>A DataSource is a factory for Connection objects. An object that",
"\timplements the DataSource interface will typically be registered with a",
"\tJNDI service provider.",
"\t<P>",
" The following is a list of properties that can be set on a Derby",
"\tDataSource object:",
"\t<P><B>Standard DataSource properties</B> (from JDBC 3.0 specification).",
"",
"\t<UL><LI><B><code>databaseName</code></B> (String): <I>Mandatory</I>",
"\t<BR>This property must be set and it",
"\tidentifies which database to access. If a database named wombat located at",
"\tg:/db/wombat is to be accessed, then one should call",
"\t<code>setDatabaseName(\"g:/db/wombat\")</code> on the data source object.</LI>",
"",
"\t<LI><B><code>dataSourceName</code></B> (String): <I>Optional</I>",
"\t<BR> Name for DataSource. Not used by the data source object. Used for",
"\tinformational purpose only.</LI>",
"",
"\t<LI><B><code>description</code></B> (String): <I>Optional</I>",
"\t<BR>Description of the data source. Not",
"\tused by the data source object. Used for informational purpose only.</LI> ",
"",
"\t<LI><B><code>password</code></B> (String): <I>Optional</I>",
"\t<BR>Database password for the no argument <code>DataSource.getConnection()</code>,",
"\t<code>ConnectionPoolDataSource.getPooledConnection()</code>",
"\tand <code>XADataSource.getXAConnection()</code> methods.",
"",
"\t<LI><B><code>user</code></B> (String): <I>Optional</I>",
"\t<BR>Database user for the no argument <code>DataSource.getConnection()</code>,",
"\t<code>ConnectionPoolDataSource.getPooledConnection()</code>",
"\tand <code>XADataSource.getXAConnection()</code> methods.",
"\t</UL>",
"",
"\t<BR><B>Derby specific DataSource properties.</B>",
"",
" <UL>",
"",
" <LI><B><code>attributesAsPassword</code></B> (Boolean): <I>Optional</I>",
"\t<BR>If true, treat the password value in a",
"\t<code>DataSource.getConnection(String user, String password)</code>,",
"\t<code>ConnectionPoolDataSource.getPooledConnection(String user, String password)</code>",
"\tor <code>XADataSource.getXAConnection(String user, String password)</code> as a set",
"\tof connection attributes. The format of the attributes is the same as the format",
"\tof the attributes in the property connectionAttributes. If false the password value",
"\tis treated normally as the password for the given user.",
"\tSetting this property to true allows a connection request from an application to",
"\tprovide more authentication information that just a password, for example the request",
"\tcan include the user's password and an encrypted database's boot password.</LI>",
"",
" <LI><B><code>connectionAttributes</code></B> (String): <I>Optional</I>",
" <BR>Defines a set of Derby connection attributes for use in all connection requests.",
" The format of the String matches the format of the connection attributes in a Derby JDBC URL.",
" That is a list of attributes in the form <code><I>attribute</I>=<I>value</I></code>, each separated by semi-colon (';').",
" E.g. <code>setConnectionAttributes(\"bootPassword=erd3234dggd3kazkj3000\");</code>.",
" <BR>The database name must be set by the DataSource property <code>databaseName</code> and not by setting the <code>databaseName</code>",
" connection attribute in the <code>connectionAttributes</code> property.",
"\t<BR>",
" Any attributes that can be set using a property of this DataSource implementation",
" (e.g user, password) should not be set in connectionAttributes. Conflicting",
" settings in connectionAttributes and properties of the DataSource will lead to",
" unexpected behaviour. ",
" <BR>Please see the Derby documentation for a complete list of connection attributes. </LI>",
"",
" <LI><B><code>createDatabase</code></B> (String): <I>Optional</I>",
"\t<BR>If set to the string \"create\", this will",
"\tcause a new database of <code>databaseName</code> if that database does not already",
"\texist. The database is created when a connection object is obtained from",
"\tthe data source. </LI> ",
"",
"\t<LI><B><code>shutdownDatabase</code></B> (String): <I>Optional</I>",
"\t<BR>If set to the string \"shutdown\",",
"\tthis will cause the database to shutdown when a java.sql.Connection object",
"\tis obtained from the data source. E.g., If the data source is an",
"\tXADataSource, a getXAConnection().getConnection() is necessary to cause the",
"\tdatabase to shutdown.",
"",
"\t</UL>",
"",
"\t<P><B>Examples.</B>",
"",
"\t<P>This is an example of setting a property directly using Derby's",
"\tEmbeddedDataSource40 object. This code is typically written by a system integrator :",
"\t<PRE> ",
"\t*",
"\t* import org.apache.derby.jdbc.*;",
"\t*",
"\t* // dbname is the database name",
"\t* // if create is true, create the database if necessary",
"\t* javax.sql.DataSource makeDataSource (String dbname, boolean create)",
"\t*\tthrows Throwable ",
"\t* { ",
"\t*\tEmbeddedDataSource40 ds = new EmbeddedDataSource40(); ",
"\t*\tds.setDatabaseName(dbname);",
"\t*",
"\t*\tif (create)",
"\t*\t\tds.setCreateDatabase(\"create\");",
" * ",
"\t*\treturn ds;",
"\t* }",
"\t</PRE>",
"",
"\t<P>Example of setting properties thru reflection. This code is typically",
"\tgenerated by tools or written by a system integrator: <PRE>",
"\t*\t",
"\t* javax.sql.DataSource makeDataSource(String dbname) ",
"\t*\tthrows Throwable ",
"\t* {",
"\t*\tClass[] parameter = new Class[1];",
"\t*\tparameter[0] = dbname.getClass();",
"\t*\tDataSource ds = new EmbeddedDataSource40();",
"\t*\tClass cl = ds.getClass();",
"\t*",
"\t*\tMethod setName = cl.getMethod(\"setDatabaseName\", parameter);",
"\t*\tObject[] arg = new Object[1];",
"\t*\targ[0] = dbname;",
"\t*\tsetName.invoke(ds, arg);",
"\t*",
"\t*\treturn ds;",
"\t* }",
"\t</PRE>",
"",
"\t<P>Example on how to register a data source object with a JNDI naming",
"\tservice.",
"\t<PRE>",
"\t* DataSource ds = makeDataSource(\"mydb\");",
"\t* Context ctx = new InitialContext();",
"\t* ctx.bind(\"jdbc/MyDB\", ds);",
"\t</PRE>",
"",
"\t<P>Example on how to retrieve a data source object from a JNDI naming",
"\tservice. ",
"\t<PRE>",
"\t* Context ctx = new InitialContext();",
"\t* DataSource ds = (DataSource)ctx.lookup(\"jdbc/MyDB\");",
"\t</PRE>",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedXADataSource40.java",
"hunks": [
{
"added": [
" <P>",
" This is a vacuous, deprecated class. At one time, it had real behavior and helped us support",
" separate datasources for Java 5 and Java 6.",
" Now that we no longer support Java 5, all functionality has migrated into the superclass, EmbeddedXADataSource.",
" </P>"
],
"header": "@@ -21,46 +21,12 @@",
"removed": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.impl.jdbc.Util;",
"",
"",
" This datasource is suitable for an application using embedded Derby,",
" running on the following platforms:",
" <p>",
" <ul>",
" <li>Java SE 7 (JDBC 4.1) and",
" <li>full Java SE 8 (JDBC 4.2).",
" </ul>",
" <p>",
" Use BasicEmbeddedXADataSource40 if your application runs on Java 8",
" Compact Profile 2.",
" <p>",
" Use EmbeddedXADataSource if your application runs on the following",
" platforms:",
" <p>",
" <ul>",
" <li> JDBC 3.0 - J2SE 5.0 </li>",
" <li> JDBC 4.0 - Java SE 6 </li>",
" </ul>",
" <p>",
" EmbeddedXADataSource40 is an XADataSource implementation.",
"",
" <p>An XADataSource is a factory for XAConnection objects. It",
" represents a RM in a DTP environment. An object that implements",
" the XADataSource interface is typically registered with a JNDI",
" service provider.",
"",
" <p> EmbeddedXADataSource40 object only works on a local database.",
" There is no client/server support. An EmbeddedXADataSource40",
" object must live in the same jvm as the database.",
"",
"\t<P>EmbeddedXADataSource40 is serializable and referenceable.",
"",
"\t<P>See EmbeddedDataSource40 for DataSource properties.",
""
]
},
{
"added": [
" public EmbeddedXADataSource40() { super(); }"
],
"header": "@@ -68,20 +34,6 @@ public class EmbeddedXADataSource40 extends EmbeddedXADataSource",
"removed": [
" public EmbeddedXADataSource40() {",
" super();",
" }",
" ////////////////////////////////////////////////////////////////////",
" //",
" // INTRODUCED BY JDBC 4.1 IN JAVA 7",
" //",
" ////////////////////////////////////////////////////////////////////",
"",
" public Logger getParentLogger()",
" throws SQLFeatureNotSupportedException",
" {",
" throw (SQLFeatureNotSupportedException) Util.notImplemented( \"getParentLogger()\" );",
" }",
"\t"
]
}
]
}
] |
derby-DERBY-6213-7e7a5890
|
DERBY-6213: Generify impl/store packages.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482984 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/store/access/conglomerate/Sort.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.access.conglomerate.ScanManager;"
],
"header": "@@ -28,6 +28,7 @@ import org.apache.derby.iapi.store.access.conglomerate.TransactionManager;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java",
"hunks": [
{
"added": [
" @SuppressWarnings(\"unchecked\")",
"\t\tDictionary<String,Object> defaults = (Dictionary<String,Object>)",
" readProperty(tc,AccessFactoryGlobals.DEFAULT_PROPERTY_NAME);"
],
"header": "@@ -360,12 +360,14 @@ class PropertyConglomerate",
"removed": [
"\t\tDictionary defaults = (Dictionary)readProperty(tc,AccessFactoryGlobals.DEFAULT_PROPERTY_NAME);"
]
},
{
"added": [
"\tprivate Dictionary<String,Object> copyValues(Dictionary<String,Object> to, Dictionary<String,Object> from, boolean stringsOnly)"
],
"header": "@@ -655,7 +657,7 @@ class PropertyConglomerate",
"removed": [
"\tprivate Dictionary copyValues(Dictionary to, Dictionary from, boolean stringsOnly)"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -677,6 +679,7 @@ class PropertyConglomerate",
"removed": []
},
{
"added": [
"\tprivate Dictionary<String,Object> readDbProperties(TransactionController tc)",
"\t\tDictionary<String,Object> set = new Hashtable<String,Object>();"
],
"header": "@@ -703,10 +706,10 @@ class PropertyConglomerate",
"removed": [
"\tprivate Dictionary readDbProperties(TransactionController tc)",
"\t\tDictionary set = new Hashtable();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/RAMAccessManager.java",
"hunks": [
{
"added": [
" private Hashtable<String,MethodFactory> implhash;",
" private Hashtable<UUID,MethodFactory> formathash;"
],
"header": "@@ -90,12 +90,12 @@ public abstract class RAMAccessManager",
"removed": [
" private Hashtable implhash;",
" private Hashtable formathash;"
]
},
{
"added": [
" implhash = new Hashtable<String,MethodFactory>();",
" formathash = new Hashtable<UUID,MethodFactory>();"
],
"header": "@@ -159,8 +159,8 @@ public abstract class RAMAccessManager",
"removed": [
" implhash = new Hashtable();",
" formathash = new Hashtable();"
]
},
{
"added": [
" factory = formathash.get(format);",
" Enumeration<MethodFactory> e = formathash.elements();",
" factory = e.nextElement();"
],
"header": "@@ -585,16 +585,16 @@ public abstract class RAMAccessManager",
"removed": [
" factory = (MethodFactory) formathash.get(format);",
" Enumeration e = formathash.elements();",
" factory = (MethodFactory) e.nextElement();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/RAMTransaction.java",
"hunks": [
{
"added": [
"\tprivate ArrayList<ScanManager> scanControllers;",
"\tprivate ArrayList<ConglomerateController> conglomerateControllers;",
"\tprivate ArrayList<Sort> sorts;",
"\tprivate ArrayList<SortController> sortControllers;",
" private ArrayList<Integer> freeSortIds;",
"\tprotected HashMap<Long,Conglomerate> tempCongloms;"
],
"header": "@@ -111,20 +111,20 @@ public class RAMTransaction",
"removed": [
"\tprivate ArrayList scanControllers;",
"\tprivate ArrayList conglomerateControllers;",
"\tprivate ArrayList sorts;",
"\tprivate ArrayList sortControllers;",
" private ArrayList freeSortIds;",
"\tprotected HashMap tempCongloms;"
]
},
{
"added": [
"\t\tscanControllers = new ArrayList<ScanManager>();",
"\t\tconglomerateControllers = new ArrayList<ConglomerateController>();"
],
"header": "@@ -160,8 +160,8 @@ public class RAMTransaction",
"removed": [
"\t\tscanControllers = new ArrayList();",
"\t\tconglomerateControllers = new ArrayList();"
]
},
{
"added": [
" ScanManager sc = scanControllers.get(i);"
],
"header": "@@ -240,7 +240,7 @@ public class RAMTransaction",
"removed": [
" ScanManager sc = (ScanManager) scanControllers.get(i);"
]
},
{
"added": [
" ConglomerateController cc = conglomerateControllers.get(i);"
],
"header": "@@ -266,9 +266,7 @@ public class RAMTransaction",
"removed": [
" ConglomerateController cc = ",
" (ConglomerateController) ",
" conglomerateControllers.get(i);"
]
},
{
"added": [
" SortController sc = sortControllers.get(i);"
],
"header": "@@ -297,7 +295,7 @@ public class RAMTransaction",
"removed": [
" SortController sc = (SortController) sortControllers.get(i);"
]
},
{
"added": [
" Sort sort = sorts.get(i);"
],
"header": "@@ -312,7 +310,7 @@ public class RAMTransaction",
"removed": [
" Sort sort = (Sort) sorts.get(i);"
]
},
{
"added": [
"\t\t\t\ttempCongloms = new HashMap<Long,Conglomerate>();"
],
"header": "@@ -813,7 +811,7 @@ public class RAMTransaction",
"removed": [
"\t\t\t\ttempCongloms = new HashMap();"
]
},
{
"added": [
" for (Iterator<ScanManager> it = scanControllers.iterator(); it.hasNext(); )",
" ScanController sc = it.next();",
" for (Iterator<ConglomerateController> it = conglomerateControllers.iterator();",
" ConglomerateController cc = (ConglomerateController) it.next();",
" for (Iterator<SortController> it = sortControllers.iterator(); it.hasNext(); )",
" SortController sc = it.next();"
],
"header": "@@ -925,25 +923,24 @@ public class RAMTransaction",
"removed": [
" for (Iterator it = scanControllers.iterator(); it.hasNext(); )",
" ScanController sc = (ScanController) it.next();",
" for (Iterator it = conglomerateControllers.iterator();",
" ConglomerateController cc = ",
" (ConglomerateController) it.next();",
" for (Iterator it = sortControllers.iterator(); it.hasNext(); )",
" SortController sc = (SortController) it.next();"
]
},
{
"added": [
" Sort sort = sorts.get(i);"
],
"header": "@@ -952,7 +949,7 @@ public class RAMTransaction",
"removed": [
" Sort sort = (Sort) sorts.get(i);"
]
},
{
"added": [
" for (Iterator<Long> it = tempCongloms.keySet().iterator();",
"\t\t\t\t\tLong conglomId = it.next();",
"\t\t\t\t\tConglomerate c = tempCongloms.get(conglomId);"
],
"header": "@@ -965,11 +962,11 @@ public class RAMTransaction",
"removed": [
" for (Iterator it = tempCongloms.keySet().iterator();",
"\t\t\t\t\tLong conglomId = (Long) it.next();",
"\t\t\t\t\tConglomerate c = (Conglomerate) tempCongloms.get(conglomId);"
]
},
{
"added": [
"\t\t\tsorts = new ArrayList<Sort>();",
" freeSortIds = new ArrayList<Integer>();"
],
"header": "@@ -1694,8 +1691,8 @@ public class RAMTransaction",
"removed": [
"\t\t\tsorts = new ArrayList();",
" freeSortIds = new ArrayList();"
]
},
{
"added": [
" sortid = (freeSortIds.remove(freeSortIds.size() - 1))"
],
"header": "@@ -1705,7 +1702,7 @@ public class RAMTransaction",
"removed": [
" sortid = ((Integer) freeSortIds.remove(freeSortIds.size() - 1))"
]
},
{
"added": [
" Sort sort = sorts.get((int) sortid);"
],
"header": "@@ -1730,7 +1727,7 @@ public class RAMTransaction",
"removed": [
" Sort sort = (Sort) sorts.get((int) sortid);"
]
},
{
"added": [
"\t\t\t|| (sort = (sorts.get((int) id))) == null)"
],
"header": "@@ -1822,7 +1819,7 @@ public class RAMTransaction",
"removed": [
"\t\t\t|| (sort = ((Sort) sorts.get((int) id))) == null)"
]
},
{
"added": [
"\t\t\tsortControllers = new ArrayList<SortController>();"
],
"header": "@@ -1833,7 +1830,7 @@ public class RAMTransaction",
"removed": [
"\t\t\tsortControllers = new ArrayList();"
]
},
{
"added": [
"\t\tScanManager sc = sort.openSortScan(this, hold);"
],
"header": "@@ -1898,7 +1895,7 @@ public class RAMTransaction",
"removed": [
"\t\tScanController sc = sort.openSortScan(this, hold);"
]
},
{
"added": [
"\t\t\t|| (sort = (sorts.get((int) id))) == null)"
],
"header": "@@ -1918,7 +1915,7 @@ public class RAMTransaction",
"removed": [
"\t\t\t|| (sort = ((Sort) sorts.get((int) id))) == null)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/sort/MergeInserter.java",
"hunks": [
{
"added": [
"\tprivate Vector<Long> mergeRuns;"
],
"header": "@@ -50,7 +50,7 @@ final class MergeInserter implements SortController",
"removed": [
"\tprivate Vector mergeRuns;"
]
},
{
"added": [
" Vector<Integer> stat_mergeRunsSize;"
],
"header": "@@ -73,7 +73,7 @@ final class MergeInserter implements SortController",
"removed": [
" Vector stat_mergeRunsSize;"
]
},
{
"added": [
"\t\t\t\tmergeRuns = new Vector<Long>();"
],
"header": "@@ -177,7 +177,7 @@ final class MergeInserter implements SortController",
"removed": [
"\t\t\t\tmergeRuns = new Vector();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/sort/MergeScan.java",
"hunks": [
{
"added": [
"\tprotected Vector<Long> mergeRuns;"
],
"header": "@@ -51,7 +51,7 @@ public class MergeScan extends SortScan",
"removed": [
"\tprotected Vector mergeRuns;"
]
},
{
"added": [
" Vector<Long> mergeRuns,"
],
"header": "@@ -70,7 +70,7 @@ public class MergeScan extends SortScan",
"removed": [
" Vector mergeRuns,"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/access/sort/MergeSort.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.access.conglomerate.ScanManager;"
],
"header": "@@ -28,6 +28,7 @@ import org.apache.derby.iapi.services.io.FormatableBitSet;",
"removed": []
},
{
"added": [
"\tprivate Vector<Long> mergeRuns = null;"
],
"header": "@@ -153,7 +154,7 @@ class MergeSort implements Sort",
"removed": [
"\tprivate Vector mergeRuns = null;"
]
},
{
"added": [
"\tpublic ScanManager openSortScan("
],
"header": "@@ -223,7 +224,7 @@ class MergeSort implements Sort",
"removed": [
"\tpublic ScanController openSortScan("
]
},
{
"added": [
"\t\tSortBuffer sortBuffer, Vector<Long> mergeRuns)"
],
"header": "@@ -571,7 +572,7 @@ class MergeSort implements Sort",
"removed": [
"\t\tSortBuffer sortBuffer, Vector mergeRuns)"
]
},
{
"added": [
"\t\tVector<Long> mergeRuns)"
],
"header": "@@ -603,7 +604,7 @@ class MergeSort implements Sort",
"removed": [
"\t\tVector mergeRuns)"
]
},
{
"added": [
"\t\t\tEnumeration<Long> e = mergeRuns.elements();"
],
"header": "@@ -620,7 +621,7 @@ class MergeSort implements Sort",
"removed": [
"\t\t\tEnumeration e = mergeRuns.elements();"
]
},
{
"added": [
"\t\t\t\t\tlong containerId = (e.nextElement()).longValue();"
],
"header": "@@ -629,7 +630,7 @@ class MergeSort implements Sort",
"removed": [
"\t\t\t\t\tlong containerId = ((Long) e.nextElement()).longValue();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java",
"hunks": [
{
"added": [
" implements DataFactory, CacheableFactory, ModuleControl, ModuleSupportable, PrivilegedExceptionAction<Object>"
],
"header": "@@ -112,7 +112,7 @@ that file was made to inherit from this one.",
"removed": [
" implements DataFactory, CacheableFactory, ModuleControl, ModuleSupportable, PrivilegedExceptionAction"
]
},
{
"added": [
"\tprivate Hashtable<LogInstant,Object[]> droppedTableStubInfo;",
"\tprivate Hashtable<String,StorageFile> postRecoveryRemovedFiles;"
],
"header": "@@ -194,9 +194,9 @@ public class BaseDataFileFactory",
"removed": [
"\tprivate Hashtable droppedTableStubInfo;",
"\tprivate Hashtable postRecoveryRemovedFiles;"
]
},
{
"added": [
"\t\tdroppedTableStubInfo = new Hashtable<LogInstant,Object[]>();"
],
"header": "@@ -435,7 +435,7 @@ public class BaseDataFileFactory",
"removed": [
"\t\tdroppedTableStubInfo = new Hashtable();"
]
},
{
"added": [
"\t\t\t\tfor (Enumeration<LogInstant> e = droppedTableStubInfo.keys(); ",
"\t\t\t\t\tLogInstant logInstant = e.nextElement();",
" droppedTableStubInfo.get(logInstant);"
],
"header": "@@ -1642,15 +1642,15 @@ public class BaseDataFileFactory",
"removed": [
"\t\t\t\tfor (Enumeration e = droppedTableStubInfo.keys(); ",
"\t\t\t\t\tLogInstant logInstant = (LogInstant) e.nextElement();",
" (Object[]) droppedTableStubInfo.get(logInstant);"
]
},
{
"added": [
" return AccessController.doPrivileged( new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -2131,9 +2131,9 @@ public class BaseDataFileFactory",
"removed": [
" return (String)AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
" \treturn AccessController.doPrivileged(new PrivilegedAction<String>(){",
" \t\tpublic String run() {"
],
"header": "@@ -2160,8 +2160,8 @@ public class BaseDataFileFactory",
"removed": [
" \treturn (String)AccessController.doPrivileged(new PrivilegedAction(){",
" \t\tpublic Object run() {"
]
},
{
"added": [
" return AccessController.doPrivileged( new PrivilegedAction<String>()",
" public String run()"
],
"header": "@@ -2187,9 +2187,9 @@ public class BaseDataFileFactory",
"removed": [
" return (String)AccessController.doPrivileged( new PrivilegedAction()",
" public Object run()"
]
},
{
"added": [
"\t\t\tpostRecoveryRemovedFiles = new Hashtable<String,StorageFile>();"
],
"header": "@@ -2260,7 +2260,7 @@ public class BaseDataFileFactory",
"removed": [
"\t\t\tpostRecoveryRemovedFiles = new Hashtable();"
]
},
{
"added": [
" String[] bfilelist = AccessController.doPrivileged(",
" new PrivilegedAction<String[]>() {",
" public String[] run() {"
],
"header": "@@ -2544,9 +2544,9 @@ public class BaseDataFileFactory",
"removed": [
" String[] bfilelist = (String[])AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" boolean bsegdirExists = (",
" new PrivilegedAction<Boolean>() {",
" public Boolean run() {",
" boolean isDirectory = (",
" new PrivilegedAction<Boolean>() {",
" public Boolean run() {"
],
"header": "@@ -2560,19 +2560,19 @@ public class BaseDataFileFactory",
"removed": [
" boolean bsegdirExists = ((Boolean)",
" new PrivilegedAction() {",
" public Object run() {",
" boolean isDirectory = ((Boolean)",
" new PrivilegedAction() {",
" public Object run() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java",
"hunks": [
{
"added": [
"public class EncryptOrDecryptData implements PrivilegedAction<Boolean> {"
],
"header": "@@ -59,7 +59,7 @@ import java.security.PrivilegedAction;",
"removed": [
"public class EncryptOrDecryptData implements PrivilegedAction {"
]
},
{
"added": [
" Boolean ret = AccessController.doPrivileged(this);",
" return ret.booleanValue();"
],
"header": "@@ -368,9 +368,9 @@ public class EncryptOrDecryptData implements PrivilegedAction {",
"removed": [
" Object ret = AccessController.doPrivileged(this);",
" return ((Boolean) ret).booleanValue();"
]
},
{
"added": [
" Boolean ret = AccessController.doPrivileged(this);",
" return ret.booleanValue();"
],
"header": "@@ -379,9 +379,9 @@ public class EncryptOrDecryptData implements PrivilegedAction {",
"removed": [
" Object ret = AccessController.doPrivileged(this);",
" return ((Boolean) ret).booleanValue();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/MemByteHolder.java",
"hunks": [
{
"added": [
"\tVector<byte[]> bufV;"
],
"header": "@@ -38,7 +38,7 @@ implements ByteHolder",
"removed": [
"\tVector bufV;"
]
},
{
"added": [
"\t\tthis.bufV = new Vector<byte[]>(128);"
],
"header": "@@ -69,7 +69,7 @@ implements ByteHolder",
"removed": [
"\t\tthis.bufV = new Vector(128);"
]
},
{
"added": [
"\t\tcurBuf = bufV.elementAt(0);"
],
"header": "@@ -170,7 +170,7 @@ implements ByteHolder",
"removed": [
"\t\tcurBuf = (byte[])bufV.elementAt(0);"
]
},
{
"added": [
"\t\tcurBuf = bufV.elementAt(0);"
],
"header": "@@ -194,7 +194,7 @@ implements ByteHolder",
"removed": [
"\t\tcurBuf = (byte[])bufV.elementAt(0);"
]
},
{
"added": [
"\t\t\tcurBuf = bufV.elementAt(curBufVEleAt);"
],
"header": "@@ -444,7 +444,7 @@ implements ByteHolder",
"removed": [
"\t\t\tcurBuf = (byte[])bufV.elementAt(curBufVEleAt);"
]
},
{
"added": [
"\t\tcurBuf = bufV.elementAt(++curBufVEleAt);"
],
"header": "@@ -489,7 +489,7 @@ implements ByteHolder",
"removed": [
"\t\tcurBuf = (byte[])bufV.elementAt(++curBufVEleAt);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java",
"hunks": [
{
"added": [
"class RAFContainer extends FileContainer implements PrivilegedExceptionAction<Object>"
],
"header": "@@ -54,7 +54,7 @@ import java.security.PrivilegedActionException;",
"removed": [
"class RAFContainer extends FileContainer implements PrivilegedExceptionAction"
]
},
{
"added": [
" Boolean success = AccessController.doPrivileged(",
" new PrivilegedAction<Boolean>() {",
" public Boolean run() {"
],
"header": "@@ -823,9 +823,9 @@ class RAFContainer extends FileContainer implements PrivilegedExceptionAction",
"removed": [
" Boolean success = (Boolean) AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" Boolean success = AccessController.doPrivileged(",
" new PrivilegedAction<Boolean>() {",
" public Boolean run() {"
],
"header": "@@ -844,9 +844,9 @@ class RAFContainer extends FileContainer implements PrivilegedExceptionAction",
"removed": [
" Boolean success = (Boolean) AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/log/LogAccessFile.java",
"hunks": [
{
"added": [
"\tprivate LinkedList<LogAccessFileBuffer> freeBuffers; //list of free buffers",
"\tprivate LinkedList<LogAccessFileBuffer> dirtyBuffers; //list of dirty buffers to flush"
],
"header": "@@ -94,8 +94,8 @@ public class LogAccessFile",
"removed": [
"\tprivate LinkedList freeBuffers; //list of free buffers",
"\tprivate LinkedList dirtyBuffers; //list of dirty buffers to flush"
]
},
{
"added": [
"\t\tfreeBuffers = new LinkedList<LogAccessFileBuffer>();",
"\t\tdirtyBuffers = new LinkedList<LogAccessFileBuffer>();"
],
"header": "@@ -147,8 +147,8 @@ public class LogAccessFile",
"removed": [
"\t\tfreeBuffers = new LinkedList();",
"\t\tdirtyBuffers = new LinkedList();"
]
},
{
"added": [
"\t\t\t\t\tbuf = dirtyBuffers.removeFirst();"
],
"header": "@@ -519,7 +519,7 @@ public class LogAccessFile",
"removed": [
"\t\t\t\t\tbuf = (LogAccessFileBuffer) dirtyBuffers.removeFirst();"
]
},
{
"added": [
"\t\t\t\t\t\tbuf = dirtyBuffers.removeFirst();"
],
"header": "@@ -536,7 +536,7 @@ public class LogAccessFile",
"removed": [
"\t\t\t\t\t\tbuf = (LogAccessFileBuffer) dirtyBuffers.removeFirst();"
]
},
{
"added": [
"\t\t\t\t\t\t\tbuf = dirtyBuffers.removeFirst();"
],
"header": "@@ -546,7 +546,7 @@ public class LogAccessFile",
"removed": [
"\t\t\t\t\t\t\tbuf = (LogAccessFileBuffer) dirtyBuffers.removeFirst();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/TransactionMapFactory.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.raw.xact.TransactionId;",
""
],
"header": "@@ -25,6 +25,8 @@ import java.util.Hashtable;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.store.raw.xact.TransactionTableEntry;"
],
"header": "@@ -35,6 +35,7 @@ import org.apache.derby.iapi.store.raw.log.LogInstant;",
"removed": []
},
{
"added": [
"\tprivate final Map<TransactionId,TransactionTableEntry> trans;"
],
"header": "@@ -98,7 +99,7 @@ public class TransactionTable implements Formatable",
"removed": [
"\tprivate final Map trans;"
]
},
{
"added": [
"\t\treturn trans.get(id);"
],
"header": "@@ -123,7 +124,7 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\treturn (TransactionTableEntry)trans.get(id);"
]
},
{
"added": [
"\t\t TransactionTableEntry ent = trans.remove(id);"
],
"header": "@@ -239,7 +240,7 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\t TransactionTableEntry ent = (TransactionTableEntry)trans.remove(id);"
]
},
{
"added": [
"\t\tfor (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext(); )",
"\t\t\tTransactionTableEntry ent = it.next();"
],
"header": "@@ -596,9 +597,9 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\tfor (Iterator it = trans.values().iterator(); it.hasNext(); )",
"\t\t\tTransactionTableEntry ent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
" for (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext(); )",
" TransactionTableEntry ent = it.next();"
],
"header": "@@ -648,9 +649,9 @@ public class TransactionTable implements Formatable",
"removed": [
" for (Iterator it = trans.values().iterator(); it.hasNext(); )",
" TransactionTableEntry ent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
"\t\tfor (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext(); )",
"\t\t\tTransactionTableEntry ent = it.next();"
],
"header": "@@ -690,9 +691,9 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\tfor (Iterator it = trans.values().iterator(); it.hasNext(); )",
"\t\t\tTransactionTableEntry ent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
"\t\t\tfor (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext() ; )",
"\t\t\t\tTransactionTableEntry ent = it.next();"
],
"header": "@@ -744,9 +745,9 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\t\tfor (Iterator it = trans.values().iterator(); it.hasNext() ; )",
"\t\t\t\tTransactionTableEntry ent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
" for (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext();)",
" it.next();"
],
"header": "@@ -783,10 +784,10 @@ public class TransactionTable implements Formatable",
"removed": [
" for (Iterator it = trans.values().iterator(); it.hasNext();)",
" (TransactionTableEntry) it.next();"
]
},
{
"added": [
"\t\t\tfor (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext(); )",
"\t\t\t\tent = it.next();"
],
"header": "@@ -841,9 +842,9 @@ public class TransactionTable implements Formatable",
"removed": [
"\t\t\tfor (Iterator it = trans.values().iterator(); it.hasNext(); )",
"\t\t\t\tent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
" for (Iterator<TransactionTableEntry> it = trans.values().iterator(); it.hasNext();)",
" ent = it.next();"
],
"header": "@@ -866,9 +867,9 @@ public class TransactionTable implements Formatable",
"removed": [
" for (Iterator it = trans.values().iterator(); it.hasNext();)",
" ent = (TransactionTableEntry) it.next();"
]
},
{
"added": [
" trans.remove(tran.getId());"
],
"header": "@@ -891,7 +892,7 @@ public class TransactionTable implements Formatable",
"removed": [
" (TransactionTableEntry) trans.remove(tran.getId());"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/xact/Xact.java",
"hunks": [
{
"added": [
"\tprivate Stack<SavePoint>\t\t\tsavePoints;\t// stack of SavePoint objects.",
"\tprotected List<Serviceable> \t\tpostCommitWorks; // a list of post commit work",
"\tprotected List<Serviceable>\t\t postTerminationWorks; // work to be done after"
],
"header": "@@ -216,10 +216,10 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\tprivate Stack\t\t\tsavePoints;\t// stack of SavePoint objects.",
"\tprotected List \t\tpostCommitWorks; // a list of post commit work",
"\tprotected List\t\t postTerminationWorks; // work to be done after"
]
},
{
"added": [
"\t\t\t\t\t\tSavePoint sp = savePoints.elementAt(i);"
],
"header": "@@ -1246,7 +1246,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\t\t\t\tSavePoint sp = (SavePoint) savePoints.elementAt(i);"
]
},
{
"added": [
"\t\t\tpostCommitWorks = new ArrayList<Serviceable>(1);"
],
"header": "@@ -1270,7 +1270,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\tpostCommitWorks = new ArrayList(1);"
]
},
{
"added": [
"\t\t\tpostTerminationWorks = new ArrayList<Serviceable>(2);"
],
"header": "@@ -1280,7 +1280,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\tpostTerminationWorks = new ArrayList(2);"
]
},
{
"added": [
"\t\t\tsavePoints = new Stack<SavePoint>();"
],
"header": "@@ -1476,7 +1476,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\tsavePoints = new Stack();"
]
},
{
"added": [
"\t\t\t\tSavePoint sp = savePoints.elementAt(i);"
],
"header": "@@ -1507,7 +1507,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\t\tSavePoint sp = (SavePoint) savePoints.elementAt(i);"
]
},
{
"added": [
"\t\t\taddPostCommitWork(postTerminationWorks.get(i));"
],
"header": "@@ -2048,7 +2048,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\taddPostCommitWork((Serviceable)postTerminationWorks.get(i));"
]
},
{
"added": [
" SavePoint savepoint = savePoints.elementAt(i);"
],
"header": "@@ -2173,7 +2173,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
" SavePoint savepoint = (SavePoint)savePoints.elementAt(i);"
]
},
{
"added": [
"\t\t\tSavePoint rollbackSavePoint = savePoints.elementAt(i);"
],
"header": "@@ -2214,7 +2214,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\t\tSavePoint rollbackSavePoint = (SavePoint) savePoints.elementAt(i);"
]
},
{
"added": [
"\t\tDictionary<ContainerKey,LockCount> containers = new java.util.Hashtable<ContainerKey,LockCount>();"
],
"header": "@@ -2437,7 +2437,7 @@ public class Xact extends RawTransaction implements Limit, LockOwner {",
"removed": [
"\t\tDictionary containers = new java.util.Hashtable();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/replication/buffer/ReplicationLogBuffer.java",
"hunks": [
{
"added": [
" private final LinkedList<LogBufferElement> dirtyBuffers;// LogBufferElements with unsent log",
" private final LinkedList<LogBufferElement> freeBuffers; // currently unused LogBufferElements"
],
"header": "@@ -64,8 +64,8 @@ public class ReplicationLogBuffer {",
"removed": [
" private final LinkedList dirtyBuffers;// LogBufferElements with unsent log",
" private final LinkedList freeBuffers; // currently unused LogBufferElements"
]
},
{
"added": [
" dirtyBuffers = new LinkedList<LogBufferElement>();",
" freeBuffers = new LinkedList<LogBufferElement>();",
" currentDirtyBuffer = freeBuffers.removeFirst();"
],
"header": "@@ -113,14 +113,14 @@ public class ReplicationLogBuffer {",
"removed": [
" dirtyBuffers = new LinkedList();",
" freeBuffers = new LinkedList();",
" currentDirtyBuffer = (LogBufferElement)freeBuffers.removeFirst();"
]
},
{
"added": [
" dirtyBuffers.removeFirst();"
],
"header": "@@ -219,7 +219,7 @@ public class ReplicationLogBuffer {",
"removed": [
" (LogBufferElement)dirtyBuffers.removeFirst();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageReceive.java",
"hunks": [
{
"added": [
" AccessController.doPrivileged(new PrivilegedExceptionAction<Socket>() {",
" public Socket run() throws IOException {"
],
"header": "@@ -158,9 +158,8 @@ public class ReplicationMessageReceive {",
"removed": [
" (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java",
"hunks": [
{
"added": [
" s = AccessController.doPrivileged(new PrivilegedExceptionAction<Socket>() {",
" public Socket run() throws IOException {"
],
"header": "@@ -120,9 +120,8 @@ public class ReplicationMessageTransmit {",
"removed": [
" s = (Socket)",
" AccessController.doPrivileged(new PrivilegedExceptionAction() {",
" public Object run() throws IOException {"
]
}
]
}
] |
derby-DERBY-6213-890e5d27
|
DERBY-6213: Deprecate support for Java 5 and CDC
Compile all test code against Java 6 libraries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1481818 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6213-89f21fb4
|
DERBY-6213: Deprecate support for Java 5 and CDC
- Make ColumnDescriptorList extend ArrayList<ColumnDescriptor> instead
of ArrayList<TupleDescriptor>
- Make ConglomerateDescriptor extend ArrayList<ConglomerateDescriptor>
instead of ArrayList<TupleDescriptor>
- Make GenericDescriptorList extend ArrayList<UniqueTupleDescriptor>
instead of ArrayList<TupleDescriptor>
- Change signatures of getDescriptorViaIndex() and
getDescriptorViaHeap() so that they can take lists of more specific
types than List<TupleDescriptor>, and so that they can return a more
specific type than TupleDescriptor
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1484821 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java",
"hunks": [
{
"added": [],
"header": "@@ -21,14 +21,8 @@",
"removed": [
"import org.apache.derby.iapi.error.StandardException;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import org.apache.derby.iapi.error.StandardException;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
""
]
},
{
"added": [
"public class ColumnDescriptorList extends ArrayList<ColumnDescriptor>"
],
"header": "@@ -36,7 +30,7 @@ import java.util.Iterator;",
"removed": [
"public class ColumnDescriptorList extends ArrayList<TupleDescriptor>"
]
},
{
"added": [
" for (ColumnDescriptor columnDescriptor : this)"
],
"header": "@@ -71,10 +65,8 @@ public class ColumnDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tfor (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )",
"\t\t\tColumnDescriptor columnDescriptor = (ColumnDescriptor) iterator.next();",
""
]
},
{
"added": [
" for (ColumnDescriptor columnDescriptor : this)"
],
"header": "@@ -98,9 +90,8 @@ public class ColumnDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tfor (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )",
"\t\t\tColumnDescriptor columnDescriptor = (ColumnDescriptor) iterator.next();"
]
},
{
"added": [
" return get(n);"
],
"header": "@@ -121,7 +112,7 @@ public class ColumnDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\treturn (ColumnDescriptor) get(n);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java",
"hunks": [
{
"added": [
"import java.util.Arrays;",
"public class ConglomerateDescriptorList extends",
" ArrayList<ConglomerateDescriptor>"
],
"header": "@@ -21,18 +21,16 @@",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;",
"import org.apache.derby.iapi.services.sanity.SanityManager;",
"",
"import org.apache.derby.iapi.services.monitor.Monitor;",
"public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>"
]
},
{
"added": [
" for (ConglomerateDescriptor conglomerateDescriptor : this)"
],
"header": "@@ -45,13 +43,10 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tConglomerateDescriptor conglomerateDescriptor;",
"\t\tint size = size();",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tconglomerateDescriptor = (ConglomerateDescriptor) get(index);"
]
},
{
"added": [
" for (ConglomerateDescriptor conglomerateDescriptor : this)",
" return Arrays.copyOf(draft, j);"
],
"header": "@@ -74,24 +69,19 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tConglomerateDescriptor conglomerateDescriptor;",
"",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tconglomerateDescriptor = (ConglomerateDescriptor) get(index);",
"\t\tConglomerateDescriptor[] returnValue = new ConglomerateDescriptor[j];",
" System.arraycopy(draft, 0, returnValue, 0, j);",
"\t\treturn returnValue;"
]
},
{
"added": [
" for (ConglomerateDescriptor conglomerateDescriptor : this)"
],
"header": "@@ -106,13 +96,10 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tConglomerateDescriptor conglomerateDescriptor;",
"\t\tint size = size();",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tconglomerateDescriptor = (ConglomerateDescriptor) get(index);"
]
},
{
"added": [
" for (ConglomerateDescriptor conglomerateDescriptor : this)"
],
"header": "@@ -136,14 +123,10 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tConglomerateDescriptor conglomerateDescriptor;",
"\t\tint size = size();",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tconglomerateDescriptor = (ConglomerateDescriptor) get(index);",
""
]
},
{
"added": [
" for (ConglomerateDescriptor conglomerateDescriptor : this)",
" return Arrays.copyOf(draft, j);"
],
"header": "@@ -165,24 +148,19 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tConglomerateDescriptor conglomerateDescriptor;",
"",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tconglomerateDescriptor = (ConglomerateDescriptor) get(index);",
"\t\tConglomerateDescriptor[] returnValue = new ConglomerateDescriptor[j];",
" System.arraycopy(draft, 0, returnValue, 0, j);",
"\t\treturn returnValue;"
]
},
{
"added": [
" Iterator<ConglomerateDescriptor> iterator = iterator();",
" while (iterator.hasNext())",
" ConglomerateDescriptor localCgDesc = iterator.next();"
],
"header": "@@ -198,9 +176,10 @@ public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>",
"removed": [
"\t\tfor (Iterator iterator = iterator(); iterator.hasNext(); )",
"\t\t\tConglomerateDescriptor localCgDesc = (ConglomerateDescriptor) iterator.next();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"hunks": [
{
"added": [
" List<DependencyDescriptor> getDependentsDescriptorList(String dependentID)"
],
"header": "@@ -1584,7 +1584,7 @@ public interface DataDictionary",
"removed": [
"\tpublic List<TupleDescriptor> getDependentsDescriptorList(String dependentID)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java",
"hunks": [
{
"added": [
"public class GenericDescriptorList extends ArrayList<UniqueTupleDescriptor>"
],
"header": "@@ -24,9 +24,8 @@ package org.apache.derby.iapi.sql.dictionary;",
"removed": [
"import java.util.Iterator;",
"public class GenericDescriptorList extends ArrayList<TupleDescriptor>"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.dictionary.StatisticsDescriptor;",
"import org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor;"
],
"header": "@@ -71,6 +71,8 @@ import org.apache.derby.iapi.sql.dictionary.ViewDescriptor;",
"removed": []
},
{
"added": [
" return getDescriptorViaIndex(",
" SchemaDescriptor.class,"
],
"header": "@@ -1794,14 +1796,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (SchemaDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" SchemaDescriptor.class,"
],
"header": "@@ -1837,14 +1839,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (SchemaDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" td = getDescriptorViaIndex(",
" TableDescriptor.class,"
],
"header": "@@ -2260,14 +2262,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\ttd = (TableDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" td = getDescriptorViaIndex(",
" TableDescriptor.class,"
],
"header": "@@ -2370,14 +2372,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\ttd = (TableDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" AliasDescriptor oldAD = getDescriptorViaIndex"
],
"header": "@@ -2670,7 +2672,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" AliasDescriptor oldAD = (AliasDescriptor) getDescriptorViaIndex"
]
},
{
"added": [
" AliasDescriptor.class,"
],
"header": "@@ -2678,6 +2680,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" AliasDescriptor oldAD = getDescriptorViaIndex"
],
"header": "@@ -2747,7 +2750,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" AliasDescriptor oldAD = (AliasDescriptor) getDescriptorViaIndex"
]
},
{
"added": [
" AliasDescriptor.class,"
],
"header": "@@ -2755,6 +2758,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" return getDescriptorViaIndex(",
" ColumnDescriptor.class,"
],
"header": "@@ -2813,14 +2817,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (ColumnDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" cdl,",
" ColumnDescriptor.class,"
],
"header": "@@ -2880,7 +2884,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(ColumnDescriptorList) cdl,"
]
},
{
"added": [
" List<ColPermsDescriptor> permissionDescriptorsList;//all ColPermsDescriptor for given tableid"
],
"header": "@@ -3058,7 +3063,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList<TupleDescriptor> permissionDescriptorsList;//all ColPermsDescriptor for given tableid"
]
},
{
"added": [
" ColPermsDescriptor.class,",
" for (ColPermsDescriptor colPermsDescriptor : permissionDescriptorsList)"
],
"header": "@@ -3072,20 +3077,19 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tColPermsDescriptor colPermsDescriptor;",
"\t\tfor (Iterator iterator = permissionDescriptorsList.iterator(); iterator.hasNext(); )",
"\t\t\tcolPermsDescriptor = (ColPermsDescriptor) iterator.next();"
]
},
{
"added": [
" vd = getDescriptorViaIndex(",
" ViewDescriptor.class,"
],
"header": "@@ -3894,14 +3898,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tvd = (ViewDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" FileInfoDescriptor.class,"
],
"header": "@@ -3956,14 +3960,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (FileInfoDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" FileInfoDescriptor r = getDescriptorViaIndex(",
" FileInfoDescriptor.class,"
],
"header": "@@ -3999,14 +4003,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tFileInfoDescriptor r = (FileInfoDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" SPSDescriptor spsd = getDescriptorViaIndex(",
" SPSDescriptor.class,"
],
"header": "@@ -4181,14 +4185,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tSPSDescriptor spsd = (SPSDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" SPSDescriptor spsd = getDescriptorViaIndex(",
" SPSDescriptor.class,"
],
"header": "@@ -4275,14 +4279,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tSPSDescriptor spsd = (SPSDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" public List<SPSDescriptor> getAllSPSDescriptors()",
" List<SPSDescriptor> list = newSList();"
],
"header": "@@ -4714,12 +4718,12 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List<TupleDescriptor> getAllSPSDescriptors()",
"\t\tList<TupleDescriptor> list = newSList();"
]
},
{
"added": [
" list,",
" SPSDescriptor.class);"
],
"header": "@@ -4741,7 +4745,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tlist);"
]
},
{
"added": [
" list,",
" UniqueTupleDescriptor.class);"
],
"header": "@@ -4796,7 +4801,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tlist);"
]
},
{
"added": [
" return getDescriptorViaIndex(",
" TriggerDescriptor.class,"
],
"header": "@@ -5414,14 +5420,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (TriggerDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" TriggerDescriptor.class,"
],
"header": "@@ -5454,14 +5460,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (TriggerDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" UniqueTupleDescriptor.class,"
],
"header": "@@ -5539,6 +5545,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" List<StatisticsDescriptor> statDescriptorList = newSList();"
],
"header": "@@ -5754,7 +5761,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList<TupleDescriptor> statDescriptorList = newSList();"
]
},
{
"added": [
" StatisticsDescriptor.class,"
],
"header": "@@ -5768,6 +5775,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" List<SubKeyConstraintDescriptor> fkList = newSList();"
],
"header": "@@ -6264,7 +6272,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList<TupleDescriptor> fkList = newSList();"
]
},
{
"added": [
" SubKeyConstraintDescriptor.class,",
" for (SubKeyConstraintDescriptor cd : fkList)"
],
"header": "@@ -6280,15 +6288,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tSubKeyConstraintDescriptor cd;",
"\t\tfor (Iterator iterator = fkList.iterator(); iterator.hasNext(); )",
"\t\t\tcd = (SubKeyConstraintDescriptor) iterator.next();"
]
},
{
"added": [
" return getDescriptorViaIndex(",
" SubKeyConstraintDescriptor.class,"
],
"header": "@@ -6696,14 +6703,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (SubKeyConstraintDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" SubCheckConstraintDescriptor.class,"
],
"header": "@@ -6872,14 +6879,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (SubCheckConstraintDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" List<ConglomerateDescriptor> cdl = newSList();"
],
"header": "@@ -7064,7 +7071,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList<TupleDescriptor> cdl = newSList();"
]
},
{
"added": [
" ConglomerateDescriptor.class,"
],
"header": "@@ -7082,6 +7089,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" cdl,",
" ConglomerateDescriptor.class",
" return cdl.toArray(new ConglomerateDescriptor[cdl.size()]);"
],
"header": "@@ -7092,13 +7100,12 @@ public final class\tDataDictionaryImpl",
"removed": [
" cdl",
"\t\tConglomerateDescriptor[] cda = new ConglomerateDescriptor[cdl.size()];",
"\t\tcdl.toArray(cda);",
"\t\treturn cda;"
]
},
{
"added": [
" getDescriptorViaHeap(",
" null, scanQualifier, ti, null, cdl, ConglomerateDescriptor.class);",
" return cdl.toArray(new ConglomerateDescriptor[cdl.size()]);"
],
"header": "@@ -7159,14 +7166,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tgetDescriptorViaHeap(null, scanQualifier, ti, null, cdl);",
"",
"\t\tint size = cdl.size();",
"\t\tConglomerateDescriptor[] cda = new ConglomerateDescriptor[size];",
"\t\tfor (int index = 0; index < size; index++)",
"\t\t\tcda[index] = (ConglomerateDescriptor) cdl.get(index);",
"\t\treturn cda;"
]
},
{
"added": [
" ConglomerateDescriptor.class,"
],
"header": "@@ -7204,6 +7207,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" return getDescriptorViaIndex(",
" ConglomerateDescriptor.class,"
],
"header": "@@ -7241,14 +7245,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (ConglomerateDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" public List<DependencyDescriptor> getDependentsDescriptorList(String dependentID)",
" List<DependencyDescriptor> ddlList = newSList();"
],
"header": "@@ -7476,10 +7480,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List<TupleDescriptor> getDependentsDescriptorList(String dependentID)",
"\t\tList<TupleDescriptor>\t\t\t\t\tddlList = newSList();"
]
},
{
"added": [
" DependencyDescriptor.class,"
],
"header": "@@ -7497,6 +7501,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" public List<DependencyDescriptor> getProvidersDescriptorList(String providerID)",
" List<DependencyDescriptor> ddlList = newSList();"
],
"header": "@@ -7513,10 +7518,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List<TupleDescriptor> getProvidersDescriptorList(String providerID)",
"\t\tList<TupleDescriptor>\t\t\t\t\tddlList = newSList();"
]
},
{
"added": [
" DependencyDescriptor.class,"
],
"header": "@@ -7534,6 +7539,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" return getDescriptorViaIndex(",
" AliasDescriptor.class,"
],
"header": "@@ -7733,14 +7739,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (AliasDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" AliasDescriptor.class,"
],
"header": "@@ -7777,14 +7783,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (AliasDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex"
],
"header": "@@ -7944,7 +7950,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (UserDescriptor) getDescriptorViaIndex"
]
},
{
"added": [
" UserDescriptor.class,"
],
"header": "@@ -7952,6 +7958,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" * @param returnType The type of descriptor to return",
" private <T extends TupleDescriptor> T getDescriptorViaIndex(",
" List<? super T> list,",
" Class<T> returnType,"
],
"header": "@@ -9366,19 +9373,21 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate final TupleDescriptor getDescriptorViaIndex(",
"\t\t\t\t\t\tList<TupleDescriptor> list,"
]
},
{
"added": [
" returnType,"
],
"header": "@@ -9392,6 +9401,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" * @param returnType The type of descriptor to return"
],
"header": "@@ -9410,6 +9420,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" private <T extends TupleDescriptor> T getDescriptorViaIndex(",
" List<? super T> list,",
" Class<T> returnType,"
],
"header": "@@ -9425,13 +9436,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate final TupleDescriptor getDescriptorViaIndex(",
"\t\t\t\t\t\tList<TupleDescriptor> list,"
]
},
{
"added": [
" returnType,",
" private <T extends TupleDescriptor> T getDescriptorViaIndexMinion(",
" List<? super T> list,",
" Class<T> returnType,"
],
"header": "@@ -9447,19 +9459,21 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate final TupleDescriptor getDescriptorViaIndexMinion(",
"\t\t\t\t\t\tList<TupleDescriptor> list,"
]
},
{
"added": [
" T td = null;"
],
"header": "@@ -9471,7 +9485,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tTupleDescriptor\t\t\ttd = null;"
]
},
{
"added": [
" td = returnType.cast(",
" rf.buildDescriptor(outRow, parentTupleDescriptor, this));"
],
"header": "@@ -9618,7 +9632,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\ttd = rf.buildDescriptor(outRow, parentTupleDescriptor, this);"
]
},
{
"added": [
" * @param returnType The type of descriptor to look for",
" protected <T extends TupleDescriptor> T getDescriptorViaHeap(",
" List<? super T> list,",
" Class<T> returnType)",
" T td = null;"
],
"header": "@@ -9710,24 +9725,26 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprotected TupleDescriptor getDescriptorViaHeap(",
"\t\t\t\t\t\tList<TupleDescriptor> list)",
"\t\tTupleDescriptor\t\t\ttd = null;"
]
},
{
"added": [
" td = returnType.cast(",
" rf.buildDescriptor(outRow, parentTupleDescriptor, this));"
],
"header": "@@ -9752,7 +9769,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\ttd = rf.buildDescriptor(outRow, parentTupleDescriptor, this);"
]
},
{
"added": [
" sequenceDescriptor[ 0 ] ="
],
"header": "@@ -10321,7 +10339,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" sequenceDescriptor[ 0 ] = (SequenceDescriptor)"
]
},
{
"added": [
" SequenceDescriptor.class,"
],
"header": "@@ -10330,6 +10348,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" private static <T> List<T> newSList() {",
" return Collections.synchronizedList(new LinkedList<T>());"
],
"header": "@@ -13438,8 +13457,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate static List<TupleDescriptor> newSList() {",
"\t\treturn java.util.Collections.synchronizedList(new java.util.LinkedList<TupleDescriptor>());"
]
},
{
"added": [
" return",
" key,",
" TablePermsDescriptor.class);",
" return",
" getUncachedPermissionsDescriptor(SYSTABLEPERMS_CATALOG_NUM,",
" SYSTABLEPERMSRowFactory.TABLEPERMSID_INDEX_NUM,",
" key, TablePermsDescriptor.class);"
],
"header": "@@ -13766,17 +13785,19 @@ public final class\tDataDictionaryImpl",
"removed": [
" return (TablePermsDescriptor)",
" key);",
" \t\treturn (TablePermsDescriptor)",
"\t\t\tgetUncachedPermissionsDescriptor(SYSTABLEPERMS_CATALOG_NUM,",
"\t\t\t\t\tSYSTABLEPERMSRowFactory.TABLEPERMSID_INDEX_NUM,key);"
]
},
{
"added": [
" return",
" key,",
" ColPermsDescriptor.class);",
" return",
" key,",
" ColPermsDescriptor.class);",
" private <T extends PermissionsDescriptor>",
" T getUncachedPermissionsDescriptor( int catalogNumber,",
" int indexNumber,",
" T key,",
" Class<T> returnType)"
],
"header": "@@ -13798,24 +13819,28 @@ public final class\tDataDictionaryImpl",
"removed": [
" return (ColPermsDescriptor)",
"\t key);",
" return (ColPermsDescriptor)",
"\t key);",
" private TupleDescriptor getUncachedPermissionsDescriptor( int catalogNumber,",
" int indexNumber,",
" PermissionsDescriptor key)"
]
},
{
"added": [
" returnType,"
],
"header": "@@ -13828,6 +13853,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" return",
" key, RoutinePermsDescriptor.class);",
" return",
" getUncachedPermissionsDescriptor(SYSROUTINEPERMS_CATALOG_NUM,",
" SYSROUTINEPERMSRowFactory.ROUTINEPERMSID_INDEX_NUM,",
" key, RoutinePermsDescriptor.class);"
],
"header": "@@ -13847,18 +13873,18 @@ public final class\tDataDictionaryImpl",
"removed": [
" return (RoutinePermsDescriptor)",
" key);",
" \t\treturn (RoutinePermsDescriptor)",
"\t\t\tgetUncachedPermissionsDescriptor(SYSROUTINEPERMS_CATALOG_NUM,",
"\t\t\t\t\tSYSROUTINEPERMSRowFactory.ROUTINEPERMSID_INDEX_NUM,key);",
""
]
},
{
"added": [
" return getDescriptorViaIndex(",
" RoleGrantDescriptor.class,"
],
"header": "@@ -13960,14 +13986,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (RoleGrantDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" RoleGrantDescriptor.class,"
],
"header": "@@ -14003,14 +14029,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (RoleGrantDescriptor)",
"\t\t\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" return getDescriptorViaIndex(",
" RoleGrantDescriptor.class,"
],
"header": "@@ -14055,14 +14081,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (RoleGrantDescriptor)",
"\t\t\tgetDescriptorViaIndex("
]
},
{
"added": [
" SequenceDescriptor sequenceDescriptor ="
],
"header": "@@ -14178,7 +14204,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" SequenceDescriptor sequenceDescriptor = (SequenceDescriptor)"
]
},
{
"added": [
" SequenceDescriptor.class,"
],
"header": "@@ -14186,6 +14212,7 @@ public final class\tDataDictionaryImpl",
"removed": []
},
{
"added": [
" SequenceDescriptor sequenceDescriptor ="
],
"header": "@@ -14218,7 +14245,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" SequenceDescriptor sequenceDescriptor = (SequenceDescriptor)"
]
},
{
"added": [
" SequenceDescriptor.class,"
],
"header": "@@ -14226,6 +14253,7 @@ public final class\tDataDictionaryImpl",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java",
"hunks": [
{
"added": [],
"header": "@@ -46,7 +46,6 @@ import org.apache.derby.iapi.sql.depend.ProviderList;",
"removed": [
"import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;"
]
},
{
"added": [
" private List<Dependency> getDependencyDescriptorList(",
" List<DependencyDescriptor> storedList,",
" if (!storedList.isEmpty())"
],
"header": "@@ -966,13 +965,14 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\tprivate List<Dependency> getDependencyDescriptorList(List<TupleDescriptor> storedList,",
"\t\tif (storedList.size() != 0)"
]
},
{
"added": [
" for (DependencyDescriptor depDesc : storedList)"
],
"header": "@@ -981,15 +981,12 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\tfor (ListIterator<TupleDescriptor> depsIterator = storedList.listIterator();",
"\t\t\t\t depsIterator.hasNext(); ) ",
"\t\t\t\tDependencyDescriptor depDesc = (DependencyDescriptor) depsIterator.next();",
""
]
}
]
}
] |
derby-DERBY-6213-923a60f9
|
DERBY-6213: Deprecate support for Java 5 and CDC
Remove constants for no longer supported Java versions in JVMInfo.
Remove checks for Java version where same action would be taken
for all supported Java versions.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1492116 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/info/JVMInfo.java",
"hunks": [
{
"added": [
" <LI> 4 - not used, was for JDK 1.4.0 or 1.4.1",
" <LI> 5 - not used, was for JDK 1.4.2",
" <LI> 6 - not used, was for JDK 1.5"
],
"header": "@@ -44,9 +44,9 @@ public abstract class JVMInfo",
"removed": [
"\t\t<LI> 4 - J2SE_14 - JDK 1.4.0 or 1.4.1",
"\t\t<LI> 5 - J2SE_142 - JDK 1.4.2",
"\t\t<LI> 6 - J2SE_15 - JDK 1.5"
]
},
{
"added": [],
"header": "@@ -54,9 +54,6 @@ public abstract class JVMInfo",
"removed": [
"\tpublic static final int J2SE_14 = 4;",
"\tpublic static final int J2SE_142 = 5;",
"\tpublic static final int J2SE_15 = 6; // aka J2SE 5.0"
]
},
{
"added": [
" // version 1.6, which is the lowest level we support.",
" javaVersion =",
" System.getProperty(\"java.specification.version\", \"1.6\");",
" javaVersion = \"1.6\";",
" if (javaVersion.equals(\"1.6\"))"
],
"header": "@@ -74,33 +71,21 @@ public abstract class JVMInfo",
"removed": [
"\t\t// version 1.4.",
"\t\t\tjavaVersion = System.getProperty(\"java.specification.version\", \"1.4\");",
"\t\t\tjavaVersion = \"1.4\";",
" if (javaVersion.equals(\"1.4\"))",
" {",
" String vmVersion = System.getProperty(\"java.version\", \"1.4.0\");",
"",
" if (JVMInfo.vmCheck(vmVersion, \"1.4.0\") || JVMInfo.vmCheck(vmVersion, \"1.4.1\"))",
" id = J2SE_14;",
" else",
" id = J2SE_142;",
" }",
" else if (javaVersion.equals(\"1.5\"))",
" {",
" id = J2SE_15;",
" }",
" else if (javaVersion.equals(\"1.6\"))"
]
},
{
"added": [
" // Assume our lowest support unless the java spec",
" id = J2SE_16;"
],
"header": "@@ -113,9 +98,9 @@ public abstract class JVMInfo",
"removed": [
" // aussme our lowest support unless the java spec",
" id = J2SE_14;"
]
},
{
"added": [],
"header": "@@ -128,15 +113,6 @@ public abstract class JVMInfo",
"removed": [
"\t/**",
"\t\tCheck the vmVersion against a speciifc value.",
"\t\tSun jvms are of the form",
"\t*/",
"\tprivate static boolean vmCheck(String vmVersion, String id)",
"\t{",
"\t\treturn vmVersion.equals(id) || vmVersion.startsWith(id + \"_\");",
"\t}",
""
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java",
"hunks": [
{
"added": [
"import javax.sql.ConnectionPoolDataSource;",
"import javax.sql.XADataSource;"
],
"header": "@@ -35,9 +35,10 @@ import java.security.AccessController;",
"removed": [
"import org.apache.derby.iapi.services.info.JVMInfo;"
]
},
{
"added": [],
"header": "@@ -105,7 +106,6 @@ public class TestUtil {",
"removed": [
"\tprivate static String JSR169_DATASOURCE_STRING = \"Simple\";"
]
},
{
"added": [
" public static DataSource getDataSource(Properties attrs)",
" String classname =",
" getDataSourcePrefix() + REGULAR_DATASOURCE_STRING + \"DataSource40\";",
" return (DataSource) getDataSourceWithReflection(classname, attrs);"
],
"header": "@@ -312,26 +312,13 @@ public class TestUtil {",
"removed": [
"\tpublic static javax.sql.DataSource getDataSource(Properties attrs)",
"\t\tString classname;",
"\t\tif(HAVE_DRIVER_CLASS)",
"\t\t{",
"\t\t\tclassname = getDataSourcePrefix() + REGULAR_DATASOURCE_STRING + \"DataSource\";",
"\t\t\tclassname = checkForJDBC40Implementation(classname);",
"\t\t\treturn (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs);",
"\t\t}",
"\t\telse",
"\t\t\treturn getSimpleDataSource(attrs);",
"\t\t",
"\tpublic static DataSource getSimpleDataSource(Properties attrs)",
"\t{",
"\t\tString classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + \"DataSource\";",
"\t\treturn (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs);",
"\t}",
"\t"
]
},
{
"added": [
" public static XADataSource getXADataSource(Properties attrs)",
" String classname =",
" getDataSourcePrefix() + XA_DATASOURCE_STRING + \"DataSource40\";",
" return (XADataSource) getDataSourceWithReflection(classname, attrs);"
],
"header": "@@ -340,12 +327,11 @@ public class TestUtil {",
"removed": [
"\tpublic static javax.sql.XADataSource getXADataSource(Properties attrs)",
"\t\t",
"\t\tString classname = getDataSourcePrefix() + XA_DATASOURCE_STRING + \"DataSource\";",
"\t\tclassname = checkForJDBC40Implementation(classname);",
"\t\treturn (javax.sql.XADataSource) getDataSourceWithReflection(classname, attrs);"
]
}
]
}
] |
derby-DERBY-6213-996ca721
|
DERBY-6213: Convert a couple misc packages to Java 6.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480365 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/classfile/Attributes.java",
"hunks": [
{
"added": [
"class Attributes extends Vector<AttributeEntry> {"
],
"header": "@@ -25,7 +25,7 @@ import java.util.Vector;",
"removed": [
"class Attributes extends Vector {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/classfile/ClassEnumeration.java",
"hunks": [
{
"added": [
"\tHashSet<String> foundClasses;"
],
"header": "@@ -39,7 +39,7 @@ class ClassEnumeration implements Enumeration {",
"removed": [
"\tHashSet foundClasses;"
]
},
{
"added": [
"\t\tfoundClasses = new HashSet<String>(30, 0.8f);"
],
"header": "@@ -49,7 +49,7 @@ class ClassEnumeration implements Enumeration {",
"removed": [
"\t\tfoundClasses = new HashSet(30, 0.8f);"
]
},
{
"added": [
"\tprivate void findClassReferences(HashSet<String> foundClasses)"
],
"header": "@@ -62,7 +62,7 @@ class ClassEnumeration implements Enumeration {",
"removed": [
"\tprivate void findClassReferences(HashSet foundClasses)"
]
},
{
"added": [
"\t HashSet<String> foundClasses)"
],
"header": "@@ -108,7 +108,7 @@ class ClassEnumeration implements Enumeration {",
"removed": [
"\t HashSet foundClasses)"
]
},
{
"added": [
"\t HashSet<String> foundClasses)"
],
"header": "@@ -119,7 +119,7 @@ class ClassEnumeration implements Enumeration {",
"removed": [
"\t HashSet foundClasses)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/classfile/ClassHolder.java",
"hunks": [
{
"added": [
"\tprotected Hashtable<Object,ConstantPoolEntry> cptHashTable;",
"\tprotected Vector<ConstantPoolEntry> cptEntries;"
],
"header": "@@ -91,8 +91,8 @@ public class ClassHolder {",
"removed": [
"\tprotected Hashtable cptHashTable;",
"\tprotected Vector cptEntries;"
]
},
{
"added": [
"\t\tcptEntries = new Vector<ConstantPoolEntry>(estimatedConstantPoolCount);",
"\t\tcptHashTable = new Hashtable<Object,ConstantPoolEntry>(estimatedConstantPoolCount, (float)0.75);"
],
"header": "@@ -108,8 +108,8 @@ public class ClassHolder {",
"removed": [
"\t\tcptEntries = new Vector(estimatedConstantPoolCount);",
"\t\tcptHashTable = new Hashtable(estimatedConstantPoolCount, (float)0.75);"
]
},
{
"added": [
"\t\tfor (Enumeration<ConstantPoolEntry> e = cptEntries.elements(); e.hasMoreElements(); ) {",
"\t\t\tConstantPoolEntry item = e.nextElement();"
],
"header": "@@ -536,8 +536,8 @@ public class ClassHolder {",
"removed": [
"\t\tfor (Enumeration e = cptEntries.elements(); e.hasMoreElements(); ) {",
"\t\t\tConstantPoolEntry item = (ConstantPoolEntry) e.nextElement();"
]
},
{
"added": [
"\t\treturn cptEntries.get(index);"
],
"header": "@@ -551,7 +551,7 @@ public class ClassHolder {",
"removed": [
"\t\treturn (ConstantPoolEntry) cptEntries.get(index);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/classfile/ClassInvestigator.java",
"hunks": [
{
"added": [
"\t\tVector<String> implemented = new Vector<String>(interfaceCount);"
],
"header": "@@ -139,7 +139,7 @@ public class ClassInvestigator extends ClassHolder {",
"removed": [
"\t\tVector implemented = new Vector(interfaceCount);"
]
},
{
"added": [
" public Enumeration<ClassMember> getFields() {",
" {",
"\t\t\treturn Collections.enumeration( new Vector<ClassMember>() );",
" }",
" public Enumeration<ClassMember> getMethods() {",
" {",
"\t\t\treturn Collections.enumeration( new Vector<ClassMember>() );",
" }"
],
"header": "@@ -147,16 +147,20 @@ public class ClassInvestigator extends ClassHolder {",
"removed": [
" public Enumeration getFields() {",
"\t\t\treturn Collections.enumeration(Collections.EMPTY_LIST);",
" public Enumeration getMethods() {",
"\t\t\treturn Collections.enumeration(Collections.EMPTY_LIST);"
]
},
{
"added": [
"\tprivate Enumeration getClasses(Enumeration<ClassMember> methods, Enumeration<ClassMember> fields)",
"\t\tHashSet<String> strings = new HashSet<String>(30, 0.8f);"
],
"header": "@@ -168,13 +172,13 @@ public class ClassInvestigator extends ClassHolder {",
"removed": [
"\tprivate Enumeration getClasses(Enumeration methods, Enumeration fields)",
"\t\tHashSet strings = new HashSet(30, 0.8f);"
]
},
{
"added": [
"\t\tfor (Enumeration<ClassMember> e = getFields(); e.hasMoreElements(); ) {",
"\t\t\tClassMember member = e.nextElement();"
],
"header": "@@ -240,8 +244,8 @@ public class ClassInvestigator extends ClassHolder {",
"removed": [
"\t\tfor (Enumeration e = getFields(); e.hasMoreElements(); ) {",
"\t\t\tClassMember member = (ClassMember) e.nextElement();"
]
},
{
"added": [
"\t\tfor (Enumeration<ClassMember> e = getMethods(); e.hasMoreElements(); ) {",
"\t\t\tClassMember member = e.nextElement();"
],
"header": "@@ -266,8 +270,8 @@ public class ClassInvestigator extends ClassHolder {",
"removed": [
"\t\tfor (Enumeration e = getMethods(); e.hasMoreElements(); ) {",
"\t\t\tClassMember member = (ClassMember) e.nextElement();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/classfile/MemberTable.java",
"hunks": [
{
"added": [
"\tprotected Vector<ClassMember> entries;",
"\tprivate Hashtable<MemberTableHash,MemberTableHash> hashtable;",
"\t\tentries = new Vector<ClassMember>(count);",
"\t\thashtable = new Hashtable<MemberTableHash,MemberTableHash>((count > 50) ? count : 50);"
],
"header": "@@ -29,13 +29,13 @@ import java.util.Vector;",
"removed": [
"\tprotected Vector entries;",
"\tprivate Hashtable hashtable;",
"\t\tentries = new Vector(count);",
"\t\thashtable = new Hashtable((count > 50) ? count : 50);"
]
},
{
"added": [
"\t\tMemberTableHash mth = hashtable.get(mutableMTH);",
"\t\treturn entries.get(mth.index);",
"\t\tVector<ClassMember> lentries = entries;",
"\t\t\tlentries.get(i).put(out);"
],
"header": "@@ -59,21 +59,21 @@ class MemberTable {",
"removed": [
"\t\tMemberTableHash mth = (MemberTableHash) hashtable.get(mutableMTH);",
"\t\treturn (ClassMember) entries.get(mth.index);",
"\t\tVector lentries = entries;",
"\t\t\t((ClassMember) lentries.get(i)).put(out);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/info/JVMInfo.java",
"hunks": [
{
"added": [
" return AccessController",
" .doPrivileged(new java.security.PrivilegedAction<String>() {",
" public String run() {"
],
"header": "@@ -194,10 +194,10 @@ public abstract class JVMInfo",
"removed": [
" return (String) AccessController",
" .doPrivileged(new java.security.PrivilegedAction() {",
" public Object run() {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/services/property/PropertyValidation.java",
"hunks": [
{
"added": [
"\tprivate Vector<PropertySetCallback> notifyOnSet;"
],
"header": "@@ -39,7 +39,7 @@ import java.util.Vector;",
"removed": [
"\tprivate Vector notifyOnSet;"
]
},
{
"added": [
"\t\t\t\t\tPropertySetCallback psc = notifyOnSet.get(i);"
],
"header": "@@ -57,7 +57,7 @@ public class PropertyValidation implements PropertyFactory",
"removed": [
"\t\t\t\t\tPropertySetCallback psc = (PropertySetCallback) notifyOnSet.get(i);"
]
},
{
"added": [
"\t\t\t\tPropertySetCallback psc = notifyOnSet.get(i);"
],
"header": "@@ -101,7 +101,7 @@ public class PropertyValidation implements PropertyFactory",
"removed": [
"\t\t\t\tPropertySetCallback psc = (PropertySetCallback) notifyOnSet.get(i);"
]
},
{
"added": [
"\t\t\t\tPropertySetCallback psc = notifyOnSet.get(i);"
],
"header": "@@ -126,7 +126,7 @@ public class PropertyValidation implements PropertyFactory",
"removed": [
"\t\t\t\tPropertySetCallback psc = (PropertySetCallback) notifyOnSet.get(i);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/vti/VTITemplate.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;"
],
"header": "@@ -36,6 +36,7 @@ import java.sql.ResultSetMetaData;",
"removed": []
},
{
"added": [
" return new SQLFeatureNotSupportedException( \"Unimplemented method: \" + methodName );"
],
"header": "@@ -285,7 +286,7 @@ public abstract class VTITemplate implements ResultSet",
"removed": [
" return new SQLException( \"Unimplemented method: \" + methodName );"
]
}
]
}
] |
derby-DERBY-6213-9a0cdf1f
|
DERBY-6213: Deprecate support for Java 5 and CDC
Build network client against Java 6 libraries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482405 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/ClientPooledConnection.java",
"hunks": [
{
"added": [
"import java.util.concurrent.CopyOnWriteArrayList;",
"import javax.sql.StatementEvent;",
"import javax.sql.StatementEventListener;"
],
"header": "@@ -25,16 +25,18 @@ import java.sql.PreparedStatement;",
"removed": [
"import org.apache.derby.client.net.NetConnection;"
]
},
{
"added": [
" /**",
" * List of statement event listeners. The list is copied on each write,",
" * ensuring that it can be safely iterated over even if other threads or",
" * the listeners fired in the same thread add or remove listeners.",
" */",
" private final CopyOnWriteArrayList<StatementEventListener>",
" statementEventListeners =",
" new CopyOnWriteArrayList<StatementEventListener>();",
""
],
"header": "@@ -84,6 +86,15 @@ public class ClientPooledConnection implements PooledConnection {",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientCallableStatement.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLXML;"
],
"header": "@@ -33,9 +33,12 @@ import java.sql.Blob;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientConnection.java",
"hunks": [
{
"added": [
"import java.sql.SQLPermission;"
],
"header": "@@ -29,6 +29,7 @@ import java.sql.DatabaseMetaData;",
"removed": []
},
{
"added": [
"import java.util.concurrent.Executor;"
],
"header": "@@ -40,6 +41,7 @@ import java.util.Map;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java",
"hunks": [
{
"added": [
"import java.sql.RowIdLifetime;"
],
"header": "@@ -24,6 +24,7 @@ package org.apache.derby.client.am;",
"removed": []
},
{
"added": [
" return 4;",
" return 1;"
],
"header": "@@ -2295,12 +2296,12 @@ public abstract class ClientDatabaseMetaData implements DatabaseMetaData {",
"removed": [
" return 3;",
" return 0;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientPreparedStatement.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLXML;"
],
"header": "@@ -31,12 +31,15 @@ import java.sql.BatchUpdateException;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/ClientResultSet.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLFeatureNotSupportedException;",
"import java.sql.SQLXML;"
],
"header": "@@ -32,11 +32,15 @@ import java.sql.Array;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/LogicalCallableStatement.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLXML;"
],
"header": "@@ -29,8 +29,11 @@ import java.sql.Blob;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/LogicalConnection.java",
"hunks": [
{
"added": [
"import java.sql.Array;",
"import java.sql.Blob;",
"import java.sql.Clob;",
"import java.sql.NClob;",
"import java.sql.SQLClientInfoException;",
"import java.sql.SQLXML;",
"import java.sql.Struct;",
"import java.util.Properties;",
"import java.util.concurrent.Executor;"
],
"header": "@@ -21,15 +21,24 @@",
"removed": []
},
{
"added": [
" ////////////////////////////////////////////////////////////////////",
" //",
" // INTRODUCED BY JDBC 4.0 IN JAVA 6",
" //",
" ////////////////////////////////////////////////////////////////////",
" public Array createArrayOf(String typeName, Object[] elements)",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createArrayOf( typeName, elements );",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" public Blob createBlob()",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createBlob();",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" public Clob createClob()",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createClob();",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" public NClob createNClob()",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createNClob();",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" public SQLXML createSQLXML()",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createSQLXML();",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" public Struct createStruct(String typeName, Object[] attributes)",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.createStruct( typeName, attributes );",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" /**",
" * <code>getClientInfo</code> forwards to",
" * <code>physicalConnection_</code>.",
" * <code>getClientInfo</code> always returns an empty",
" * <code>Properties</code> object since Derby doesn't support",
" * ClientInfoProperties.",
" *",
" * @return an empty <code>Properties</code> object",
" * @exception SQLException if an error occurs",
" */",
" public Properties getClientInfo()",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.getClientInfo();",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" /**",
" * <code>getClientInfo</code> forwards to",
" * <code>physicalConnection_</code>. Always returns a <code>null",
" * String</code> since Derby does not support",
" * ClientInfoProperties.",
" *",
" * @param name a property key to get <code>String</code>",
" * @return a property value <code>String</code>",
" * @exception SQLException if an error occurs",
" */",
" public String getClientInfo(String name)",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return physicalConnection_.getClientInfo(name);",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" /**",
" * Checks if the connection has not been closed and is still valid.",
" * The validity is checked by running a simple query against the",
" * database.",
" *",
" * @param timeout The time in seconds to wait for the database",
" * operation used to validate the connection to complete. If the",
" * timeout period expires before the operation completes, this",
" * method returns false. A value of 0 indicates a timeout is not",
" * applied to the database operation.",
" * @return true if the connection is valid, false otherwise",
" * @throws SQLException if the call on the physical connection throws an",
" * exception.",
" */",
" synchronized public boolean isValid(int timeout) throws SQLException {",
" try",
" {",
" // Check if we have a underlying physical connection",
" if (physicalConnection_ == null) {",
" return false;",
" }",
" return physicalConnection_.isValid(timeout);",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
"",
" public boolean isWrapperFor(Class<?> interfaces)",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" return interfaces.isInstance(this);",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
"",
" /**",
" * <code>setClientInfo</code> forwards to",
" * <code>physicalConnection_</code>.",
" *",
" * @param properties a <code>Properties</code> object with the",
" * properties to set",
" * @exception SQLClientInfoException if an error occurs",
" */",
" public void setClientInfo(Properties properties)",
" throws SQLClientInfoException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" physicalConnection_.setClientInfo(properties);",
" } catch (SQLClientInfoException cie) {",
" notifyException(cie);",
" throw cie;",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw new SQLClientInfoException",
" (sqle.getMessage(), sqle.getSQLState(),",
" sqle.getErrorCode(),",
" (new FailedProperties40(properties)).getProperties());",
" }",
" }",
"",
" /**",
" * <code>setClientInfo</code> forwards to",
" * <code>physicalConnection_</code>.",
" *",
" * @param name a property key <code>String</code>",
" * @param value a property value <code>String</code>",
" * @exception SQLException if an error occurs",
" */",
" public void setClientInfo(String name, String value)",
" throws SQLClientInfoException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" physicalConnection_.setClientInfo(name, value);",
" } catch (SQLClientInfoException cie) {",
" notifyException(cie);",
" throw cie;",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw new SQLClientInfoException",
" (sqle.getMessage(), sqle.getSQLState(),",
" sqle.getErrorCode(),",
" new FailedProperties40",
" (FailedProperties40.makeProperties",
" (name,value)).getProperties());",
" }",
" }",
"",
" public <T>T unwrap(Class<T> interfaces)",
" throws SQLException {",
" try",
" {",
" checkForNullPhysicalConnection();",
" // Derby does not implement non-standard methods on JDBC objects",
" try {",
" return interfaces.cast(this);",
" } catch (ClassCastException cce) {",
" throw new SqlException(null,",
" new ClientMessageId(SQLState.UNABLE_TO_UNWRAP),",
" interfaces).getSQLException();",
" }",
" } catch (SQLException sqle) {",
" notifyException(sqle);",
" throw sqle;",
" }",
" }",
""
],
"header": "@@ -638,6 +647,241 @@ public class LogicalConnection implements Connection {",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java",
"hunks": [
{
"added": [
"import java.sql.RowIdLifetime;",
"import org.apache.derby.shared.common.reference.SQLState;"
],
"header": "@@ -23,7 +23,9 @@ package org.apache.derby.client.am;",
"removed": []
},
{
"added": [
" private final LogWriter logWriter;"
],
"header": "@@ -39,7 +41,7 @@ class LogicalDatabaseMetaData implements DatabaseMetaData {",
"removed": [
" final LogWriter logWriter;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/LogicalPreparedStatement.java",
"hunks": [
{
"added": [
"import java.sql.NClob;",
"import java.sql.RowId;",
"import java.sql.SQLXML;"
],
"header": "@@ -31,13 +31,16 @@ import java.sql.Blob;",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetConnection.java",
"hunks": [
{
"added": [
"import java.sql.Array;",
"import java.sql.NClob;",
"import java.sql.PreparedStatement;",
"import java.sql.ResultSet;",
"import java.sql.SQLClientInfoException;",
"import java.sql.SQLException;",
"import java.sql.SQLXML;",
"import java.sql.Struct;"
],
"header": "@@ -25,6 +25,14 @@ import java.io.OutputStream;",
"removed": []
},
{
"added": [
"import org.apache.derby.client.am.FailedProperties40;",
"import org.apache.derby.client.am.SQLExceptionFactory;"
],
"header": "@@ -45,7 +53,9 @@ import org.apache.derby.jdbc.ClientDriver;",
"removed": []
},
{
"added": [
" /**",
" * Prepared statement that is used each time isValid() is called on this",
" * connection. The statement is created the first time isValid is called",
" * and closed when the connection is closed (by the close call).",
" */",
" private PreparedStatement isValidStmt;",
""
],
"header": "@@ -169,6 +179,13 @@ public class NetConnection extends ClientConnection {",
"removed": []
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientDriver.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -28,8 +28,10 @@ import java.sql.DriverPropertyInfo;",
"removed": []
},
{
"added": [
" registerMe(new ClientDriver());"
],
"header": "@@ -60,18 +62,7 @@ public class ClientDriver implements Driver {",
"removed": [
" 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() );",
" }"
]
},
{
"added": [
" ////////////////////////////////////////////////////////////////////",
" //",
" // INTRODUCED BY JDBC 4.1 IN JAVA 7",
" //",
" ////////////////////////////////////////////////////////////////////",
"",
" public Logger getParentLogger()",
" throws SQLFeatureNotSupportedException",
" {",
" getFactory();",
" throw (SQLFeatureNotSupportedException)",
" (",
" new SqlException( null, new ClientMessageId(SQLState.NOT_IMPLEMENTED), \"getParentLogger\" )",
" ).getSQLException();",
" }",
""
],
"header": "@@ -295,6 +286,22 @@ public class ClientDriver implements Driver {",
"removed": []
},
{
"added": [
" *ClientJDBCObjectFactoryImpl42"
],
"header": "@@ -425,7 +432,7 @@ public class ClientDriver implements Driver {",
"removed": [
" *ClientJDBCObjectFactoryImpl40"
]
},
{
"added": [],
"header": "@@ -435,8 +442,6 @@ public class ClientDriver implements Driver {",
"removed": [
" } else if (Configuration.supportsJDBC40()) {",
" factoryObject = createJDBC40FactoryImpl();"
]
}
]
}
] |
derby-DERBY-6213-9d5bd0e4
|
DERBY-6213: Generify impl/sql/compile and impl/sql/execute.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1484566 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java",
"hunks": [
{
"added": [
" HashSet<String> columnNames = new HashSet<String>();"
],
"header": "@@ -411,7 +411,7 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
" HashSet columnNames = new HashSet();"
]
},
{
"added": [
" private static final Comparator<FromBaseTable> OFFSET_COMPARATOR = new Comparator<FromBaseTable>() {",
" public int compare(FromBaseTable o1, FromBaseTable o2) {",
" return o1.getTableNameField().getBeginOffset() -",
" o2.getTableNameField().getBeginOffset();"
],
"header": "@@ -458,13 +458,13 @@ public class CreateTriggerNode extends DDLStatementNode",
"removed": [
" private static final Comparator OFFSET_COMPARATOR = new Comparator() {",
" public int compare(Object o1, Object o2) {",
" return ((FromBaseTable) o1).getTableNameField().getBeginOffset() -",
" ((FromBaseTable) o2).getTableNameField().getBeginOffset();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/GrantNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.depend.Provider;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.depend.Provider;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java",
"hunks": [
{
"added": [
" @SuppressWarnings(\"unchecked\")"
],
"header": "@@ -106,6 +106,7 @@ public final class UserDefinedAggregator implements ExecAggregator",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java",
"hunks": [
{
"added": [
" private List<XPLAINResultSetDescriptor> rsets; // for the resultset descriptors",
" private List<Object> rsetsTimings; // for the resultset timings descriptors",
" private List<XPLAINSortPropsDescriptor> sortrsets; // for the sort props descriptors",
" private List<XPLAINScanPropsDescriptor> scanrsets; // fot the scan props descriptors",
" private Stack<UUID> UUIDStack;"
],
"header": "@@ -79,17 +79,17 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" private List rsets; // for the resultset descriptors",
" private List rsetsTimings; // for the resultset timings descriptors",
" private List sortrsets; // for the sort props descriptors",
" private List scanrsets; // fot the scan props descriptors",
" private Stack UUIDStack;"
]
},
{
"added": [
" rsets = new ArrayList<XPLAINResultSetDescriptor>();",
" rsetsTimings = new ArrayList<Object>();",
" sortrsets = new ArrayList<XPLAINSortPropsDescriptor>();",
" scanrsets = new ArrayList<XPLAINScanPropsDescriptor>();",
" UUIDStack = new Stack<UUID>();"
],
"header": "@@ -98,13 +98,13 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" rsets = new ArrayList();",
" rsetsTimings = new ArrayList();",
" sortrsets = new ArrayList();",
" scanrsets = new ArrayList();",
" UUIDStack = new Stack();"
]
},
{
"added": [
" rsetsTimings.add(",
" XPLAINSortPropsDescriptor sortRSDescriptor = (XPLAINSortPropsDescriptor) statistics.getSortPropsDescriptor(sortID);",
" XPLAINScanPropsDescriptor scanRSDescriptor = (XPLAINScanPropsDescriptor)statistics.getScanPropsDescriptor(scanID);",
" rsets.add( (XPLAINResultSetDescriptor) statistics.getResultSetDescriptor(rsID,",
" UUIDStack.empty()? (UUID)null: UUIDStack.pop(),"
],
"header": "@@ -143,27 +143,27 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" rsetsTimings.add( ",
" Object sortRSDescriptor = statistics.getSortPropsDescriptor(sortID);",
" Object scanRSDescriptor = statistics.getScanPropsDescriptor(scanID);",
" rsets.add(statistics.getResultSetDescriptor(rsID,",
" UUIDStack.empty()? null: (UUID)UUIDStack.pop(),"
]
},
{
"added": [
" Iterator<XPLAINResultSetDescriptor> rsetsiter = rsets.iterator();",
" while (rsetsiter.hasNext())",
" rsetsiter.next();"
],
"header": "@@ -364,18 +364,17 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" Iterator iter;",
" iter = rsets.iterator();",
" while (iter.hasNext())",
" (XPLAINResultSetDescriptor)iter.next();"
]
},
{
"added": [
" Iterator<Object> timingsiter = rsetsTimings.iterator();",
" while (timingsiter.hasNext())",
" (XPLAINResultSetTimingsDescriptor)timingsiter.next();"
],
"header": "@@ -386,11 +385,11 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" iter = rsetsTimings.iterator();",
" while (iter.hasNext())",
" (XPLAINResultSetTimingsDescriptor)iter.next();"
]
},
{
"added": [
" Iterator<XPLAINScanPropsDescriptor> scaniter = scanrsets.iterator();",
" while (scaniter.hasNext())",
" scaniter.next();"
],
"header": "@@ -398,11 +397,11 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" iter = scanrsets.iterator();",
" while (iter.hasNext())",
" (XPLAINScanPropsDescriptor)iter.next();"
]
},
{
"added": [
" Iterator<XPLAINSortPropsDescriptor> sortiter = sortrsets.iterator();",
" while (sortiter.hasNext())",
" sortiter.next();"
],
"header": "@@ -410,11 +409,11 @@ public class XPLAINSystemTableVisitor implements XPLAINVisitor {",
"removed": [
" iter = sortrsets.iterator();",
" while (iter.hasNext())",
" (XPLAINSortPropsDescriptor)iter.next();"
]
}
]
}
] |
derby-DERBY-6213-a15a4702
|
DERBY-6213: Generify impl/services packages.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482578 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java",
"hunks": [
{
"added": [
"\tVector<String> thrownExceptions; // expected to be names of Classes under Throwable"
],
"header": "@@ -98,7 +98,7 @@ class BCMethod implements MethodBuilder {",
"removed": [
"\tVector thrownExceptions; // expected to be names of Classes under Throwable"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java",
"hunks": [
{
"added": [
"\t\t\t\tClass<?> declaring = loadClass(declaringClass);"
],
"header": "@@ -75,7 +75,7 @@ class d_BCValidate",
"removed": [
"\t\t\t\tClass declaring = loadClass(declaringClass);"
]
},
{
"added": [
"\t\t\t\t\tConstructor<?> c;"
],
"header": "@@ -105,7 +105,7 @@ class d_BCValidate",
"removed": [
"\t\t\t\t\tConstructor c;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/cache/Clock.java",
"hunks": [
{
"added": [
"\tprivate final HashMap<Object,CachedItem> cache_;",
"\tprivate final ArrayList<CachedItem>\t\tholders;"
],
"header": "@@ -105,10 +105,10 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\tprivate final HashMap cache_;",
"\tprivate final ArrayList\t\tholders;"
]
},
{
"added": [
"\t\tcache_ = new HashMap<Object,CachedItem>(initialSize, (float) 0.95);"
],
"header": "@@ -150,7 +150,7 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\t\tcache_ = new HashMap(initialSize, (float) 0.95);"
]
},
{
"added": [
"\t\tholders = new ArrayList<CachedItem>(initialSize);"
],
"header": "@@ -165,7 +165,7 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\t\tholders = new ArrayList(initialSize);"
]
},
{
"added": [
"\t\t\t\tCachedItem item = holders.get(position);"
],
"header": "@@ -643,7 +643,7 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\t\t\t\tCachedItem item = (CachedItem) holders.get(position);"
]
},
{
"added": [
"\t\t\t\tCachedItem item = holders.get(position);"
],
"header": "@@ -729,7 +729,7 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\t\t\t\tCachedItem item = (CachedItem) holders.get(position);"
]
},
{
"added": [
"\t\t\t\t\tCachedItem item = holders.get(i);"
],
"header": "@@ -884,7 +884,7 @@ final class Clock implements CacheManager, Serviceable {",
"removed": [
"\t\t\t\t\tCachedItem item = (CachedItem) holders.get(i);"
]
},
{
"added": [
"\t\t\t\t\t\titem = holders.get(clockHand);"
],
"header": "@@ -987,7 +987,7 @@ restartClock:",
"removed": [
"\t\t\t\t\t\titem = (CachedItem) holders.get(clockHand);"
]
},
{
"added": [
"\t\t\t\tCachedItem item = holders.get(position);"
],
"header": "@@ -1221,7 +1221,7 @@ restartClock:",
"removed": [
"\t\t\t\tCachedItem item = (CachedItem) holders.get(position);"
]
},
{
"added": [
"\t\t\t\t\titem = holders.get(position);"
],
"header": "@@ -1349,7 +1349,7 @@ innerscan:",
"removed": [
"\t\t\t\t\titem = (CachedItem) holders.get(position);"
]
},
{
"added": [
"\t\t\t\titem = holders.get(currentPosition);"
],
"header": "@@ -1506,7 +1506,7 @@ innerscan:",
"removed": [
"\t\t\t\titem = (CachedItem) holders.get(currentPosition);"
]
},
{
"added": [
" item = holders.get( position);"
],
"header": "@@ -1744,7 +1744,7 @@ innerscan:",
"removed": [
" item = (CachedItem) holders.get( position);"
]
},
{
"added": [
" CachedItem item = holders.get(i);"
],
"header": "@@ -1795,7 +1795,7 @@ innerscan:",
"removed": [
" CachedItem item = (CachedItem) holders.get(i);"
]
},
{
"added": [
"\t\t\t\tCachedItem last = holders.get(endPosition);"
],
"header": "@@ -1808,7 +1808,7 @@ innerscan:",
"removed": [
"\t\t\t\tCachedItem last = (CachedItem) holders.get(endPosition);"
]
},
{
"added": [
"\t\t\tCachedItem remove = holders.get(r);"
],
"header": "@@ -1837,7 +1837,7 @@ innerscan:",
"removed": [
"\t\t\tCachedItem remove = (CachedItem) holders.get(r);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java",
"hunks": [
{
"added": [
"\tprivate final Vector<ServiceRecord> subscription;"
],
"header": "@@ -80,7 +80,7 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": [
"\tprivate final Vector subscription;"
]
},
{
"added": [
"\tprivate final List<ServiceRecord> highPQ;\t\t// high priority queue",
"\tprivate final List<ServiceRecord> normPQ;\t\t// normal priority queue"
],
"header": "@@ -90,8 +90,8 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": [
"\tprivate final List highPQ;\t\t// high priority queue",
"\tprivate final List normPQ;\t\t// normal priority queue"
]
},
{
"added": [
"\t\tsubscription = new Vector<ServiceRecord>(1, 1);",
"\t\thighPQ = new java.util.LinkedList<ServiceRecord>();",
"\t\tnormPQ = new java.util.LinkedList<ServiceRecord>();"
],
"header": "@@ -130,9 +130,9 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": [
"\t\tsubscription = new Vector(1, 1);",
"\t\thighPQ = new java.util.LinkedList();",
"\t\tnormPQ = new java.util.LinkedList();"
]
},
{
"added": [
"\t\tList<ServiceRecord> queue = serviceNow ? highPQ : normPQ;"
],
"header": "@@ -206,7 +206,7 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": [
"\t\tList queue = serviceNow ? highPQ : normPQ;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/locks/Deadlock.java",
"hunks": [
{
"added": [
"\t\tStack<Object> chain = new Stack<Object>();"
],
"header": "@@ -155,7 +155,7 @@ class Deadlock {",
"removed": [
"\t\tStack chain = new Stack();"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")",
"\t\t\tList<Object> grants = (List<Object>) chain.peek();"
],
"header": "@@ -167,7 +167,8 @@ outer:\tfor (;;) {",
"removed": [
"\t\t\tList grants = (List) chain.peek();"
]
},
{
"added": [
"\t\tHashtable<Object,Object> waiters = new Hashtable<Object,Object>();"
],
"header": "@@ -366,7 +367,7 @@ inner:\t\tfor (;;) {",
"removed": [
"\t\tHashtable waiters = new Hashtable();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockControl.java",
"hunks": [
{
"added": [
"\tprivate List<Lock>\t\t\t\tgranted;",
"\tprivate List<Lock>\t\t\t\twaiting;"
],
"header": "@@ -56,8 +56,8 @@ final class LockControl implements Control {",
"removed": [
"\tprivate List\t\t\t\tgranted;",
"\tprivate List\t\t\t\twaiting;"
]
},
{
"added": [
"\t\t\tthis.granted = new java.util.LinkedList<Lock>(copyFrom.granted);",
"\t\t\tthis.waiting = new java.util.LinkedList<Lock>(copyFrom.waiting);"
],
"header": "@@ -78,10 +78,10 @@ final class LockControl implements Control {",
"removed": [
"\t\t\tthis.granted = new java.util.LinkedList(copyFrom.granted);",
"\t\t\tthis.waiting = new java.util.LinkedList(copyFrom.waiting);"
]
},
{
"added": [
"\t\tList<Lock> lgranted = granted;"
],
"header": "@@ -108,7 +108,7 @@ final class LockControl implements Control {",
"removed": [
"\t\tList lgranted = granted;"
]
},
{
"added": [
"\t\t\t\tlgranted = granted = new java.util.LinkedList<Lock>();"
],
"header": "@@ -116,7 +116,7 @@ final class LockControl implements Control {",
"removed": [
"\t\t\t\tlgranted = granted = new java.util.LinkedList();"
]
},
{
"added": [
"\t\tList<Lock> lgranted = granted;"
],
"header": "@@ -136,7 +136,7 @@ final class LockControl implements Control {",
"removed": [
"\t\tList lgranted = granted;"
]
},
{
"added": [
"\t\t\t\tlockInSet = lgranted.get(index);"
],
"header": "@@ -155,7 +155,7 @@ final class LockControl implements Control {",
"removed": [
"\t\t\t\tlockInSet = (Lock) lgranted.get(index);"
]
},
{
"added": [
"\t\tList<Lock> lgranted = granted;"
],
"header": "@@ -201,7 +201,7 @@ final class LockControl implements Control {",
"removed": [
"\t\tList lgranted = granted;"
]
},
{
"added": [
"\t\t\t\tLock gl = firstGrant == null ? lgranted.get(index) : firstGrant;"
],
"header": "@@ -212,7 +212,7 @@ final class LockControl implements Control {",
"removed": [
"\t\t\t\tLock gl = firstGrant == null ? (Lock) lgranted.get(index) : firstGrant;"
]
},
{
"added": [
"\t\t\t\tLock gl = firstGrant == null ? granted.get(index) : firstGrant;"
],
"header": "@@ -301,7 +301,7 @@ final class LockControl implements Control {",
"removed": [
"\t\t\t\tLock gl = firstGrant == null ? (Lock) granted.get(index) : firstGrant;"
]
},
{
"added": [
"\t\t\twaiting = new java.util.LinkedList<Lock>();"
],
"header": "@@ -374,7 +374,7 @@ final class LockControl implements Control {",
"removed": [
"\t\t\twaiting = new java.util.LinkedList();"
]
},
{
"added": [
"\t\tList<Lock> lgranted = granted;"
],
"header": "@@ -392,7 +392,7 @@ final class LockControl implements Control {",
"removed": [
"\t\tList lgranted = granted;"
]
},
{
"added": [
"\tpublic List<Lock> getGranted() {",
"\tpublic List<Lock> getWaiting() {"
],
"header": "@@ -493,10 +493,10 @@ final class LockControl implements Control {",
"removed": [
"\tpublic List getGranted() {",
"\tpublic List getWaiting() {"
]
},
{
"added": [
"\tpublic void addWaiters(Map<Object,Object> waiters) {"
],
"header": "@@ -533,7 +533,7 @@ final class LockControl implements Control {",
"removed": [
"\tpublic void addWaiters(Map waiters) {"
]
},
{
"added": [
"\tList<Lock> getGrants() {",
"\t\tList<Lock> ret;",
"\t\t\tret = new java.util.LinkedList<Lock>();",
"\t\t\tret = new java.util.LinkedList<Lock>(granted);"
],
"header": "@@ -555,17 +555,17 @@ final class LockControl implements Control {",
"removed": [
"\tList getGrants() {",
"\t\tList ret;",
"\t\t\tret = new java.util.LinkedList();",
"\t\t\tret = new java.util.LinkedList(granted);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockSet.java",
"hunks": [
{
"added": [
" * <code>Control</code>s. */",
" private final HashMap<Lockable,Control> locks;"
],
"header": "@@ -75,8 +75,8 @@ final class LockSet implements LockTable {",
"removed": [
" * <code>Lock</code>s. */",
" private final HashMap locks;"
]
},
{
"added": [
"\t\tlocks = new HashMap<Lockable,Control>();"
],
"header": "@@ -103,7 +103,7 @@ final class LockSet implements LockTable {",
"removed": [
"\t\tlocks = new HashMap();"
]
},
{
"added": [
" for (Iterator<Control> it = locks.values().iterator(); it.hasNext(); )"
],
"header": "@@ -706,7 +706,7 @@ forever:\tfor (;;) {",
"removed": [
" for (Iterator it = locks.values().iterator(); it.hasNext(); )"
]
},
{
"added": [
" public void addWaiters(Map<Object,Object> waiters) {",
" for (Iterator<Control> it = locks.values().iterator(); it.hasNext(); ) {",
" Control control = it.next();"
],
"header": "@@ -725,9 +725,9 @@ forever:\tfor (;;) {",
"removed": [
" public void addWaiters(Map waiters) {",
" for (Iterator it = locks.values().iterator(); it.hasNext(); ) {",
" Control control = (Control) it.next();"
]
},
{
"added": [
"\tpublic synchronized Map<Lockable,Control> shallowClone()",
"\t\tHashMap<Lockable,Control> clone = new HashMap<Lockable,Control>();",
"\t\tfor (Iterator<Lockable> it = locks.keySet().iterator(); it.hasNext(); )",
"\t\t\tLockable lockable = it.next();"
],
"header": "@@ -736,13 +736,13 @@ forever:\tfor (;;) {",
"removed": [
"\tpublic synchronized Map shallowClone()",
"\t\tHashMap clone = new HashMap();",
"\t\tfor (Iterator it = locks.keySet().iterator(); it.hasNext(); )",
"\t\t\tLockable lockable = (Lockable) it.next();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockSpace.java",
"hunks": [
{
"added": [
"\tprivate final HashMap<Object,HashMap<Lock,Object>> groups;"
],
"header": "@@ -52,7 +52,7 @@ import org.apache.derby.iapi.services.locks.LockOwner;",
"removed": [
"\tprivate final HashMap groups;"
]
},
{
"added": [
"\t\tgroups = new HashMap<Object,HashMap<Lock,Object>>();"
],
"header": "@@ -70,7 +70,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tgroups = new HashMap();"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> dl = groups.get(group);"
],
"header": "@@ -91,7 +91,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap dl = (HashMap) groups.get(group);"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> dl = groups.remove(group);"
],
"header": "@@ -139,7 +139,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap dl = (HashMap) groups.remove(group);"
]
},
{
"added": [
" @SuppressWarnings(\"unchecked\")",
"\tprivate HashMap<Lock,Object> getGroupMap(Object group) {",
"\t\tHashMap<Lock,Object> dl = null;",
"\t\t\tdl = (HashMap<Lock,Object>) sg[i];"
],
"header": "@@ -154,11 +154,12 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\tprivate HashMap getGroupMap(Object group) {",
"\t\tHashMap dl = null;",
"\t\t\tdl = sg[i];"
]
},
{
"added": [
"\t\t\tdl = new HashMap<Lock,Object>(5, 0.8f);"
],
"header": "@@ -166,7 +167,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\t\tdl = new HashMap(5, 0.8f);"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> dl = groups.get(group);"
],
"header": "@@ -186,7 +187,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap dl = (HashMap) groups.get(group);"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> from = groups.get(oldGroup);",
"\t\tHashMap<Lock,Object> to = groups.get(newGroup);"
],
"header": "@@ -212,11 +213,11 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap from = (HashMap) groups.get(oldGroup);",
"\t\tHashMap to = (HashMap) groups.get(newGroup);"
]
},
{
"added": [
"\tprivate void mergeGroups(HashMap<Lock,Object> from, HashMap<Lock,Object> into) {",
"\t\tfor (Iterator<Lock> e = from.keySet().iterator(); e.hasNext(); ) {",
"\t\t\tLock lock = e.next();"
],
"header": "@@ -243,11 +244,11 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\tprivate void mergeGroups(HashMap from, HashMap into) {",
"\t\tfor (Iterator e = from.keySet().iterator(); e.hasNext(); ) {",
"\t\t\tObject lock = e.next();"
]
},
{
"added": [
"\t\t\t\tLock fromL = lock;"
],
"header": "@@ -256,7 +257,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\t\t\tLock fromL = (Lock) lock;"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> dl = groups.get(group);"
],
"header": "@@ -269,7 +270,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap dl = (HashMap) groups.get(group);"
]
},
{
"added": [
"\t\tHashMap<Lock,Object> dl = groups.get(group);"
],
"header": "@@ -315,7 +316,7 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tHashMap dl = (HashMap) groups.get(group);"
]
},
{
"added": [
"\t\tfor (Iterator<HashMap<Lock,Object>> it = groups.values().iterator(); it.hasNext(); ) {",
"\t\t\tHashMap<Lock,Object> group = it.next();",
"\t\t\tfor (Iterator<Lock> locks = group.keySet().iterator(); locks.hasNext(); ) {",
"\t\t\t\t\tLock lock = locks.next();"
],
"header": "@@ -355,10 +356,10 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"\t\tfor (Iterator it = groups.values().iterator(); it.hasNext(); ) {",
"\t\t\tHashMap group = (HashMap) it.next();",
"\t\t\tfor (Iterator locks = group.keySet().iterator(); locks.hasNext(); ) {",
"\t\t\t\t\tLock lock = (Lock) locks.next();"
]
},
{
"added": [
"class LockList implements Enumeration<Lockable> {",
"\tprivate Enumeration<Lock> lockGroup;",
"\tLockList(Enumeration<Lock> lockGroup) {"
],
"header": "@@ -374,11 +375,11 @@ final class LockSpace implements CompatibilitySpace {",
"removed": [
"class LockList implements Enumeration {",
"\tprivate Enumeration lockGroup;",
"\tLockList(Enumeration lockGroup) {"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java",
"hunks": [
{
"added": [
"\tprivate Hashtable<Long,TableDescriptor> tableCache;\t\t// conglomId -> table descriptor",
"\tprivate Hashtable<Long,String> indexCache;\t\t// conglomId -> indexname",
"\t\ttableCache = new Hashtable<Long,TableDescriptor>(31);",
"\t\t\tindexCache = new Hashtable<Long,String>(13);"
],
"header": "@@ -40,15 +40,15 @@ public class TableNameInfo {",
"removed": [
"\tprivate Hashtable tableCache;\t\t// conglomId -> table descriptor",
"\tprivate Hashtable indexCache;\t\t// conglomId -> indexname",
"\t\ttableCache = new Hashtable(31);",
"\t\t\tindexCache = new Hashtable(13);"
]
},
{
"added": [
"\t\tTableDescriptor td = tableCache.get(conglomId);"
],
"header": "@@ -63,7 +63,7 @@ public class TableNameInfo {",
"removed": [
"\t\tTableDescriptor td = (TableDescriptor) tableCache.get(conglomId);"
]
},
{
"added": [
"\t\tTableDescriptor td = tableCache.get(conglomId);"
],
"header": "@@ -137,7 +137,7 @@ public class TableNameInfo {",
"removed": [
"\t\tTableDescriptor td = (TableDescriptor) tableCache.get(conglomId);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java",
"hunks": [
{
"added": [
"\timplements java.security.PrivilegedAction<Object>",
"\tprivate java.util.HashMap<String,ReflectGeneratedClass> preCompiled;"
],
"header": "@@ -27,10 +27,10 @@ import org.apache.derby.iapi.util.ByteArray;",
"removed": [
"\timplements java.security.PrivilegedAction",
"\tprivate java.util.HashMap preCompiled;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java",
"hunks": [
{
"added": [
"\tprivate final Hashtable<String,GeneratedMethod> methodCache;"
],
"header": "@@ -33,7 +33,7 @@ import java.util.Hashtable;",
"removed": [
"\tprivate final Hashtable methodCache;"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/stream/SingleStream.java",
"hunks": [
{
"added": [
"implements InfoStreams, ModuleControl, java.security.PrivilegedAction<HeaderPrintWriter>"
],
"header": "@@ -70,7 +70,7 @@ import org.apache.derby.shared.common.reference.MessageId;",
"removed": [
"implements InfoStreams, ModuleControl, java.security.PrivilegedAction"
]
},
{
"added": [
"\t\t\tClass<?> theClass = Class.forName(className);"
],
"header": "@@ -216,7 +216,7 @@ implements InfoStreams, ModuleControl, java.security.PrivilegedAction",
"removed": [
"\t\t\tClass theClass = Class.forName(className);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java",
"hunks": [
{
"added": [
" savecl = AccessController.doPrivileged(",
" new PrivilegedAction<ClassLoader>() {",
" public ClassLoader run() {"
],
"header": "@@ -68,9 +68,9 @@ public class SingletonTimerFactory",
"removed": [
" savecl = (ClassLoader)AccessController.doPrivileged(",
" new PrivilegedAction() {",
" public Object run() {"
]
},
{
"added": [
" new PrivilegedAction<Object>() {"
],
"header": "@@ -84,7 +84,7 @@ public class SingletonTimerFactory",
"removed": [
" new PrivilegedAction() {"
]
},
{
"added": [
" new PrivilegedAction<Object>() {"
],
"header": "@@ -101,7 +101,7 @@ public class SingletonTimerFactory",
"removed": [
" new PrivilegedAction() {"
]
}
]
}
] |
derby-DERBY-6213-a8b9c708
|
DERBY-6213: Deprecate support for Java 5 and CDC
- Revive build target for SqlXmlUtil to ensure that it always includes
the org.w3c.dom.xpath interfaces on the compile classpath.
- Update SqlXmlUtil.java so that no warnings are printed during
compilation.
- Remove code that's only used on Java 1.4 and CDC.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1481187 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java",
"hunks": [
{
"added": [],
"header": "@@ -33,8 +33,6 @@ import java.util.List;",
"removed": [
"import java.lang.reflect.InvocationTargetException;",
"import java.lang.reflect.Method;"
]
},
{
"added": [],
"header": "@@ -127,40 +125,6 @@ public class SqlXmlUtil",
"removed": [
" /**",
" * <p>",
" * An object representing the {@code BigDecimal.toPlainString()} method",
" * if it's available on the platform. If it's not available, this field",
" * will be initialized to {@code null}, and in that case the",
" * {@code BigDecimal.toString()} method should be used instead without",
" * reflection.",
" * </p>",
" *",
" * <p>",
" * The behaviour of the {@code toString()} method changed when",
" * {@code toPlainString()} was introduced in Java SE 5. On older",
" * platforms, it behaves just like {@code toPlainString()} does on",
" * newer platforms. So when {@code toPlainString()} is not",
" * available, it is safe to fall back to {@code toString()}. It",
" * behaves differently on newer platforms, so we need to use",
" * {@code toPlainString()} when it is available in order to get",
" * consistent behaviour across all platforms.",
" * </p>",
" *",
" * @see #numberToString(double)",
" */",
" private static final Method TO_PLAIN_STRING;",
" static {",
" Method m = null;",
" try {",
" m = BigDecimal.class.getMethod(\"toPlainString\", new Class[0]);",
" } catch (NoSuchMethodException nsme) {",
" // Couldn't find the method, so we'll just fall back to toString()",
" // on this platform.",
" }",
" TO_PLAIN_STRING = m;",
" }",
""
]
},
{
"added": [
" ArrayList<Document> aList = new ArrayList<Document>();"
],
"header": "@@ -335,7 +299,7 @@ public class SqlXmlUtil",
"removed": [
" ArrayList aList = new ArrayList();"
]
},
{
"added": [
" new java.security.PrivilegedExceptionAction<Document>()",
" public Document run() throws IOException, SAXException"
],
"header": "@@ -349,9 +313,9 @@ public class SqlXmlUtil",
"removed": [
" new java.security.PrivilegedExceptionAction()",
" public Object run() throws IOException, SAXException"
]
},
{
"added": [],
"header": "@@ -423,9 +387,6 @@ public class SqlXmlUtil",
"removed": [
" int sz = items.size();",
" Object obj = null;",
""
]
},
{
"added": [
" for (Object obj : items)"
],
"header": "@@ -435,9 +396,8 @@ public class SqlXmlUtil",
"removed": [
" for (int i = 0; i < sz; i++)",
" obj = items.get(i);"
]
},
{
"added": [
" ArrayList<Node> nodes = new ArrayList<Node>();",
" nodes.add(node);",
" itemRefs = nodes;"
],
"header": "@@ -663,11 +623,12 @@ public class SqlXmlUtil",
"removed": [
" itemRefs = new ArrayList();",
" itemRefs.add(node);"
]
},
{
"added": [
" private static String numberToString(double d) {"
],
"header": "@@ -754,8 +715,7 @@ public class SqlXmlUtil",
"removed": [
" private static String numberToString(double d)",
" throws IllegalAccessException, InvocationTargetException {"
]
}
]
}
] |
derby-DERBY-6213-bbc882f8
|
DERBY-6213: Convert the org.apache.derby.vti package to Java 6.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479972 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/vti/ForeignTableVTI.java",
"hunks": [
{
"added": [
" private static HashMap<String,Connection> _connections = new HashMap<String,Connection>();"
],
"header": "@@ -134,7 +134,7 @@ public\tclass ForeignTableVTI extends VTITemplate implements RestrictedVTI",
"removed": [
" private static HashMap _connections = new HashMap();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/vti/VTITemplate.java",
"hunks": [
{
"added": [
"import java.io.InputStream;",
"import java.io.Reader;",
"import java.net.URL;",
"import java.sql.Array;",
"import java.sql.Blob;",
"import java.sql.Clob;",
"import java.sql.Date;",
"import java.sql.NClob;",
"import java.sql.Ref;",
"import java.sql.ResultSet;",
"import java.sql.ResultSetMetaData;",
"import java.sql.RowId;",
"import java.sql.SQLData;",
"import java.sql.SQLException;",
"import java.sql.SQLInput;",
"import java.sql.SQLOutput;",
"import java.sql.SQLWarning;",
"import java.sql.SQLXML;",
"import java.sql.Statement;",
"import java.sql.Struct;",
"import java.sql.Time;",
"import java.sql.Timestamp;",
"import java.util.Calendar;",
"import java.util.Map;",
"\tThis class implements most of the methods of the JDBC 4.0 interface java.sql.ResultSet,"
],
"header": "@@ -21,15 +21,38 @@",
"removed": [
"import java.sql.SQLException;",
"\tThis class implements most of the methods of the JDBC 3.0 interface java.sql.ResultSet,"
]
},
{
"added": [
"public abstract class VTITemplate implements ResultSet",
" public boolean \tisWrapperFor(Class<?> iface) throws SQLException { throw notImplemented( \"isWrapperFor\" ); }",
" public <T> T unwrap(Class<T> iface) throws SQLException { throw notImplemented( \"unwrap\" ); }",
" public ResultSetMetaData getMetaData() throws SQLException { throw notImplemented( \"getMetaData\" ); }",
" "
],
"header": "@@ -38,23 +61,19 @@ import java.math.BigDecimal;",
"removed": [
"\t<LI>getMetaData()",
"\t<BR>",
"\tClasses that implement a JDBC 2.0 conformant java.sql.ResultSet can be used",
"\tas table functions and virtual tables.",
"public abstract class VTITemplate extends VTITemplateBase",
" // Together with our superclass, the following overrides are a trick",
" // to allow subclasses to compile on both Java 5 and Java 6",
" public abstract boolean next() throws SQLException;",
" public abstract void close() throws SQLException;"
]
}
]
}
] |
derby-DERBY-6213-c655d66c
|
DERBY-6213: Deprecate support for Java 5 and CDC
Remove reflection code in SQLDecimal.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1571938 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/types/SQLDecimal.java",
"hunks": [
{
"added": [],
"header": "@@ -34,8 +34,6 @@ import org.apache.derby.iapi.services.cache.ClassSize;",
"removed": [
"import java.lang.reflect.Method;",
"import java.lang.reflect.InvocationTargetException;"
]
},
{
"added": [
" return (localValue == null) ? null : localValue.toPlainString();"
],
"header": "@@ -304,51 +302,9 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
"\t\tif (localValue == null)",
"\t\t\treturn null;",
"\t\telse if (toPlainString == null)",
"\t\t\treturn localValue.toString();",
" else",
" {",
" // use reflection so we can still compile using JDK1.4",
" // if we are prepared to require 1.5 to compile then this can be a direct call",
" try {",
" return (String) toPlainString.invoke(localValue, null);",
" } catch (IllegalAccessException e) {",
" // can't happen based on the JDK spec",
" throw new IllegalAccessError(\"toPlainString\");",
" } catch (InvocationTargetException e) {",
" Throwable t = e.getTargetException();",
" if (t instanceof RuntimeException) {",
" throw (RuntimeException) t;",
" } else if (t instanceof Error) {",
" throw (Error) t;",
" } else {",
" // can't happen",
" throw new IncompatibleClassChangeError(\"toPlainString\");",
" }",
" }",
" }",
" private static final Method toPlainString;",
" private static final Method bdPrecision;",
" static {",
" Method m;",
" try {",
" m = BigDecimal.class.getMethod(\"toPlainString\", null);",
" } catch (NoSuchMethodException e) {",
" m = null;",
" }",
" toPlainString = m;",
" try {",
" m = BigDecimal.class.getMethod(\"precision\", null);",
" } catch (NoSuchMethodException e) {",
" m = null;",
" }",
" bdPrecision = m;",
" }",
""
]
},
{
"added": [
"",
" // precision is the number of digits in the unscaled value,",
" // subtracting the scale (positive or negative) will give the",
" // number of whole digits.",
" return decimalValue.precision() - decimalValue.scale();"
],
"header": "@@ -1121,37 +1077,10 @@ public final class SQLDecimal extends NumberDataType implements VariableSizeData",
"removed": [
" ",
" if (bdPrecision != null)",
"\t\t{",
"\t // use reflection so we can still compile using JDK1.4",
"\t\t\t// if we are prepared to require 1.5 to compile then this can be a",
"\t\t\t// direct call",
"\t\t\ttry {",
"\t\t\t\t// precision is the number of digits in the unscaled value,",
"\t\t\t\t// subtracting the scale (positive or negative) will give the",
"\t\t\t\t// number of whole digits.",
"\t\t\t\tint precision = ((Integer) bdPrecision.invoke(decimalValue,",
"\t\t\t\t\t\tnull)).intValue();",
"\t\t\t\treturn precision - decimalValue.scale();",
"\t\t\t} catch (IllegalAccessException e) {",
"\t\t\t\t// can't happen based on the JDK spec",
"\t\t\t\tthrow new IllegalAccessError(\"precision\");",
"\t\t\t} catch (InvocationTargetException e) {",
"\t\t\t\tThrowable t = e.getTargetException();",
"\t\t\t\tif (t instanceof RuntimeException) {",
"\t\t\t\t\tthrow (RuntimeException) t;",
"\t\t\t\t} else if (t instanceof Error) {",
"\t\t\t\t\tthrow (Error) t;",
"\t\t\t\t} else {",
"\t\t\t\t\t// can't happen",
"\t\t\t\t\tthrow new IncompatibleClassChangeError(\"precision\");",
"\t\t\t\t}",
"\t\t\t}",
" ",
"\t\t}",
" ",
"\t\tString s = decimalValue.toString();",
" return (decimalValue.scale() == 0) ? s.length() : s.indexOf('.');"
]
}
]
}
] |
derby-DERBY-6213-c712a5b8
|
DERBY-6213: Deprecate support for Java 5 and CDC
Add @deprecated tag to the DataSource classes that have been removed
from the public API.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1489349 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/tools/SignatureChecker.java",
"hunks": [
{
"added": [],
"header": "@@ -29,7 +29,6 @@ import java.sql.ResultSet;",
"removed": [
"import org.apache.derby.jdbc.EmbeddedDataSource40;"
]
},
{
"added": [
" Connection conn = getJ2SEConnection();"
],
"header": "@@ -138,10 +137,7 @@ public class SignatureChecker",
"removed": [
" Connection conn;",
" ",
" if ( _parsedArgs.isJ2ME() ) { conn = getJ2MEConnection(); }",
" else { conn = getJ2SEConnection(); }"
]
},
{
"added": [],
"header": "@@ -427,16 +423,6 @@ public class SignatureChecker",
"removed": [
" private Connection getJ2MEConnection()",
" throws SQLException",
" {",
" EmbeddedDataSource40 dataSource = new EmbeddedDataSource40();",
"",
" dataSource.setDatabaseName( _parsedArgs.getJ2meDatabaseName() );",
"",
" return dataSource.getConnection();",
" }",
""
]
},
{
"added": [
" if ( args.length != 1 ) { return; }",
" _j2seConnectionUrl = args[ 0 ];",
" _isValid = true;"
],
"header": "@@ -582,53 +568,25 @@ public class SignatureChecker",
"removed": [
" private boolean _isJ2ME;",
" private String _j2meDatabaseName;",
" ",
" _isJ2ME = !classExists( \"java.sql.DriverManager\" );",
"",
" public boolean isJ2ME() { return _isJ2ME; }",
" public String getJ2meDatabaseName() { return _j2meDatabaseName; }",
" if ( args.length == 0 ) { return; }",
" ",
" if ( isJ2ME() )",
" {",
" if ( args.length != 1 ) { return; }",
"",
" _j2meDatabaseName = args[ 0 ];",
" _isValid = true;",
" }",
" else",
" {",
" if ( args.length != 1 ) { return; }",
"",
" _j2seConnectionUrl = args[ 0 ];",
" _isValid = true;",
" }",
" }",
"",
" private boolean classExists( String className )",
" {",
" try {",
" Class.forName( className );",
" return true;",
" } catch (Throwable t) { return false; }"
]
}
]
}
] |
derby-DERBY-6213-dfc9ab0c
|
DERBY-6213: Convert remaining non-JDBC packages to Java 6 build.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1481379 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/catalog/GetProcedureColumns.java",
"hunks": [
{
"added": [
"import org.apache.derby.impl.jdbc.EmbedResultSetMetaData40;"
],
"header": "@@ -32,6 +32,7 @@ import org.apache.derby.iapi.types.DataTypeDescriptor;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/util/DoubleProperties.java",
"hunks": [
{
"added": [
"\tpublic Enumeration<Object> propertyNames() {",
" HashSet<Object> names = new HashSet<Object>();"
],
"header": "@@ -61,8 +61,8 @@ public final class DoubleProperties extends Properties {",
"removed": [
"\tpublic Enumeration propertyNames() {",
" HashSet names = new HashSet();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/load/ImportBlob.java",
"hunks": [
{
"added": [
"\tpublic byte[] getBytes(long pos, int length) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -120,10 +120,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
"\tpublic byte[] getBytes(long pos, int length) throws SQLException {",
"\t\tthrow LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
"\t}"
]
},
{
"added": [
"\tpublic long position(byte pattern[], long start) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -131,11 +128,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
"\tpublic long position(byte pattern[], long start) throws SQLException",
"\t{",
"\t\tthrow LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
"\t}"
]
},
{
"added": [
"\tpublic long position(Blob pattern, long start) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -143,10 +136,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
"\tpublic long position(Blob pattern, long start) throws SQLException {",
"\t\tthrow LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
"\t}"
]
},
{
"added": [
" public int setBytes(long pos, byte[] bytes) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -155,9 +145,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
" public int setBytes(long pos, byte[] bytes) throws SQLException {",
"\t\tthrow LoadError.unexpectedError(new Exception(\"Method not implemented\"));",
"\t}"
]
},
{
"added": [
" public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -165,11 +153,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
" public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException",
"\t{",
"\t\tthrow LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
"\t}"
]
},
{
"added": [
" public java.io.OutputStream setBinaryStream(long pos) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -177,11 +161,7 @@ class ImportBlob implements java.sql.Blob {",
"removed": [
" public java.io.OutputStream setBinaryStream(long pos) throws SQLException ",
"\t{",
"\t\tthrow LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
"\t}"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/load/ImportClob.java",
"hunks": [
{
"added": [
" public String getSubString(long pos, int length) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -124,10 +124,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public String getSubString(long pos, int length) throws SQLException {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\"));",
" }"
]
},
{
"added": [
" public java.io.InputStream getAsciiStream() throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -136,10 +133,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public java.io.InputStream getAsciiStream() throws SQLException {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" public long position(String searchstr, long start) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -148,10 +142,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public long position(String searchstr, long start) throws SQLException {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" public long position(Clob searchstr, long start) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -159,10 +150,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public long position(Clob searchstr, long start) throws SQLException {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" public int setString(long pos, String str) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -170,10 +158,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public int setString(long pos, String str) throws SQLException {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -182,11 +167,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" throws SQLException",
" {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" public java.io.OutputStream setAsciiStream(long pos) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -194,11 +175,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public java.io.OutputStream setAsciiStream(long pos) throws SQLException",
" {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
},
{
"added": [
" public java.io.Writer setCharacterStream(long pos) throws SQLException { throw methodNotImplemented(); }"
],
"header": "@@ -206,11 +183,7 @@ class ImportClob implements java.sql.Clob {",
"removed": [
" public java.io.Writer setCharacterStream(long pos) throws SQLException",
" {",
" throw LoadError.unexpectedError(",
" new Exception(\"Method not implemented\")); ",
" }"
]
}
]
},
{
"file": "java/engine/org/apache/derby/vti/VTIMetaDataTemplate.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
},
{
"added": [
" public boolean \tisWrapperFor(Class<?> iface) throws SQLException { throw notImplemented( \"isWrapperFor\" ); }",
" public <T> T unwrap(Class<T> iface) throws SQLException { throw notImplemented( \"unwrap\" ); }",
""
],
"header": "@@ -52,6 +53,9 @@ import java.sql.ResultSetMetaData;",
"removed": []
}
]
}
] |
derby-DERBY-6213-eec86ed8
|
DERBY-6213: Convert JDBC build scripts to Java 6 and misc merges.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1482044 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java",
"hunks": [
{
"added": [
"public abstract class BrokeredConnection implements EngineConnection"
],
"header": "@@ -37,7 +37,7 @@ import org.apache.derby.shared.common.reference.SQLState;",
"removed": [
"public class BrokeredConnection implements EngineConnection"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [
"import java.sql.Array;",
"import java.sql.NClob;",
"import java.sql.SQLXML;",
"import java.sql.Struct;",
"import java.sql.SQLClientInfoException;",
"import java.sql.SQLPermission;"
],
"header": "@@ -62,13 +62,19 @@ import java.security.AccessControlException;",
"removed": []
},
{
"added": [
"import java.util.concurrent.Executor;",
"import org.apache.derby.iapi.jdbc.FailedProperties40;"
],
"header": "@@ -79,9 +85,11 @@ import java.util.WeakHashMap;",
"removed": []
},
{
"added": [
"public abstract class EmbedConnection implements EngineConnection"
],
"header": "@@ -117,7 +125,7 @@ import org.apache.derby.impl.jdbc.authentication.NoneAuthenticationServiceImpl;",
"removed": [
"public class EmbedConnection implements EngineConnection"
]
},
{
"added": [],
"header": "@@ -2294,19 +2302,6 @@ public class EmbedConnection implements EngineConnection",
"removed": [
" /**",
" *",
"\t * Get the type-map object associated with this connection.",
"\t * By default, the map returned is empty.",
"\t * JDBC 2.0 - java.util.Map requires JDK 1",
" *",
" */",
" public java.util.Map getTypeMap() throws SQLException {",
" checkIfClosed();",
"\t\t// just return an immuntable empty map",
"\t\treturn java.util.Collections.EMPTY_MAP;",
" }",
""
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/AutoloadedDriver.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;"
],
"header": "@@ -26,9 +26,11 @@ import java.sql.Driver;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/Driver30.java",
"hunks": [
{
"added": [
"public abstract class Driver30 extends Driver20 {"
],
"header": "@@ -39,7 +39,7 @@ import org.apache.derby.impl.jdbc.*;",
"removed": [
"public class Driver30 extends Driver20 {"
]
},
{
"added": [
"\tpublic abstract Connection getNewNestedConnection(EmbedConnection conn);",
"\tprotected abstract EmbedConnection getNewEmbedConnection(String url, Properties info)",
" throws SQLException;",
"\tpublic abstract java.sql.PreparedStatement"
],
"header": "@@ -49,25 +49,19 @@ public class Driver30 extends Driver20 {",
"removed": [
"\tpublic Connection getNewNestedConnection(EmbedConnection conn)",
"\t{",
" return new EmbedConnection(conn);",
"\t}",
"\tprotected EmbedConnection getNewEmbedConnection(String url, Properties info)",
"\t\t throws SQLException ",
"\t{",
" return new EmbedConnection(this, url, info);",
"\t}",
"\tpublic java.sql.PreparedStatement"
]
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedBaseDataSource.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
""
],
"header": "@@ -25,7 +25,10 @@ import java.sql.Connection;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedConnectionPoolDataSource.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.impl.jdbc.Util;",
""
],
"header": "@@ -22,8 +22,12 @@",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/EmbeddedDriver.java",
"hunks": [
{
"added": [
"import java.sql.SQLFeatureNotSupportedException;",
"import java.util.logging.Logger;",
"import org.apache.derby.impl.jdbc.Util;"
],
"header": "@@ -27,9 +27,12 @@ import java.sql.Driver;",
"removed": []
}
]
},
{
"file": "java/engine/org/apache/derby/jdbc/InternalDriver.java",
"hunks": [
{
"added": [
"\tpublic abstract java.sql.Statement newEmbedStatement(",
"\t\t\t\tint resultSetHoldability);"
],
"header": "@@ -582,16 +582,12 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
"\tpublic java.sql.Statement newEmbedStatement(",
"\t\t\t\tint resultSetHoldability)",
"\t{",
"\t\treturn new EmbedStatement(conn, forMetaData, resultSetType, resultSetConcurrency,",
"\t\tresultSetHoldability);",
"\t}"
]
},
{
"added": [
"\tpublic abstract DatabaseMetaData newEmbedDatabaseMetaData",
" (EmbedConnection conn, String dbname) throws SQLException;"
],
"header": "@@ -622,10 +618,8 @@ public abstract class InternalDriver implements ModuleControl {",
"removed": [
"\tpublic DatabaseMetaData newEmbedDatabaseMetaData(EmbedConnection conn,",
"\t\tString dbname) throws SQLException {",
"\t\treturn new EmbedDatabaseMetaData(conn,dbname);",
"\t}"
]
}
]
},
{
"file": "java/testing/org/apache/derbyTesting/junit/SupportFilesSetup.java",
"hunks": [
{
"added": [
" return file.toURI().toURL();"
],
"header": "@@ -280,7 +280,7 @@ public class SupportFilesSetup extends TestSetup {",
"removed": [
" return file.toURL();"
]
}
]
}
] |
derby-DERBY-6213-f2fad755
|
DERBY-6213: Generify impl/sql/catalog and impl/sql/depend.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1483911 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java",
"hunks": [
{
"added": [
"public class ColumnDescriptorList extends ArrayList<TupleDescriptor>"
],
"header": "@@ -36,7 +36,7 @@ import java.util.Iterator;",
"removed": [
"public class ColumnDescriptorList extends ArrayList"
]
},
{
"added": [
"\t\tfor (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )"
],
"header": "@@ -71,7 +71,7 @@ public class ColumnDescriptorList extends ArrayList",
"removed": [
"\t\tfor (Iterator iterator = iterator(); iterator.hasNext(); )"
]
},
{
"added": [
"\t\tfor (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )"
],
"header": "@@ -98,7 +98,7 @@ public class ColumnDescriptorList extends ArrayList",
"removed": [
"\t\tfor (Iterator iterator = iterator(); iterator.hasNext(); )"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java",
"hunks": [
{
"added": [
"public class ConstraintDescriptorList extends ArrayList<ConstraintDescriptor>"
],
"header": "@@ -39,7 +39,7 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"public class ConstraintDescriptorList extends ArrayList"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.types.DataValueDescriptor;"
],
"header": "@@ -33,6 +33,7 @@ import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;",
"removed": []
},
{
"added": [
" public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List<DataValueDescriptor> defaults)"
],
"header": "@@ -1102,7 +1103,7 @@ public interface DataDictionary",
"removed": [
" public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)"
]
},
{
"added": [
"\tpublic List<TupleDescriptor> getDependentsDescriptorList(String dependentID)"
],
"header": "@@ -1583,7 +1584,7 @@ public interface DataDictionary",
"removed": [
"\tpublic List getDependentsDescriptorList(String dependentID)"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java",
"hunks": [
{
"added": [
"public class GenericDescriptorList extends ArrayList<TupleDescriptor>"
],
"header": "@@ -26,7 +26,7 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"public class GenericDescriptorList extends ArrayList"
]
}
]
},
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java",
"hunks": [
{
"added": [
"public abstract class UniqueSQLObjectDescriptor extends UniqueTupleDescriptor",
" /** Pass-through constructors */",
" public UniqueSQLObjectDescriptor() { super(); }",
" public UniqueSQLObjectDescriptor( DataDictionary dd ) { super( dd ); }",
" ",
"\tpublic abstract String getName();"
],
"header": "@@ -37,15 +37,19 @@ import org.apache.derby.catalog.UUID;",
"removed": [
"public interface UniqueSQLObjectDescriptor extends UniqueTupleDescriptor",
"\tpublic String getName();"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\timplements DataDictionary, CacheableFactory, ModuleControl, ModuleSupportable,java.security.PrivilegedAction<Properties>"
],
"header": "@@ -188,7 +188,7 @@ import org.apache.derby.impl.sql.execute.JarUtil;",
"removed": [
"\timplements DataDictionary, CacheableFactory, ModuleControl, ModuleSupportable,java.security.PrivilegedAction"
]
},
{
"added": [
"\tprivate Hashtable<UUID,SPSDescriptor>\t\tspsIdHash;"
],
"header": "@@ -399,7 +399,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate Hashtable\t\tspsIdHash;"
]
},
{
"added": [
" private HashMap<String,HashMap<String,String>> sequenceIDs;"
],
"header": "@@ -422,7 +422,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" private HashMap sequenceIDs;"
]
},
{
"added": [
"\t\t\tspsIdHash = new Hashtable<UUID,SPSDescriptor>(stmtCacheSize);",
" sequenceIDs = new HashMap<String,HashMap<String,String>>();"
],
"header": "@@ -700,14 +700,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\tspsIdHash = new Hashtable(stmtCacheSize);",
" sequenceIDs = new HashMap();"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines = new HashSet<String>();"
],
"header": "@@ -789,7 +789,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines = new HashSet();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -1801,7 +1801,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -1844,7 +1844,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -2267,7 +2267,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -2377,7 +2377,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -2677,7 +2677,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -2754,7 +2754,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -2820,7 +2820,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\tList<TupleDescriptor> permissionDescriptorsList;//all ColPermsDescriptor for given tableid"
],
"header": "@@ -3058,7 +3058,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList permissionDescriptorsList;//all ColPermsDescriptor for given tableid"
]
},
{
"added": [
"\tHashMap<String,List<RoleGrantDescriptor>> getRoleGrantGraph(TransactionController tc, boolean inverse)",
"\t\tHashMap<String,List<RoleGrantDescriptor>> hm = new HashMap<String,List<RoleGrantDescriptor>>();"
],
"header": "@@ -3350,10 +3350,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tHashMap getRoleGrantGraph(TransactionController tc, boolean inverse)",
"\t\tHashMap hm = new HashMap();"
]
},
{
"added": [
"\t\t\tList<RoleGrantDescriptor> arcs = hm.get(hashKey);",
"\t\t\t\tarcs = new LinkedList<RoleGrantDescriptor>();"
],
"header": "@@ -3409,9 +3409,9 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\tList arcs = (List)hm.get(hashKey);",
"\t\t\t\tarcs = new LinkedList();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -3901,7 +3901,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -3963,7 +3963,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -4006,7 +4006,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\tsps = spsIdHash.get(uuid);"
],
"header": "@@ -4065,7 +4065,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\tsps = (SPSDescriptor)spsIdHash.get(uuid);"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -4188,7 +4188,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -4282,7 +4282,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
" List<DataValueDescriptor> tmpDefaults = new ArrayList<DataValueDescriptor>();"
],
"header": "@@ -4294,7 +4294,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" List tmpDefaults = new ArrayList();"
]
},
{
"added": [
" public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List<DataValueDescriptor> defaults)"
],
"header": "@@ -4405,7 +4405,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)"
]
},
{
"added": [
"\tpublic List<TupleDescriptor> getAllSPSDescriptors()",
"\t\tList<TupleDescriptor> list = newSList();"
],
"header": "@@ -4714,12 +4714,12 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List getAllSPSDescriptors()",
"\t\tList list = newSList();"
]
},
{
"added": [
" private static final Comparator<ColumnReference> OFFSET_COMPARATOR = new Comparator<ColumnReference>() {",
" public int compare(ColumnReference o1, ColumnReference o2) {",
" return o1.getBeginOffset() - o2.getBeginOffset();"
],
"header": "@@ -4804,13 +4804,12 @@ public final class\tDataDictionaryImpl",
"removed": [
" private static final Comparator OFFSET_COMPARATOR = new Comparator() {",
" public int compare(Object o1, Object o2) {",
" return ((ColumnReference) o1).getBeginOffset() -",
" ((ColumnReference) o2).getBeginOffset();"
]
},
{
"added": [
"\t\tCollectNodesVisitor<ColumnReference> visitor = new CollectNodesVisitor<ColumnReference>(ColumnReference.class);",
"\t\tList<ColumnReference> refs = visitor.getList();"
],
"header": "@@ -4943,9 +4942,9 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tCollectNodesVisitor visitor = new CollectNodesVisitor(ColumnReference.class);",
"\t\tList refs = visitor.getList();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -5422,7 +5421,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -5462,7 +5461,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\tList<TupleDescriptor> statDescriptorList = newSList();"
],
"header": "@@ -5755,7 +5754,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList statDescriptorList = newSList();"
]
},
{
"added": [
"\t\t\t\t\t\tConstraintDescriptorList list)"
],
"header": "@@ -6134,7 +6133,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tList list)"
]
},
{
"added": [
"\t\tList<UUID> slist = getConstraints(constraintId,"
],
"header": "@@ -6237,7 +6236,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList slist = getConstraints(constraintId,"
]
},
{
"added": [
"\t\tList<TupleDescriptor> fkList = newSList();"
],
"header": "@@ -6265,7 +6264,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList fkList = newSList();"
]
},
{
"added": [
"\tpublic List<UUID> getConstraints(UUID uuid, int indexId, int columnNum)"
],
"header": "@@ -6310,7 +6309,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List getConstraints(UUID uuid, int indexId, int columnNum)"
]
},
{
"added": [
"\t\tList<UUID>\t\t\t\tslist = new ArrayList<UUID>();"
],
"header": "@@ -6322,7 +6321,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList\t\t\t\t\tslist = newSList();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -6704,7 +6703,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -6880,7 +6879,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\tpublic Hashtable<Long,ConglomerateDescriptor> hashAllConglomerateDescriptorsByNumber(TransactionController tc)",
"\t\tHashtable<Long,ConglomerateDescriptor> ht = new Hashtable<Long,ConglomerateDescriptor>();"
],
"header": "@@ -6924,10 +6923,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc)",
"\t\tHashtable ht = new Hashtable();"
]
},
{
"added": [
"\tpublic Hashtable<UUID,TableDescriptor> hashAllTableDescriptorsByTableId(TransactionController tc)",
"\t\tHashtable<UUID,TableDescriptor> ht = new Hashtable<UUID,TableDescriptor>();"
],
"header": "@@ -6981,10 +6980,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic Hashtable hashAllTableDescriptorsByTableId(TransactionController tc)",
"\t\tHashtable ht = new Hashtable();"
]
},
{
"added": [
"\t\tList<TupleDescriptor> cdl = newSList();"
],
"header": "@@ -7065,7 +7064,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\tList cdl = newSList();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -7249,7 +7248,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\tpublic List<TupleDescriptor> getDependentsDescriptorList(String dependentID)",
"\t\tList<TupleDescriptor>\t\t\t\t\tddlList = newSList();"
],
"header": "@@ -7477,10 +7476,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List getDependentsDescriptorList(String dependentID)",
"\t\tList\t\t\t\t\tddlList = newSList();"
]
},
{
"added": [
"\tpublic List<TupleDescriptor> getProvidersDescriptorList(String providerID)",
"\t\tList<TupleDescriptor>\t\t\t\t\tddlList = newSList();"
],
"header": "@@ -7514,10 +7513,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List getProvidersDescriptorList(String providerID)",
"\t\tList\t\t\t\t\tddlList = newSList();"
]
},
{
"added": [
"\tpublic List<TupleDescriptor> getAllDependencyDescriptorsList()",
"\t\tList<TupleDescriptor>\t\t\t\tddl = newSList();"
],
"header": "@@ -7549,14 +7548,14 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic List getAllDependencyDescriptorsList()",
"\t\tList\t\t\t\t\t\tddl = newSList();"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -7741,7 +7740,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -7785,7 +7784,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\tpublic java.util.List<AliasDescriptor> getRoutineList(String schemaID, String routineName, char nameSpace)",
" // We expect to find just a single function, since we currently",
" // don't support multiple routines with the same name, but use a",
" // list to support future extension.",
" List<AliasDescriptor> list = new ArrayList<AliasDescriptor>(1);",
""
],
"header": "@@ -7797,18 +7796,18 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tpublic java.util.List getRoutineList(String schemaID, String routineName, char nameSpace)",
" // We expect to find just a single function, since we currently",
" // don't support multiple routines with the same name, but use a",
" // list to support future extension.",
" List list = new ArrayList(1);",
""
]
},
{
"added": [
" if ( ad !=null ) { list.add( ad ); }",
"",
" return list;"
],
"header": "@@ -7862,9 +7861,9 @@ public final class\tDataDictionaryImpl",
"removed": [
" return ad == null ?",
" Collections.EMPTY_LIST :",
" Collections.singletonList(ad);"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -7952,7 +7951,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
" Map<String,Object> schemas = new HashMap<String,Object>();"
],
"header": "@@ -8370,7 +8369,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" Map schemas = new HashMap();"
]
},
{
"added": [
" Iterator<String> i = schemas.keySet().iterator();"
],
"header": "@@ -8387,7 +8386,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" Iterator i = schemas.keySet().iterator();"
]
},
{
"added": [
" i.next());"
],
"header": "@@ -8395,7 +8394,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (String)i.next());"
]
},
{
"added": [
"\t\t\t\t\t\tList<TupleDescriptor> list,"
],
"header": "@@ -9379,7 +9378,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tList list,"
]
},
{
"added": [
"\t\t\t\t\t\tList<TupleDescriptor> list,"
],
"header": "@@ -9432,7 +9431,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tList list,"
]
},
{
"added": [
"\t\t\t\t\t\tList<TupleDescriptor> list,"
],
"header": "@@ -9460,7 +9459,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tList list,"
]
},
{
"added": [
"\t\t\t\t\t\tList<TupleDescriptor> list)"
],
"header": "@@ -9721,7 +9720,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\tList list)"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -10330,7 +10329,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines,"
],
"header": "@@ -10714,7 +10713,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines,"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines,"
],
"header": "@@ -10835,7 +10834,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines,"
]
},
{
"added": [
" TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -10861,7 +10860,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -11514,7 +11513,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines,"
],
"header": "@@ -12125,7 +12124,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines,"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines,"
],
"header": "@@ -12186,7 +12185,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines,"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -12334,7 +12333,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" void create_10_5_system_procedures(TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -12735,7 +12734,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" void create_10_5_system_procedures(TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" HashSet<String> newlyCreatedRoutines)"
],
"header": "@@ -12777,7 +12776,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashSet newlyCreatedRoutines)"
]
},
{
"added": [
" void create_10_3_system_procedures(TransactionController tc, HashSet<String> newlyCreatedRoutines ) "
],
"header": "@@ -12876,7 +12875,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" void create_10_3_system_procedures(TransactionController tc, HashSet newlyCreatedRoutines ) "
]
},
{
"added": [
" void create_10_3_system_procedures_SYSCS_UTIL( TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -12895,7 +12894,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" void create_10_3_system_procedures_SYSCS_UTIL( TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" void create_10_9_system_procedures( TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -13160,7 +13159,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" void create_10_9_system_procedures( TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
" void create_10_10_system_procedures( TransactionController tc, HashSet<String> newlyCreatedRoutines )"
],
"header": "@@ -13358,7 +13357,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" void create_10_10_system_procedures( TransactionController tc, HashSet newlyCreatedRoutines )"
]
},
{
"added": [
"\t\treturn java.security.AccessController.doPrivileged(this);",
"\tpublic final Properties run() {"
],
"header": "@@ -13422,10 +13421,10 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\treturn (Properties) java.security.AccessController.doPrivileged(this);",
"\tpublic final Object run() {"
]
},
{
"added": [
"\tprivate static List<TupleDescriptor> newSList() {",
"\t\treturn java.util.Collections.synchronizedList(new java.util.LinkedList<TupleDescriptor>());"
],
"header": "@@ -13439,8 +13438,8 @@ public final class\tDataDictionaryImpl",
"removed": [
"\tprivate static List newSList() {",
"\t\treturn java.util.Collections.synchronizedList(new java.util.LinkedList());"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -13828,7 +13827,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -13968,7 +13967,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -14011,7 +14010,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t\t\t(List) null,"
]
},
{
"added": [
"\t\t\t\t(List<TupleDescriptor>) null,"
],
"header": "@@ -14063,7 +14062,7 @@ public final class\tDataDictionaryImpl",
"removed": [
"\t\t\t\t(List) null,"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -14186,7 +14185,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
" (List<TupleDescriptor>) null,"
],
"header": "@@ -14226,7 +14225,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" (List) null,"
]
},
{
"added": [
" HashMap<String,String> sequencesInSchema = sequenceIDs.get( schemaName );",
" sequencesInSchema = new HashMap<String,String>();"
],
"header": "@@ -14245,10 +14244,10 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashMap sequencesInSchema = (HashMap) sequenceIDs.get( schemaName );",
" sequencesInSchema = new HashMap();"
]
},
{
"added": [
" HashMap<String,String> sequencesInSchema = (HashMap<String,String>) sequenceIDs.get( schemaName );"
],
"header": "@@ -14268,7 +14267,7 @@ public final class\tDataDictionaryImpl",
"removed": [
" HashMap sequencesInSchema = (HashMap) sequenceIDs.get( schemaName );"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/RoleClosureIteratorImpl.java",
"hunks": [
{
"added": [
" private HashMap<String,Object> seenSoFar;"
],
"header": "@@ -57,7 +57,7 @@ public class RoleClosureIteratorImpl implements RoleClosureIterator",
"removed": [
" private HashMap seenSoFar;"
]
},
{
"added": [
" private HashMap<String,List<RoleGrantDescriptor>> graph;",
" private List<RoleGrantDescriptor> lifo;",
" private Iterator<RoleGrantDescriptor> currNodeIter;"
],
"header": "@@ -67,18 +67,18 @@ public class RoleClosureIteratorImpl implements RoleClosureIterator",
"removed": [
" private HashMap graph;",
" private List lifo;",
" private Iterator currNodeIter;"
]
},
{
"added": [
" seenSoFar = new HashMap<String,Object>();",
" lifo = new ArrayList<RoleGrantDescriptor>(); // remaining work stack"
],
"header": "@@ -120,8 +120,8 @@ public class RoleClosureIteratorImpl implements RoleClosureIterator",
"removed": [
" seenSoFar = new HashMap();",
" lifo = new ArrayList(); // remaining work stack"
]
},
{
"added": [
" List<RoleGrantDescriptor> dummyList = new ArrayList<RoleGrantDescriptor>();"
],
"header": "@@ -131,7 +131,7 @@ public class RoleClosureIteratorImpl implements RoleClosureIterator",
"removed": [
" List dummyList = new ArrayList();"
]
},
{
"added": [
" List<RoleGrantDescriptor> outArcs = graph.get(root);"
],
"header": "@@ -150,7 +150,7 @@ public class RoleClosureIteratorImpl implements RoleClosureIterator",
"removed": [
" List outArcs = (List)graph.get(root);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java",
"hunks": [
{
"added": [
"public class CollectNodesVisitor<T extends Visitable> implements Visitor",
" private final List<T> nodeList;"
],
"header": "@@ -35,9 +35,9 @@ import org.apache.derby.iapi.sql.compile.Visitor;",
"removed": [
"public class CollectNodesVisitor implements Visitor",
" private final List nodeList;"
]
},
{
"added": [
" this.nodeList = new ArrayList<T>();"
],
"header": "@@ -62,7 +62,7 @@ public class CollectNodesVisitor implements Visitor",
"removed": [
" this.nodeList = new ArrayList();"
]
},
{
"added": [
"\t\t\tnodeList.add( (T) node);"
],
"header": "@@ -93,7 +93,7 @@ public class CollectNodesVisitor implements Visitor",
"removed": [
"\t\t\tnodeList.add(node);"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;"
],
"header": "@@ -46,6 +46,7 @@ import org.apache.derby.iapi.sql.depend.ProviderList;",
"removed": []
},
{
"added": [
" private final Map<UUID,List<Dependency>> dependents = new HashMap<UUID,List<Dependency>>();"
],
"header": "@@ -86,7 +87,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
" private final Map dependents = new HashMap();"
]
},
{
"added": [
" private final Map<UUID,List<Dependency>> providers = new HashMap<UUID,List<Dependency>>();"
],
"header": "@@ -100,7 +101,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
" private final Map providers = new HashMap();"
]
},
{
"added": [
"\t\tList<Dependency> list = getDependents(p);"
],
"header": "@@ -312,7 +313,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\tList list = getDependents(p);"
]
},
{
"added": [
"\t\t\t\tDependency dependency = list.get(ei);"
],
"header": "@@ -354,7 +355,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\t\tDependency dependency = (Dependency) list.get(ei);"
]
},
{
"added": [
" List<ProviderInfo> pih = new ArrayList<ProviderInfo>();"
],
"header": "@@ -573,7 +574,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
" List pih = new ArrayList();"
]
},
{
"added": [
" private boolean addDependencyToTable(Map<UUID,List<Dependency>> table, UUID key, Dependency dy) {",
"\t\tList<Dependency> deps = (List<Dependency>) table.get(key);",
" deps = new ArrayList<Dependency>();"
],
"header": "@@ -895,11 +896,11 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
" private boolean addDependencyToTable(Map table, Object key, Dependency dy) {",
"\t\tList deps = (List) table.get(key);",
" deps = new ArrayList();"
]
},
{
"added": [
"\t\t\tfor (ListIterator<Dependency> depsIT = deps.listIterator(); depsIT.hasNext(); )",
"\t\t\t\tDependency curDY = depsIT.next();"
],
"header": "@@ -908,9 +909,9 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\tfor (ListIterator depsIT = deps.listIterator(); depsIT.hasNext(); )",
"\t\t\t\tDependency curDY = (Dependency)depsIT.next();"
]
},
{
"added": [
"\t * Turn a list of DependencyDescriptors into a list of Dependencies."
],
"header": "@@ -954,7 +955,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t * Replace the DependencyDescriptors in an List with Dependencys."
]
},
{
"added": [
"\tprivate List<Dependency> getDependencyDescriptorList(List<TupleDescriptor> storedList,",
" List<Dependency> retval = new ArrayList<Dependency>();",
" "
],
"header": "@@ -965,10 +966,12 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\tprivate List getDependencyDescriptorList(List storedList,"
]
},
{
"added": [
"\t\t\tfor (ListIterator<TupleDescriptor> depsIterator = storedList.listIterator();"
],
"header": "@@ -978,7 +981,7 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\tfor (ListIterator depsIterator = storedList.listIterator();"
]
},
{
"added": [
"\t\t\t\tretval.add( new BasicDependency( tempD, tempP ) );",
"\t\treturn retval;"
],
"header": "@@ -1010,11 +1013,11 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\t\tdepsIterator.set(new BasicDependency(tempD, tempP));",
"\t\treturn storedList;"
]
},
{
"added": [
" private List<Provider> getProviders (Dependent d) throws StandardException {",
" List<Provider> provs = new ArrayList<Provider>();"
],
"header": "@@ -1038,8 +1041,8 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
" private List getProviders (Dependent d) throws StandardException {",
" List provs = new ArrayList();"
]
},
{
"added": [
"\t\t\tList<Dependency> storedList = getDependencyDescriptorList",
" (",
" dd.getDependentsDescriptorList( d.getObjectID().toString() ),",
" (Provider) null",
" );",
" Iterator<Dependency> depIter = storedList.iterator();",
" provs.add((depIter.next()).getProvider());"
],
"header": "@@ -1053,15 +1056,14 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\tList storedList = getDependencyDescriptorList(",
"\t\t\t\t\t\t\t\tdd.getDependentsDescriptorList(",
"\t\t\t\t\t\t\t\t\t\t\t\td.getObjectID().toString()",
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),",
"\t\t\t\t\t\t\t\t(Provider) null",
"\t\t\t\t\t\t\t\t\t\t\t\t\t);",
" Iterator depIter = storedList.iterator();",
" provs.add(((Dependency)depIter.next()).getProvider());"
]
},
{
"added": [
"\tprivate List<Dependency> getDependents (Provider p) ",
" List<Dependency> deps = new ArrayList<Dependency>();",
" List<Dependency> memDeps = providers.get(p.getObjectID());"
],
"header": "@@ -1076,11 +1078,11 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\tprivate List getDependents (Provider p) ",
" List deps = new ArrayList();",
" List memDeps = (List) providers.get(p.getObjectID());"
]
},
{
"added": [
"\t\t\tList<Dependency> storedList = getDependencyDescriptorList",
" (",
" dd.getProvidersDescriptorList( p.getObjectID().toString() ),",
" p",
" );"
],
"header": "@@ -1089,12 +1091,11 @@ public class BasicDependencyManager implements DependencyManager {",
"removed": [
"\t\t\tList storedList = getDependencyDescriptorList(",
"\t\t\t\t\t\t\t\tdd.getProvidersDescriptorList(",
"\t\t\t\t\t\t\t\t\t\t\t\tp.getObjectID().toString()",
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),",
"\t\t\t\t\t\t\tp",
"\t\t\t\t\t\t\t\t\t\t\t\t\t);"
]
}
]
}
] |
derby-DERBY-6214-81fbf525
|
DERBY-6214 (PreparedStatement.setObject(int, Object, Types.CLOB) fail with DerbyNet)
Adding junit test to set CLOB column value using setObject and setString. The test has been disabled when updating more than one row and
1)using setObject to set the value since it runs into closed stream error
2)using setString with large string(test works fine for smaller strings) since it runs into closed stream error
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1484649 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6215-4068b525
|
DERBY-6215: derby.log grows enormously during StressMultiTest
Make sure ClobReclamationTest clears the DaemonTrace debug flag when
it has completed.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1480947 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-6216-2a4654bb
|
DERBY-6216: XPLAIN feature does not work, gives XCL16: ResultSet not open
This change adjusts the implementation of the explain-only mode feature,
which is enabled via syscs_util.syscs_set_xplain_mode(1).
Prior to this change, the implementation short-circuited the open() method
of the ResultSet classes, causing the execution engine to terminate
immediately because the result sets were not open.
This change takes an alternate approach, suggested by Knut Anders: the open()
is allowed to proceed normally, but we short-circuit the getNextRow()
method of the ResultSet classes. This way, the result sets all appear to be
normal result sets, open and ready for business, but they do no work and
always produce an empty result.
Then, at the end of the execution, the statistics are gathered. They show
that no work was done, but they contain information about the overall "shape"
of the query plan (which result sets were constructed, and what the overall
result set tree looks like).
We also discovered that we were completely missing regression tests for the
explain-only feature, so this change adds a handful of regression tests,
including an IJ-based test, a simple embedded query, and a test that verifies
that explain-only mode can be turned on and off between executions of a
prepared query.
More testing would clearly be beneficial, but this should at least give us
a feature that basically works.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502795 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java",
"hunks": [
{
"added": [
"\tprotected final boolean isXplainOnlyMode()",
"\t{",
"\t\tLanguageConnectionContext lcc = getLanguageConnectionContext();",
"\t\treturn",
"\t\t (lcc.getRunTimeStatisticsMode() && lcc.getXplainOnlyMode());",
"\t}",
""
],
"header": "@@ -145,6 +145,13 @@ implements NoPutResultSet",
"removed": []
},
{
"added": [
"\t\t\topenCore();"
],
"header": "@@ -256,12 +263,7 @@ implements NoPutResultSet",
"removed": [
"\t\t\tLanguageConnectionContext lcc = getLanguageConnectionContext();",
"\t\t\tif(lcc.getRunTimeStatisticsMode() && lcc.getXplainOnlyMode()) {",
"\t\t\t\t// do nothing",
"\t\t\t} else {",
"\t\t\t\topenCore();",
"\t\t\t}"
]
}
]
}
] |
derby-DERBY-622-c7549a52
|
DERBY-622 (partial): Add privileged blocks for calls to getResourceAsStream()
in impl.tools.sysinfo.Main.
Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@390000 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/impl/tools/sysinfo/Main.java",
"hunks": [
{
"added": [
"import java.security.AccessController;",
"import java.security.PrivilegedAction;"
],
"header": "@@ -20,6 +20,8 @@",
"removed": []
},
{
"added": [
" ",
" final Properties finalp = p;",
" final String finalLocaleResource = localeResource;",
" ",
" try { ",
" \tInputStream is = (InputStream) AccessController.doPrivileged",
" (new PrivilegedAction() {",
" public Object run() {",
" \t\t InputStream locis =",
" \t\t \tfinalp.getClass().getResourceAsStream (finalLocaleResource);",
" \t\t\t\t\treturn locis;",
" }",
" }",
" ); ",
" \t",
" \t",
" \t"
],
"header": "@@ -364,11 +366,23 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
"",
" try {",
"",
" InputStream is = p.getClass().getResourceAsStream (localeResource);",
""
]
},
{
"added": [
" final String resource = \"/\".concat(infoNames[i]);",
"",
" InputStream is = (InputStream) AccessController.doPrivileged",
" (new PrivilegedAction() {",
" public Object run() {",
"\t\t\t InputStream locis =",
" new Main().getClass().getResourceAsStream(resource);",
" return locis;",
" }",
" }",
" ); "
],
"header": "@@ -751,9 +765,18 @@ public static void getMainInfo (java.io.PrintWriter aw, boolean pause) {",
"removed": [
"\t\t\tString resource = \"/\".concat(infoNames[i]);",
" InputStream is = new Main().getClass().getResourceAsStream(resource);"
]
}
]
}
] |
derby-DERBY-6220-c40208a6
|
DERBY-6220: Flag additional Derby properties which are undocumented and remove an unused property.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1488345 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/reference/Property.java",
"hunks": [
{
"added": [
"\t\tservice properties start with this prefix. These properties are not documented."
],
"header": "@@ -52,7 +52,7 @@ public interface Property {",
"removed": [
"\t\tservice properties start with this prefix."
]
},
{
"added": [
"",
" Undocumented."
],
"header": "@@ -326,6 +326,8 @@ public interface Property {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>"
],
"header": "@@ -359,9 +361,15 @@ public interface Property {",
"removed": []
},
{
"added": [
" * </p>",
" *",
"\t * <p>",
"\t * Undocumented.",
" * </p>"
],
"header": "@@ -489,7 +497,11 @@ public interface Property {",
"removed": [
" * <p>"
]
},
{
"added": [
" * <p>",
"\t * </p>",
" *",
" * <p>",
"\t * Externally visible but undocumented.",
"\t * </p>"
],
"header": "@@ -609,10 +621,14 @@ public interface Property {",
"removed": [
"\t * <p>",
"\t * Externally visible."
]
},
{
"added": [
"\t * Externally visible but undocumented."
],
"header": "@@ -621,7 +637,7 @@ public interface Property {",
"removed": [
"\t * Externally visible."
]
},
{
"added": [
"\t Externally visible but undocumented."
],
"header": "@@ -643,7 +659,7 @@ public interface Property {",
"removed": [
"\t Externally visible."
]
},
{
"added": [
" * <p>",
" * </p>",
" *",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>",
" * <p>",
" * </p>",
" *",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>",
" * <p>",
" * </p>",
" *",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>",
" * <p>",
" * </p>",
" *",
" * <p>",
" * <em>NOTE:</em> This is a debug property which will be removed or renamed.",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>",
" * <p>",
" * </p>",
" *",
" * <p>",
" * <em>NOTE:</em> This is a debug property which will be removed or renamed.",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>"
],
"header": "@@ -681,47 +697,91 @@ public interface Property {",
"removed": []
},
{
"added": [
" //",
" // Should not be documented any longer."
],
"header": "@@ -790,6 +850,8 @@ public interface Property {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>"
],
"header": "@@ -831,8 +893,10 @@ public interface Property {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>"
],
"header": "@@ -853,9 +917,11 @@ public interface Property {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>"
],
"header": "@@ -866,8 +932,10 @@ public interface Property {",
"removed": []
},
{
"added": [
"",
" Undocumented.",
" Undocumented.",
"\tpublic static final String CHECKPOINT_INTERVAL = \"derby.storage.checkpointInterval\";",
"",
" Undocumented."
],
"header": "@@ -883,21 +951,22 @@ public interface Property {",
"removed": [
"\t */",
"\tpublic static final String CHECKPOINT_INTERVAL = \"derby.storage.checkpointInterval\";",
"\t/**",
"\t\tProperty name for specifying log archival location",
"\tpublic static final String LOG_ARCHIVAL_DIRECTORY = \"derby.storage.logArchive\";"
]
},
{
"added": [
" * <p>",
" * </p>",
" *",
" * <p>",
" * Undocumented.",
" * </p>"
],
"header": "@@ -924,9 +993,15 @@ public interface Property {",
"removed": []
},
{
"added": [
" * <p>",
" * </p>",
" *",
" *<p>",
" *</p>",
" *",
" * <p>",
" * </p>",
" * <p>",
" *</p>",
" *",
" * <p>",
" *</p>",
" *",
" * <p>",
" * </p>",
"",
" * <p>",
" *</p>",
" *",
" * <p>",
" *</p>",
" * Default: false",
" *",
" * <p>",
" * </p>",
"",
" /**",
" * <p>",
" * derby.drda.trace",
" *</p>",
" */"
],
"header": "@@ -958,31 +1033,57 @@ public interface Property {",
"removed": [
" *<BR>",
" *<BR>",
" *<BR>",
" *<BR>",
" *<BR>",
" *<BR>"
]
},
{
"added": [
" // Undocumented"
],
"header": "@@ -1066,6 +1167,7 @@ public interface Property {",
"removed": []
}
]
}
] |
derby-DERBY-6221-8eec7a94
|
DERBY-6221: Check for invisible PASSWORD column at preprocessing time.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1487946 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
" //",
" // We're done with binding, so we should know which columns",
" // are referenced. We check to see if SYSUSERS.PASSWORD is referenced.",
" // Even the DBO is not allowed to SELECT that column.",
" // This is to prevent us from instantiating the password as a",
" // String. See DERBY-866.",
" // We do this check before optimization because the optimizer may",
" // change the result column list as it experiments with different access paths.",
" // At preprocess() time, the result column list should be the columns in the base",
" // table.",
" //",
" if ( authorizeSYSUSERS )",
" {",
" int passwordColNum = SYSUSERSRowFactory.PASSWORD_COL_NUM;",
"",
" FormatableBitSet refCols = resultColumns.getReferencedFormatableBitSet( false, true, false );",
"",
" if (",
" (refCols.getLength() >= passwordColNum ) && refCols.isSet( passwordColNum - 1 )",
" )",
" {",
" throw StandardException.newException",
" ( SQLState.HIDDEN_COLUMN, SYSUSERSRowFactory.TABLE_NAME, SYSUSERSRowFactory.PASSWORD_COL_NAME );",
" }",
" }",
" ",
" /* Generate the referenced table map */"
],
"header": "@@ -2794,7 +2794,33 @@ public class FromBaseTable extends FromTable",
"removed": [
"\t\t/* Generate the referenced table map */"
]
}
]
}
] |
derby-DERBY-6227-031e59cf
|
DERBY-6227: Distinct aggregates don't work well with territory-based collation
Make the duplicate elimination use the DataValueDescriptors directly instead
of converting the values to String objects first. This ensures that the
collation rules of the database are used to compare the values, and those
rules may be different from those used by String.equals().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1603793 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java",
"hunks": [
{
"added": [
" private List<List<Set<DataValueDescriptor>>> distinctValues;"
],
"header": "@@ -121,7 +121,7 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
" private List<List<Set<String>>> distinctValues;"
]
},
{
"added": [
" distinctValues = new ArrayList<List<Set<DataValueDescriptor>>>(",
" resultRows.length);"
],
"header": "@@ -239,8 +239,8 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
" distinctValues =",
" new ArrayList<List<Set<String>>>(resultRows.length);"
]
},
{
"added": [
" distinctValues.add(new ArrayList<Set<DataValueDescriptor>>(",
" aggregates.length));"
],
"header": "@@ -249,8 +249,8 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
" distinctValues.add(",
" new ArrayList<Set<String>>(aggregates.length));"
]
},
{
"added": [
" if (SanityManager.DEBUG) {",
" // Distinct aggregates currently always use the sorter.",
" // Assert that it is so.",
" SanityManager.ASSERT(!isInSortedOrder);",
" SanityManager.ASSERT(scanController != null);",
"",
" // If we ever start reading directly from the source",
" // result set, we should call source.needsToClone() to",
" // check if we need to clone the value before adding it",
" // to the set of distinct values. Don't clone it for now.",
" }",
"",
" if (!newValue.isNull()",
" && !distinctValues.get(level).get(i).add(newValue))"
],
"header": "@@ -762,12 +762,24 @@ class GroupedAggregateResultSet extends GenericAggregateResultSet",
"removed": [
" String str = newValue.getString();",
" if (str != null && !distinctValues.get(level).get(i).add(str))"
]
}
]
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.