id
stringlengths
22
25
commit_message
stringlengths
137
6.96k
diffs
listlengths
0
63
derby-DERBY-532-e03c0745
DERBY-532 Support deferrable constraints Patch derby-532-fix-drop-not-nullable. Fixes a broken predicate when recreating the index when going from UNIQUE NOT NULL to plain UNIQUE: the existing predicate missed the deferrable case, so the index was not recreated. Added a test case. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1550284 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-532-e28a36f3
DERBY-532 Support deferrable constraints Patch derby-532-metadata-queries: updates the metadata queries to give correct results in the DEFERRABILITY column returned by the calls: - DataBaseMetaData#getImportedKeys - DataBaseMetaData#getExportedKeys - DataBaseMetaData#getCrossReference. Test have been added. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1593949 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-532-ea36b420
DERBY-6419 Make BTree scan honor OPENMODE_LOCK_NOWAIT for row locks A follow-up patch: derby-6419-followup. Only short circuit waiting for lock in BTree scan to check duplicates for a deferred unique/pk constraint if constraint mode is deferred (i.e. not if immediate). Added a test case lifted from UniqueConstraintMultiThreadedTest, which exposed the issue when we run the regressions with default deferrable by default (see DERBY-532). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1550299 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java", "hunks": [ { "added": [ "", " // If the constraint mode is deferred, perform the check without", " // waiting for any locks; we will just presume any lock conflicts"...
derby-DERBY-532-ee5954e2
DERBY-532 Support deferrable constraints Patch _*derby-532-upgrade-1b*_. It checks that deferrable constraints cannot be used unless hard upgrade has happened. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1555724 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5325-b0a89283
DERBY-5325 Checkpoint fails with ClosedChannelException in InterruptResilienceTest Patch derby-5325-refactor-b, which refactors redundant code and cleans up some comments and Javadoc. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1151612 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/data/RAFContainer4.java", "hunks": [ { "added": [ " // those monitors during container recovery. So, just forge ahead" ], "header": "@@ -292,7 +292,7 @@ class RAFContainer4 extends RAFContainer {", ...
derby-DERBY-5325-b7f22c34
DERBY-5325 Checkpoint fails with ClosedChannelException in InterruptResilienceTest Patch derby-5325a: With NIO, writeRAFHeader has two methods leading to interruptible IO: - getEmbryonicPage - writeHeader Currently, getEmbryonicPage may throw InterruptDetectedException and hence, so may writeRAFHeader. writeHeader may throw ClosedByInterruptException, AsynchronousCloseException and ClosedChannelException because writeHeader does not use RAFContainer4#writePage, but rather uses RAFContainer4#writeAtOffset, which does not currently attempt to recover after interrupt. So currently, clients of writeRAFHeader need to be prepared for all of InterruptDetectedException, ClosedByInterruptException, AsynchronousCloseException and ClosedChannelException. writeRAFHeader is used in three locations: - RAFContainer#clean - RAFContainer#run(CREATE_CONTAINER_ACTION) - RAFContainer#run(STUBBIFY_ACTION) RAFContainer#clean is prepared for InterruptDetectedException only. The issue shows that ClosedChannelException may also occur, and it is not prepared for that (this bug). RAFContainer#run(CREATE_CONTAINER_ACTION) is prepared for ClosedByInterruptException and AsynchronousCloseException. Since IO during container creation is single-threaded, this is sufficient: it should never need to handle ClosedChannelException/InterruptDetectedException, both of which signal that another thread saw interrupt on the container channel. RAFContainer#run(STUBBIFY_ACTION) is part of the removeContainer operation which should happen after the container is closed, so it should be single-threaded on the container as well(?). It should handle ClosedByInterruptException and AsynchronousCloseException and do retry, but doesn't, currently. If we let writeAtOffset clean up just like writePage, RAFContainer4#writeAtOffset (i.e.also writeHeader) would only only throw InterruptDetectedException, i.e. another thread saw interrupt, so retry. This would simplify logic in RAFContainer: we could remove the retry logic from RAFContainer#run(CREATE_CONTAINER_ACTION). This could also cover retry logic for RAFContainer#run(STUBBIFY_ACTION) wrt its use of writeRAFHeader. Next, RAFContainer#clean is already handling InterruptDetectedException and would with this change no longer see ClosedByInterruptException, AsynchronousCloseException or ClosedChannelException. This should solve DERBY-5325 (this bug). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1148354 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/data/RAFContainer4.java", "hunks": [ { "added": [], "header": "@@ -622,10 +622,6 @@ class RAFContainer4 extends RAFContainer {", "removed": [ " // Recovery is in progress, wait for another", ...
derby-DERBY-5328-cee7de4b
DERBY-5328: Improve the re-entrancy of the NetServlet. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1155367 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetServlet.java", "hunks": [ { "added": [ "\tprivate final static String[] knownLang =", " { \"cs\",\"en\",\"es\",\"de_DE\",\"fr\",\"hu\",\"it\", \"ja_JP\",\"ko_KR\",\"pl\",\"pt_BR\",\"ru\",\"zh_CN\",\"zh_TW\" };", " ...
derby-DERBY-5336-c5a71001
DERBY-5336: Repeated database creation causes OutOfMemoryError Clean up context when the daemon is shut down. Added regression test, more or less copied from patch provided by Aja Walker (aja at ajawalker dot com). Patch file: derby-5336-1a-remove_context_on_stop.diff derby-5336-2a-regression_test.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1160593 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5338-f30426b5
DERBY-1903 Convert largedata/LobLimits.java to junit DERBY-5308 Investigate if largeData/LobLimits.java can be run for client Patch derby-1903_client_diff.txt enables client for largedata.LobLimitsLite. It disables the test cases that fail with client: DERBY-5338 client gives wrong SQLState and protocol error inserting a 4GB clob. Should be 22003 DERBY-5341 : Client allows clob larger than column width to be inserted. DERBY-5317 cannot use setCharacterStream with value from C/Blob.getCharacterStream Also fixes the test to fail if we do not get an exception for negative test cases and fixes a javadoc warning. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1147335 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-00b0dbe4
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Add a test case to verify that the WHEN clause SPS is invalidated and recompiled if one of its dependencies requests a recompilation. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1529145 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-05b022f3
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Fix incorrect null check when merging subqueryTrackingArray and materializedSubqueries in GenericStatementContext.setTopResultSet(). Used to cause NullPointerException in some cases when a WHEN clause contained a subquery. Add more tests for scalar subqueries in WHEN clauses. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1532666 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-1725dd14
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Add the WHEN clause syntax to the grammar and wire it together with the existing partial code for the WHEN clause. Make RowTriggerExecutor and StatementTriggerExecutor execute the WHEN clause and use the result to decide whether the trigger action should be executed. Add some basic positive tests for the currently supported subset of the functionality. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1523965 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java", "hunks": [ { "added": [], "header": "@@ -227,7 +227,6 @@ class CreateTriggerNode extends DDLStatementNode", "removed": [ "\t * @param whenOffset\t\t\toffset of start of WHEN clause" ...
derby-DERBY-534-211adc3c
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Remove logic in the readExternal() and writeExternal() methods of TriggerInfo and TriggerDescriptor that was originally put there for compatibility between different Derby versions. Since these objects are only persisted as part of a stored prepared statement, and Derby always clears all stored prepared statements on version change, there is no requirement that TriggerInfo and TriggerDescriptor instances written by one Derby version must be possible to read by other Derby versions. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1535654 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDescriptorGenerator.java", "hunks": [ { "added": [ " return new TriggerDescriptor(" ], "header": "@@ -378,12 +378,7 @@ public class DataDescriptorGenerator", "removed": [ " ...
derby-DERBY-534-50734d82
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Make the code in TriggerDescriptor.getActionSPS() reusable for TriggerDescriptor.getWhenClauseSPS() so that the fixes for DERBY-4874 and Cloudscape bug 4821 also get applied to the WHEN clause. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1531226 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java", "hunks": [ { "added": [ " return getSPS(lcc, false /* isWhenClause */);", " }", "", " /**", " * Get the SPS for the triggered SQL statement or...
derby-DERBY-534-51f910f6
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Disallow references to tables in the SESSION schema in the WHEN clause. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1527993 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java", "hunks": [ { "added": [ " // Throw an exception if the WHEN clause or the triggered SQL", " // statement references a table in the SESSION schema.", " if (refere...
derby-DERBY-534-6a17f800
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Reject references to generated columns in the NEW transition variables of BEFORE triggers, as required by the SQL standard. See also DERBY-3948. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1527489 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-75fbb865
DERBY-534: Add a disabled test case for NPE with subquery in WHEN clause git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1525819 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-a50f8954
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Add more tests. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1540690 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-c955b823
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Add tests to verify that the when clause operates with the privileges of the user that created the trigger, and that exceptions thrown in the WHEN clause are handled gracefully. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1531279 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-d23659a0
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Reuse code for dependency checking of the triggered SQL statement for checking dependencies in the WHEN clause. Add test to verify that attempts to drop columns referenced in the WHEN clause detect that the trigger is dependent on the columns. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1530887 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.compile.Visitable;" ], "header": "@@ -43,6 +43,7 @@ import org.apache.derby.iapi.sql.ResultSet;", "removed": [] ...
derby-DERBY-534-d9878ca0
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Allow references to transition variables and transition tables in the WHEN clause. To support this, a new column WHENCLAUSETEXT is added to the SYS.SYSTRIGGERS table, and a corresponding field is added to the TriggerDescriptor class. The logic that transforms triggered SQL statements to internal syntax for accessing the transition variables and transition tables (via Java method calls and VTIs) is reused on the WHEN clause text so that the same transformation happens there. Upgrade logic is added so that the new column in SYS.SYSTRIGGERS will be created when a database is upgraded from an older version. The WHEN clause is now disabled in the parser when running in soft upgrade mode. An upgrade test case checks that the WHEN clause can only be used in a hard-upgraded database, and that a reasonable error is raised otherwise. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1526831 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java", "hunks": [ { "added": [ " * Class org.apache.derby.impl.sql.catalog.TriggerDescriptor, used for", " * trigger descriptors if the dictionary version is 10.11 or higher.", " ...
derby-DERBY-534-db60062a
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Move common logic for executing WHEN clause and trigger action to the base class GenericTriggerExecutor. In addition to reducing code duplication, the change makes row triggers reuse the prepared statement for the WHEN clause (same as it already does for the trigger action), and it makes statement triggers not leave the before and after result sets open if the WHEN clause evaluates to false. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1524645 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java", "hunks": [ { "added": [ " private SPSDescriptor getAction() throws StandardException" ], "header": "@@ -112,7 +112,7 @@ abstract class GenericTriggerExecutor", "removed":...
derby-DERBY-534-df73e361
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Forbid CREATE TRIGGER statements whose WHEN clause contains a parameter marker or returns a non-BOOLEAN value. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1528401 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-534-ea25568c
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Add dblook support for triggers with a WHEN clause. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1534988 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/dblook/DB_Trigger.java", "hunks": [ { "added": [ " // Column name constants for SYS.SYSTRIGGERS", " private static final String TRIGGERNAME = \"TRIGGERNAME\";", " private static final String SCHEMAID = \"S...
derby-DERBY-5341-f30426b5
DERBY-1903 Convert largedata/LobLimits.java to junit DERBY-5308 Investigate if largeData/LobLimits.java can be run for client Patch derby-1903_client_diff.txt enables client for largedata.LobLimitsLite. It disables the test cases that fail with client: DERBY-5338 client gives wrong SQLState and protocol error inserting a 4GB clob. Should be 22003 DERBY-5341 : Client allows clob larger than column width to be inserted. DERBY-5317 cannot use setCharacterStream with value from C/Blob.getCharacterStream Also fixes the test to fail if we do not get an exception for negative test cases and fixes a javadoc warning. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1147335 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5342-400ea2e0
DERBY-5342: make ScriptTestCase support ij properties This patch was contributed by Houx Zhang (houxzhang at gmail dot com) This patch refactors the ij utilMain class so that the code that supports the properties: - ij.showNoConnectionsAtStart - ij.showNoCountForSelect is extracted into a separate method so that it can be called from goScript. In addition, ScriptTestCase is modified so that it sets these properties to 'true' (other test cases may subsequently set them to 'false' for testing purposes). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1151691 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/ij/utilMain.java", "hunks": [ { "added": [ "\t\t\tsupportIJProperties(connEnv[currCE]);" ], "header": "@@ -239,23 +239,7 @@ public class utilMain implements java.security.PrivilegedAction {", "removed": [ ...
derby-DERBY-5343-09ecd71c
DERBY-5343: Upgrade tests failing with java.lang.IllegalAccessException Rework the workaround for DERBY-23 added by DERBY-5316 so that it doesn't attempt to modify final fields. Modifying final fields doesn't seem to work prior to Java 5. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1148302 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5344-8c86e54c
DERBY-1903 convert LobLimits.java test to JUnit Enable updateClob2 test for client and lite configuration. It is still disabled for embedded in LobLimitsTest because of DERBY-5344 updateClob2 test in LobLimitsTest gets OutOfMemoryError git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1149662 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5346-6708cb9a
DERBY-5346: ij3Test fails on phoneME Make the test use a data source instead of a connection URL on CDC/Foundation Profile. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1148687 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5347-d34c2ceb
DERBY-5347 Derby loops filling logs and consuming all CPU with repeated error: java.net.SocketException: EDC5122I Input/output error. If accept does not block and continues to throw errors, retry and log the exception two more times times at 1 second intervals and then if it still fails, shutdown the server. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1203050 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/ClientThread.java", "hunks": [ { "added": [ " try { // Check for PrivilegedActionException", " clientSocket =", " acceptClientWithRetry();"...
derby-DERBY-5357-78c2db1d
DERBY-5357 SQLJ.INSTALL_JAR shouldn't use identifier as file name Since SQL identifiers can contain arbitrary characters, it is not safe to use them as is as part of a file name. Trying ot map parts of the name by excluding unsafe characters leads to a chance of name collision. So, we have changed the naming altogether. This patch, derby-5357-with-tests-4, changes the name (and location) of the jar files stored in a database. The name is now based on UUID, and no subdirectories under the directory "jar" are used: all jar-files reside directly in the "jar" database directory, and the name is of the form <Derby uuid string>[.]jar[.]G[0-9]+ where <Derby uuid string> has the form hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh where h id a lower case hex digit, and the suffix ".G[0-9]+" is the version number as before. The format is changed on hard upgrade, cf tests in Changes10_9. Also, dblook has been updated to cater for this change. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1302836 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDescriptorGenerator.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.sanity.SanityManager;" ], "header": "@@ -45,6 +45,7 @@ import org.apache.derby.catalog.UUID;", "removed": ...
derby-DERBY-5358-5355fd27
DERBY-5358: SYSCS_COMPRESS_TABLE failed with conglomerate not found exception Make TableDescriptor.heapConglomNumber volatile to ensure that getHeapConglomerateId() never sees a partly initialized value. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1354015 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java", "hunks": [ { "added": [ "", " /**", " * <p>", " * The id of the heap conglomerate for the table described by this", " * instance. The value -1 mea...
derby-DERBY-5363-8bdf7afe
DERBY-5363 Tighten default permissions of DB files with >= JDK6 Patch derby-5363-followup, which adds a missing accessController block around setting the system property SERVER_STARTED_FROM_CMD_LINE. Without the patch, this would fail if running with a security manager specified on the command line. If the property permission is missing, the error is printed unconditionally and exit(1) from main is taken. Cf. DERBY-5413 which tried another (aborted) approach to make sure it got printed. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1177718 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetworkServerControl.java", "hunks": [ { "added": [ "import java.security.AccessController;", "import java.security.PrivilegedExceptionAction;" ], "header": "@@ -25,6 +25,8 @@ import java.io.PrintWriter;", "...
derby-DERBY-5363-a6026ca8
DERBY-5363 Tighten permissions of DB files to owner with >= JDK7 Patch derby-5363-followup-linux. RestrictiveFilePermissionsTest for this feature broke on some platforms (thanks to Kathey for noticing). Apparently, the ACL view of Posix file system permissions is not available for all Unix/Linux versions in JDK 1.7 (I had tested on Solaris 11 and Windows). The changes in the test now fall back on using PosixFileAttributeView#readAttributes if the ACL view is not available. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1179042 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5363-a65a5980
DERBY-5363 Tighten permissions of DB files to owner with >= JDK7 Patch derby-5363-limit-to-java7b, which limits the default restrictive permission for the network server further: only on Java 7 or higher. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1179320 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetworkServerControl.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.info.JVMInfo;" ], "header": "@@ -29,6 +29,7 @@ import java.security.AccessController;", "removed": [] } ] }, { ...
derby-DERBY-5363-dc43cf84
DERBY-5363 Tighten default permissions of DB files with >= JDK6 Patch derby-5363-full-5 implements the ability to restrict file permission of newly created directories and files beyond the default access (cf. umask on Posix file systems and similar on NTFS), i.e. to the account creating the file. This behavior is controlled by a property, "derby.storage.useDefaultFilePermissions", cf the release notes attached to issue. By default the property is true, i.e. gives the existing (lax) behavior on embedded and with the network server if started via the API. If the server is started from the command line, the new restrictive permissions apply by default. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1176591 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DssTrace.java", "hunks": [ { "added": [ "import java.security.AccessControlException;", "import org.apache.derby.iapi.services.io.FileUtil;" ], "header": "@@ -24,10 +24,12 @@ import java.io.File;", "rem...
derby-DERBY-5363-ff249585
DERBY-5363 Tighten permissions of DB files to owner with >= JDK7 Patch derby-5363-followup-unix. It turns out there is no guarantee the the underlying file system supports ACLs even though Files#getFileAttributeView called with aclFileAttributeViewClz.class as an argument returns an object. We also need to call the method: FileStore#supportsFileAttributeView(AclFileAttributeView.class) to ascertain whether we have support for ACLs. To get at the current FileStore, we need to inquire about that given a path: Files.getFileStore(<path>) which requires the RuntimePermission "getFileStoreAttributes", hence the current patch's changes to the policy files. With the patch, RestrictiveFilePermissionsTest run OK on Solaris/UFS. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1180713 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/FileUtil.java", "hunks": [ { "added": [ " private static Class fileStoreClz;", " private static Method supportsFileAttributeView;", " private static Method getFileStore;" ], "header"...
derby-DERBY-5367-9a3cbedf
DERBY-5367: Stale data retrieved when using new collation=TERRITORY_BASED:PRIMARY feature Deoptimize code path for BTree insert when updating columns with a collation different from UCS BASIC. Simply undeleting the existing matching row (marked as deleted) may be incorrect, because the value stored there can be different from the key value used for lookup due to the collation. Added code to track whether a conglomerate contains a collated column or not, such that the right insert code path can be chosen. The array of collation ids is scanned when a conglomerate is created, and when a conglomerate is "restored" from disk (i.e. readExternal). Added a test for the new code path (based on the issue report). Patch file: derby-5367-4c-fix_with_optimization_improved.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1174436 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/BTree.java", "hunks": [ { "added": [], "header": "@@ -57,8 +57,6 @@ import java.io.ObjectInput;", "removed": [ "import org.apache.derby.iapi.services.io.ArrayUtil;", "" ] }, ...
derby-DERBY-5369-0d2a54f3
DERBY-5369: Checkin Brett Bergquist's patch to add != to the list of operators supported by restricted table functions. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1160858 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-537-3cfc8572
DERBY-537 (partial) Change the DatabaseClassLoadingTest to install and replace the jar files using the SupportFilesSetup decorator so that the engine will have the correct permissions to read the jar files. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@473780 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-537-609999f7
DERBY-537 (partial) Remove some dead code for handling jar files stored within the database. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@474376 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/store/access/FileResource.java", "hunks": [ { "added": [], "header": "@@ -22,7 +22,6 @@", "removed": [ "import org.apache.derby.iapi.store.access.DatabaseInstant;" ] }, { "added": [ "\t...
derby-DERBY-537-66f66a11
DERBY-537 Fix sqlj.replace_jar and sqlj.remove_jar to work under a security manager. Add a test to test the simple mechanics of the the sqlj functions separated from the jar files being active on the database class path. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@483738 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/JarUtil.java", "hunks": [ { "added": [ " long generationId = setJar(jarExternalName, is, true, 0L);" ], "header": "@@ -133,7 +133,7 @@ class JarUtil", "removed": [ " long ...
derby-DERBY-537-6989c4c7
DERBY-537 (partial) Cleanup JarUtil removing code that is never called and making class package private. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@473416 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/JarUtil.java", "hunks": [ { "added": [ "class JarUtil" ], "header": "@@ -48,12 +48,8 @@ import java.sql.CallableStatement;", "removed": [ "public class JarUtil", "\tpublic static fina...
derby-DERBY-537-9fef6397
DERBY-537 (partial) Call FileResource.add in a privleged block when executing code to add a jar, driven by sqlj.install_jar. Allows one test fixture in DatabaseClassLoadingTest to be executed with a security manager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@473834 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/JarUtil.java", "hunks": [ { "added": [], "header": "@@ -39,7 +39,6 @@ import org.apache.derby.iapi.sql.depend.DependencyManager;", "removed": [ "import org.apache.derby.iapi.services.io.FileUtil;" ] ...
derby-DERBY-537-a4b59331
DERBY-709, committing on behalf of Suresh Thalamati -- Removed the requirement for read permission on "user.dir" for backup to run under security manager. Absolute Path were used only to log into backup history file. Changed it to log canonical paths only if it can be obtainer ,otherwise only relative paths are written to the backup history file. -- Added a missing privileged blocks to the save service.properties file into the backup. -- Added privileged blocks for test util file functions that are called through SQL functions/procedures. -- Enabled some of the tests which were not running under security manager earlier because of this bug to run by default with security manager. Backup tests that test backup with jar Operations still can not be run under security manager due to bug DERBY-537. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@381389 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/RawStore.java", "hunks": [ { "added": [ " private static final int REGULAR_FILE_GET_CANONICALPATH_ACTION = 15;", " private static final int STORAGE_FILE_GET_CANONICALPATH_ACTION = 16;" ], "header":...
derby-DERBY-537-ed1c2e3b
DERBY-537 (partial) Fix the reading of the jar file (through a URL or file name) for sqlj.install_jar and replace_jar to be under a privileged block. Switched the order of lookup from the jar path to be URL and then as a file name. Otherwise a security exception is thrown trying to open the URL path as a file name. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@473828 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/FileUtil.java", "hunks": [ { "added": [], "header": "@@ -26,7 +26,6 @@ import org.apache.derby.io.WritableStorageFactory;", "removed": [ "import java.net.*;" ] } ] }, { "file": "java/en...
derby-DERBY-5370-8f23d8f7
DERBY-5370: Checkin in Brett Bergquist's patch to make Restriction.toSQL() handle more data types. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1160445 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5374-ce63a70b
DERBY-5374; converted ij5Test fails with weme6.2 (CDC/Foundation): junit.framework.ComparisonFailure: Output at line 1 expected:<CONNECTION0* - jdbc:derby:wombat> but was:<ERROR XJ004: Database '' not found.> skipping the test with JSR169/CDC/Foundation. Also correcting a comment. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1155163 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5377-8454e15e
DERBY-5377; AssertionFailedError in testCaseCS4595B_NonUniqueIndex in AccessTest Adjusting the test to not check for pages visited in assertStatsOK method if 'null' is passed in for the expPages parameter, and passing in 'null' with the three queries that have shown to hit this issue. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1306596 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5377-efe47b40
DERBY-5377: AssertionFailedError in testCaseCS4595B_NonUniqueIndex in AccessTest Dump the statistics on assert failures to help debugging the problem. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1227121 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5379-2198fafc
DERBY-5379 testDERBY5120NumRowsInSydependsForTrigger - The number of values assigned is not the same as the number of specified or implied columns. DERBY-5484 Upgradetest fails with upgrade from 10.8.2.2 (7 errors, 1 failure) on trunk The above 2 jiras are duplicates. The upgrade tests are failing when doing an upgrade from 10.8.2.2 to trunk. The tests that are failing were written for DERBY-5120, DERBY-5044. Both these bugs got fixed in 10.8.2.2 and higher. The purpose of these tests is to show that when the tests are done with a release with those fixes missing, we will see the incorrect behavior but once the database is upgraded to 10.8.2.2 and higher, the tests will start functioning correctly. The problem is that we do not recognize that if the database is created with 10.8.2.2, then we will not the problem behavior because 10.8.2.2 already has the required fixes in it for DERBY-5120 and DERBY-5044. I have fixed this by making the upgrade test understand that incorrect behavior would be seen only for releases under 10.8.2.2 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1203252 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5382-4ee7918f
DERBY-5382; Convert existing harness recovery tests to JUnit tests Adjusting OCRecoveryTest to create the database in the first launched method. Modifying TestConfiguration to this end to look for a property 'derby.tests.defaultDatabaseName' which can get passed on in a new BaseTestCase method ((assertLaunchedJUnitTestMethod(String, String)). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1294805 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java", "hunks": [ { "added": [ " // Check for possibly passed in DatabaseName", " // this is used in OCRecoveryTest", " String propDefDbName = getSystemProperties().getPro...
derby-DERBY-5382-e06ed553
DERBY-5382; Convert existing harness recovery test to JUnit tests follow up patch, which - removes shutdowns which were preventing any recovery to happen - makes the first step a separate forkable method - adds some comments git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1293028 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5390-8f874691
DERBY-5390: NPE in BasicDatabase.stop in replication slave mode (dd.clearSequenceCaches) Added check to see if the data dictionary is available. Patch file: derby-5390-1a_check_for_null.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1164358 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/db/BasicDatabase.java", "hunks": [ { "added": [ " // The data dictionary is not available if this database has the", " // role as an active replication slave database.", " if (dd != null) {", ...
derby-DERBY-5391-70ff9b02
DERBY-5391: Fix the statement duration and error log reader vtis to handle the new timestamp format which we've been using in Derby logs since 10.7. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1162827 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/diag/ErrorLogReader.java", "hunks": [ { "added": [ "\tprivate int endTimestampIndex;" ], "header": "@@ -89,7 +89,7 @@ public class ErrorLogReader extends VTITemplate", "removed": [ "\tprivate int gmtIndex;" ...
derby-DERBY-5393-6d2e2b6d
DERBY-5393: Remove old in-memory database purge mechanism Removed deprecated functionality. Patch file: derby-5393-1a.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1164370 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java", "hunks": [ { "added": [], "header": "@@ -63,26 +63,6 @@ public class VFMemoryStorageFactory", "removed": [ " /**", " * TODO: Remove this method once the new mechanism has be...
derby-DERBY-5395-431cefd7
DERBY-5395: Let only the DBO run certain diagnostic vtis. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1163740 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/diag/ErrorLogReader.java", "hunks": [ { "added": [ "import java.security.PrivilegedAction;", "import java.security.AccessController;" ], "header": "@@ -26,6 +26,8 @@ import java.io.FileNotFoundException;", "rem...
derby-DERBY-5398-c8986dff
DERBY-5398: Use a transient transaction to flush unused sequence values back to disk during orderly engine shutdown. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1166859 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.i18n.MessageService;", "import org.apache.derby.iapi.services.monitor.Monitor;", "import org.apache.derby.iapi.store.acce...
derby-DERBY-540-bf4839e7
DERBY-540 Do not prepend database name for classpath databases with leading slash.This causes databases to be not found when in jar files on the database. Correct the lookup of resources in the class path storage factory to not use the methods that prepend the current class name, instead use methods from ClassLoader directly. The leading slash was incorrectly added to avoid the automatic package prepending performed by Class.getResource. Removed code that tried to optimise not using the thread context class loader, simply have a fixed lookup for resources of thread context class loader followed by class loader for Derby/system classloader. Add lang/dbjar.sql to test databases within a jar and within a jar on the classpath and class loading from such databases. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@240111 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/io/CPFile.java", "hunks": [ { "added": [ "" ], "header": "@@ -21,13 +21,9 @@", "removed": [ "import org.apache.derby.io.StorageRandomAccessFile;", "", "import org.apache.derby.iapi.serv...
derby-DERBY-5406-35549162
DERBY-5406: Intermittent failures in CompressTableTest and TruncateTableTest Detect if a statement is invalidated while it is being recompiled and retry the compilation. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1175785 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java", "hunks": [ { "added": [ " /** True if the statement was invalidated while it was being compiled. */", " private boolean invalidatedWhileCompiling;" ], "header": "@@ -147,6...
derby-DERBY-5406-6555d3ce
DERBY-5406: Intermittent failures in CompressTableTest and TruncateTableTest If GenericActivationHolder determines that a recompile is needed, it now throws an exception to signal that to the caller instead of doing the recompilation itself. This way, if the statement is invalidated again during the recompilation, the already existing retry logic in the caller (that is, GenericPreparedStatement.executeStmt()) will be used to detect that the recompilation must be retried. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1189067 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java", "hunks": [ { "added": [ " final boolean needNewClass =", " gc == null || gc != ps.getActivationClass();", "\t\t\tif (needNewClass || !ac.isValid())", ...
derby-DERBY-5406-878e2115
DERBY-5406: Intermittent failures in CompressTableTest and TruncateTableTest Retry compilation if it fails because a conglomerate has disappeared. This may happen if DDL, compress, truncate or similar operations happen while the statement is being compiled. When trying again, the compilation should find the new conglomerate if one exists, or fail with a proper error message if the SQL object has been removed. This is a workaround for a race condition in the dependency management. When binding a statement, the compiler typically builds descriptor objects (like a TableDescriptor) from the system tables and then registers the statement as a dependent on that descriptor. However, another thread may at the same time be invalidating all dependents of that descriptor. It is possible that this happens right before the current statement has been registered as a dependent, and it will never see the invalidation request. Once it actually tries to access the conglomerate associated with the descriptor, it will fail with a "conglomerate does not exist" error, and since the statement did not see the invalidation request, the compiler doesn't know that it should retry the compilation. This fix also backs out the changes made in revision 1187204, as they addressed a subset of the cases handled by this broader fix, and are not needed any more. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1234776 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/GenericStatement.java", "hunks": [ { "added": [ " String prevErrorId = null;", " boolean recompile = false;", " } catch (StandardException se) {", " // There is ...
derby-DERBY-5406-be1b5ea1
DERBY-5406: Intermittent failures in CompressTableTest and TruncateTableTest Push retry logic down to GenericStatement.prepare() so that it also covers the code path from Connection.prepareStatement(). The previous location only covered compilations requested by the execute methods. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1190220 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java", "hunks": [ { "added": [ " boolean invalidatedWhileCompiling;" ], "header": "@@ -148,7 +148,7 @@ public class GenericPreparedStatement", "removed": [ " private bool...
derby-DERBY-5406-d0c5d9c0
DERBY-5406: Intermittent failures in CompressTableTest and TruncateTableTest Make sure the statement receives an invalidation request if the conglomerate disappears before FromBaseTable has created the dependency on the table descriptor. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1187204 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.depend.DependencyManager;", "" ], "header": "@@ -53,6 +53,8 @@ import org.apache.derby.iapi.sql.compile.RequiredRowOrderin...
derby-DERBY-5407-55d3591d
DERBY-5407 When run across the network, dblook produces unusable DDL for VARCHAR FOR BIT DATA columns. The serialization of UDT associated with SYSCOLUMNS.COLUMNBDATATYPE on the wire from the network server end happens correctly. The same serialized data is received by the client but when we try to instantiate the UDT's TypeDescriptor based on this serialized data, we get confused between "VARCHAR () FOR BIT DATA" and "VARCHAR FOR BIT DATA". The deserialization on the client side happens through BaseTypeIdImpl.getTypeFormatId(). Here, we look at the string representation of the type descriptor that we received on the wire and choose the appropriate format id based on that string. The problem is in this BaseTypeIdImpl.getTypeFormatId() code, where the code looks for "VARCHAR FOR BIT DATA" rather than "VARCHAR () FOR BIT DATA" (notice the missing parentheses) else if ( "VARCHAR FOR BIT DATA".equals( unqualifiedName ) ) { return StoredFormatIds.VARBIT_TYPE_ID_IMPL; } Since "VARCHAR FOR BIT DATA" and "VARCHAR () FOR BIT DATA" do not match, we do not use format id VARBIT_TYPE_ID_IMPL. Later, we go through a switch statement based on the format id in BaseTypeIdlImpl.toParsableString(TypeDescriptor). In the switch statement, we are supposed to stuff in the width of the varchar for bit data into the parentheses ie string "VARCHAR () FOR BIT DATA" should get converted into "VARCHAR (NUMBER) FOR BIT DATA" but we don't do it because of getTypeFormatd() code problem explained earlier. To fix this, the patch has added check for If there might be dependencies on the original "VARCHAR FOR BIT DATA" check, then we can add additional check for "VARCHAR () FOR BIT DATA" in addition to the existing check for "VARCHAR FOR BIT DATA" as shown below and that fixes the problem else if ( "VARCHAR FOR BIT DATA".equals( unqualifiedName ) ) { return StoredFormatIds.VARBIT_TYPE_ID_IMPL; } else if ( "VARCHAR () FOR BIT DATA".equals( unqualifiedName ) ) { return StoredFormatIds.VARBIT_TYPE_ID_IMPL; } This commit does similar thing for "CHAR FOR BIT DATA", ie in addition to the existing test for "CHAR FOR BIT DATA", it adds a check for "CHAR () FOR BIT DATA". Keeping the existing checks will not break any dependencies that might exist on "VARCHAR FOR BIT DATA" check and "CHAR FOR BIT DATA" check. Have added a test for SYSCOLUMNS.COLUMNBDATATYPE for all the supported data types. This test will be run in both embedded and network server mode. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1364690 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5409-0c8f5852
DERBY-5409: GrantRevokeDDLTest fails under Java 7 Drop created schemas in test cases to prevent interference when test cases run in a different order than the order in which they appear in the source file. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1170470 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5412-dc5f56a1
DERBY-5412: MemoryLeakFixesTest.testRepeatedDatabaseCreationWithAutoStats() fails on phoneME: java.lang.InternalError: Number of class names exceeds vm limit. BaseTestCase: Added helper method isPhoneME() that checks if the test is running on a phoneME platform. OldVersions and lang._Suite: Replaced existing checks for phoneME with the new helper method. MemoryLeakFixesTest: Added assertion to verify that database was successfully shut down. Added manually invoked garbage collection on phoneME to avoid exceeding internal limit on number of class names. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1171665 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5413-8bdf7afe
DERBY-5363 Tighten default permissions of DB files with >= JDK6 Patch derby-5363-followup, which adds a missing accessController block around setting the system property SERVER_STARTED_FROM_CMD_LINE. Without the patch, this would fail if running with a security manager specified on the command line. If the property permission is missing, the error is printed unconditionally and exit(1) from main is taken. Cf. DERBY-5413 which tried another (aborted) approach to make sure it got printed. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1177718 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetworkServerControl.java", "hunks": [ { "added": [ "import java.security.AccessController;", "import java.security.PrivilegedExceptionAction;" ], "header": "@@ -25,6 +25,8 @@ import java.io.PrintWriter;", "...
derby-DERBY-5416-eebc9c71
DERBY-5416: SYSCS_COMPRESS_TABLE causes an OutOfMemoryError when the heap is full at call time and then gets mostly garbage collected later on. Improve the accuracy of the code that estimates the memory requirement of the sort buffer. When it detects that the current memory usage is lower than the initial memory usage, it now records the current usage and uses that value instead of the initial memory usage in future calculations. This compensates to some degree, but not fully, for the skew in the estimates due to garbage collection happening after the initial memory usage. The memory requirement will not be as badly underestimated, and the likelihood of OutOfMemoryErrors is reduced. There is no regression test case for this bug, since the only reliable, reproducible test case that we currently have, needs too much time, disk space and memory to be included in the regression test suite. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1550103 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/sort/MergeInserter.java", "hunks": [ { "added": [ " private long beginMemoryUsage;" ], "header": "@@ -62,9 +62,7 @@ final class MergeInserter implements SortController", "removed": [ "\tpri...
derby-DERBY-5420-df9ed37d
DERBY-5420 Regression suite appears locale sensitive: failed in TableLockBasicTest: bug in RealBasicNoPutResultSetStatistics Patch derby-5420-2 changes the way the localization of the floating point numbers is done for RealBasicNoPutResultSetStatistics to use an explicit decimal format in the localized message text itself. When the double argument is henceforth filled in, the locale is already set correctly (in MessageBuilder), so the the decimal point/comma will be chosen correctly according to locale. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1176633 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyBuild/MessageBuilder.java", "hunks": [ { "added": [ "import java.util.regex.Matcher;", "import java.util.regex.Pattern;" ], "header": "@@ -27,13 +27,14 @@ import java.io.IOException;", "removed": [ "imp...
derby-DERBY-5421-3d7c2eab
DERBY-5421; NullPointerException during system.nstest.utils.Dbutil.update_one_row merging 1177446 from 10.8 to trunk git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1177475 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/system/nstest/utils/DbUtil.java", "hunks": [ { "added": [ "\t" ], "header": "@@ -226,16 +226,7 @@ public class DbUtil {", "removed": [ "\t\tif (ps != null) {", "\t\t\ttry {", "\t\t\t...
derby-DERBY-5424-b7d90735
DERBY-5424 On z/OS testConnectWrongSubprotocolWithSystemProperty(org.apache.derbyTesting.functionTests.tests.tools.ConnectWrongSubprotocolTest)junit.framework.AssertiFailedError Fix code and test to read and write to service.properties with a consistent encoding git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1350361 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java", "hunks": [ { "added": [ "import java.io.InputStreamReader;" ], "header": "@@ -47,6 +47,7 @@ import java.io.FileReader;", "removed": [] }, { "added": ...
derby-DERBY-5425-91f376cc
DERBY-5425: Updateable holdable ResultSet terminates early after 65638 updates Use a BackingStoreHashtable to store rows updated in such a way that they may be seen again later in the scan. The BackingStoreHashtable is made holdable if the ResultSet is holdable so that rows are not lost on commit, as they were before. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1359052 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java", "hunks": [ { "added": [], "header": "@@ -30,15 +30,12 @@ import org.apache.derby.iapi.sql.execute.ExecRow;", "removed": [ "import org.apache.derby.iapi.sql.ResultSet;", "impor...
derby-DERBY-5426-68c72e70
DERBY-5426: Improve error message for too much contention on a sequence/identity. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1174290 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java", "hunks": [ { "added": [ " // ABSTRACT OR OVERRIDABLE BEHAVIOR TO BE IMPLEMENTED BY CHILDREN" ], "header": "@@ -155,7 +155,7 @@ public abstract class SequenceUpdater implements Cacheable...
derby-DERBY-5426-db26d0a6
DERBY--5445 (Enhance existing concurrency test to stress sequence generators to also stress identity columns) DERBY-4565 added a concurrency test to stress sequence generation. I am making simple modifications to that test to add identity column stress testing. Based on a command line parameter, the test will either do sequence generation testing or identity column testing. If no parameter is specified, it will default to doing sequene generation testing. The test already takes number of parameters. One of those parameters is load options parameter. Load option parameter is indicated by -load_opts on command line and it is followed by a comma separated list of sub-parameters. An eg of load option parameter is as follows -load_opts debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100 I am adding another pair to the comma separated sub-parameters,namely identityTest=aNumber. If identityTest is 1, then the test will do identity column stress testing. For any other value for identityTest, the test will do sequence generation testing. If the user doesn't specify identityTest in load options, the test will perform sequence generation testing. eg of asking the test to do identity column testing java org.apache.derbyTesting.perf.clients.Runner -driver org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100,identityTest=1 -gen b2b -threads 10 Two possible way of asking the test to do sequence generation testing(identityTest set to a value other than 1 or identityTest is not specified) java org.apache.derbyTesting.perf.clients.Runner -driver org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100,identityTest=2 -gen b2b -threads 10 OR java org.apache.derbyTesting.perf.clients.Runner -driver org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100 -gen b2b -threads 10 When I run the test for identity columns, I can consistently see it running into derby lock time out with nested sequencec contention error while trying to get current identity value and advancing(this is what we want to achieve from the test ie that it is able to stress the functionality enough to run into contention while trying to get next range for identity columns.) Additionally, there are some lock time out errors raised by store while trying to update system catalog(this is expected too because of multiple threads simulataneously trying to do inserts into a table with identity column). I also in my codeline reverted to changes before DERBY-5426 (DERBY-4526 is Improve the error raised by too much contention on a sequence/identity.) was fixed and saw sequence contention errors (without the lock time out error encapsulation). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1179374 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/perf/clients/Runner.java", "hunks": [ { "added": [ " System.out.print(\"initializing database for \");", " System.out.println((Runner.getLoadOpt( \"identityTest\", 0 ) == 1)?", " \t\t...
derby-DERBY-5438-04c92ef6
DERBY-5438: Empty MAPS table in toursdb - Let insertMaps.main() throw exceptions instead of just printing them to make errors stop the build - Change URL in insertMaps to match the URL in build.xml - Change directory for the process running insertMaps so that it finds the gif files git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1177589 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/demo/toursdb/insertMaps.java", "hunks": [ { "added": [ "\tpublic static final String dbURLCS = new String(\"jdbc:derby:toursdb\");", "\t\tSystem.out.println(\"Loading the Derby jdbc driver...\");", "\t\tClass.forName(CSdriver).newInstance();", ...
derby-DERBY-5440-910eb101
DERBY-5440: test failure in testBTreeForwardScan_fetchRows_resumeAfterWait_nonUnique_split(org.apache.derbyTesting.functionTests.tests.store.IndexSplitDeadlockTest)junit.framework.AssertionFailedError: expected:<1> but was:<0> git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1181756 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5444-859720d8
DERBY-5444: SpawnedProcess.complete may fail to destroy the process when a timeout is specified Rewrote loop logic to ensure that the process is destroyed when a timeout is specified and exceeded. Patch file: derby-5444-1c-destroy_on_timeout.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1179546 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java", "hunks": [ { "added": [ " final long start = System.currentTimeMillis();", " boolean timedOut = true;", " exitCode = javaProcess.exitValue();", ...
derby-DERBY-5447-b8339336
DERBY-5447: Deadlock in AutomaticIndexStatisticsTest.testShutdownWhileScanningThenDelete (BasePage.releaseExclusive and Observable.deleteObserver (BaseContainerHandle)) Clean the daemon context only after the running worker thread (if any) has finished to avoid Java deadlock when closing the container handles obtained with the context. The deadlock is intermittent, but can easily be reproduced, and involves synchronization in BasePage and in java.util.Observable. Patch file: derby-5447-2a-change_istat_shutdown.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1180790 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java", "hunks": [ { "added": [ " // Controls execution of last cleanup step outside of the synchronized", " // block. Should only be done once, and this is ensured by the gu...
derby-DERBY-5449-90e6ec94
DERBY-5449: 10.8 client with 10.5 server gives ClassCastException Convert BOOLEAN parameter values to SMALLINT (and not only the parameter meta-data) when talking to old servers that don't understand BOOLEAN. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1186020 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5453-5250aca2
DERBY-5453: Remove unused methods in Cursor and NetCursor git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1181713 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/Cursor.java", "hunks": [ { "added": [], "header": "@@ -126,12 +126,6 @@ public abstract class Cursor {", "removed": [ " public Cursor(Agent agent, byte[] dataBuffer) {", " this(agent);", "...
derby-DERBY-5454-23e8c92e
DERBY-5454; ERROR 40001 deadlock in nstest on select max(serialkey) replacing the code causing the intermittent deadlock with non-jdbc calls git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1311804 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/system/nstest/utils/DbUtil.java", "hunks": [ { "added": [], "header": "@@ -24,7 +24,6 @@ package org.apache.derbyTesting.system.nstest.utils;", "removed": [ "import java.sql.ResultSet;" ] }, { ...
derby-DERBY-5456-0086962a
DERBY-5456: Make the network server more diligent about collecting up all of the local addresses which it can. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1183463 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ " localAddresses = new ArrayList(3);", " localAddresses.add(bindAddr);", " ", " try { localAddresses.add(InetAddress.getLo...
derby-DERBY-5459-f9a06892
DERBY-5459 Result set metadata are out of sync on client after underlying table is altered Patch derby-5459-3. We now resend the result set metadata to the client when the cursor is opened if the prepared statement gets recompiled due to it being out of date when the server tries to execute it (DRDAConnThread line 871). To detect this we introduce a version counter which is incremented each time a statement is (re)compiled and make a note which version's metadata gets sent to the client as part of the explicit prepare. That version is compared with the current version when we execute to make the decision whether to resend metadata or not. This also fixes DERBY-2402, a duplicate. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1205426 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java", "hunks": [ { "added": [ " database.getCurrentStatement().sqldaType = sqldaType;" ], "header": "@@ -828,6 +828,7 @@ class DRDAConnThread extends Thread {", "removed": [...
derby-DERBY-5463-404a2f06
DERBY-5463: Don't alter the value of drdamaint when generating a new release.properties file; commit derby-5463-01-aa-leaveDRDAmaintIDAlone.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1557823 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyPreBuild/ReleaseProperties.java", "hunks": [ { "added": [ "import java.io.FileInputStream;", "import java.util.Properties;" ], "header": "@@ -22,10 +22,12 @@", "removed": [] }, { "added": [ ...
derby-DERBY-5466-2782d722
DERBY-5466: Enable the new var_pop(), var_samp(), stddev_pop(), and stddev_samp() aggregates by wiring Scott's aggregators into the Derby bind logic. Commit derby-5466-02-ab-bindLogic.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1694918 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ "import org.apache.derby.catalog.TypeDescriptor;", "import org.apache.derby.catalog.types.AggregateAliasInfo;" ], "header": "@@ -23,6 +23,8 @@ package\torg....
derby-DERBY-5466-a37ea514
DERBY-5466: Raise a useful error when someone attempts to use DISTINCT with the statistics aggregates. Commit derby-5466-03-aa-distinctError.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1695154 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ " boolean noSchema = true;", " noSchema = (userAggregateName.getSchemaName() == null );" ], "header": "@@ -349,8 +349,10 @@ class Aggregat...
derby-DERBY-5468-8e9474f0
DERBY-5468: Assertion failed in AutomaticIndexStatisticsMultiTest.testMTSelectWithDDL (expected:<0> but was:<1>) Improves the error reporting such that the cause of the error is reported. Patch file: derby-5468-1a-error_reporting.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1185187 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5472-028d92e6
DERBY-5472: Speed up MemoryLeakFixesTest.testRepeatedDatabaseCreationWithAutoStats() Reduce the amount of statement compilation and the number of iterations to speed up the test case, while preserving the ability to reproduce the original problem. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1186630 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5475-88b42546
DERBY-5475: Formalize use of old Derby distributions in test Expose the release repository in TestConfiguration. Removed some leftover throws IOException, and added some exception handling to avoid one throws IOException clause. Patch file: derby-5475-4a-less_exceptions_and_expose.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1352498 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/DerbyDistribution.java", "hunks": [ { "added": [ " * Derives the information for a Derby distribution.", " *", " File[] productionJars, File[] testingJars) {" ], ...
derby-DERBY-5475-e2f4f825
DERBY-5475: Formalize use of old Derby distributions in tests Added a very simple repository for Derby releases. It is compatible with the existing property used to control where the tests look for old releases (i.e. the upgrade and the compatibility test): derbyTesting.oldReleasePath Added two new classes in the junit test framework directory: o ReleaseRepository The repository, from which you can obtain a list of available Derby distributions that exist on the local machine. o DerbyDistribution Represents an on-disk, JAR-based Derby distribution. The initial repository is very simple, I expect that its functionality may be somewhat extended as tests start using it. Patch file: derby-5475-3a-repository.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1330751 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/ReleaseRepository.java", "hunks": [ { "added": [ "/*", "", " Derby - Class org.apache.derbyTesting.junit.ReleaseRepository", "", " Licensed to the Apache Software Foundation (ASF) under ...
derby-DERBY-5475-e8c9fe3e
DERBY-5475: Formalize use of old Derby distributions in tests Another preparation patch, mostly renaming a class and some methods. Renamed DerbyVersionSimple to Version to indicate that it isn't coded specifically to represent a Derby version - it can be used to represent any version consisting of a major and a minor version component. Made variables final, some formatting changes. Renamed 'atLeastAs' to 'atLeast' to follow existing pattern. Patch file: derby-5475-2a-rename_and_cleanup.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1245349 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/DerbyVersion.java", "hunks": [ { "added": [ " private final Version simpleVersion;" ], "header": "@@ -82,7 +82,7 @@ public class DerbyVersion", "removed": [ " private final DerbyVersionSimpl...
derby-DERBY-5484-2198fafc
DERBY-5379 testDERBY5120NumRowsInSydependsForTrigger - The number of values assigned is not the same as the number of specified or implied columns. DERBY-5484 Upgradetest fails with upgrade from 10.8.2.2 (7 errors, 1 failure) on trunk The above 2 jiras are duplicates. The upgrade tests are failing when doing an upgrade from 10.8.2.2 to trunk. The tests that are failing were written for DERBY-5120, DERBY-5044. Both these bugs got fixed in 10.8.2.2 and higher. The purpose of these tests is to show that when the tests are done with a release with those fixes missing, we will see the incorrect behavior but once the database is upgraded to 10.8.2.2 and higher, the tests will start functioning correctly. The problem is that we do not recognize that if the database is created with 10.8.2.2, then we will not the problem behavior because 10.8.2.2 already has the required fixes in it for DERBY-5120 and DERBY-5044. I have fixed this by making the upgrade test understand that incorrect behavior would be seen only for releases under 10.8.2.2 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1203252 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5486-d3134918
DERBY-5486: Remove useless tests which are causing instabilities in the nightly test runs. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1197272 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5488-10608cf4
DERBY-5488: Move BigDecimal getters/setters from JDBC 2.0 implementation into JSR 169 implementation. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1197264 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java", "hunks": [ { "added": [ "import java.math.BigDecimal;" ], "header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.sanity.SanityManager;", "removed": [] } ] }...
derby-DERBY-5488-57c1b5cf
DERBY-5488: Add JDBC limit/offset escape syntax. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1200492 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java", "hunks": [ { "added": [ "\t * @param fetchFirstMethod The FETCH FIRST/NEXT parameter was specified", "\t * @param hasJDBClimitClause True if the offset/fetchFirst clauses were added by JDBC LIM...
derby-DERBY-5488-59f54f8f
DERBY-5488: First changes to implement new JDBC 4.1 object mappings. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1196680 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5488-955f104b
DERBY-5488: Add a couple additional limit/offset tests. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1201041 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-5488-96748ad1
DERBY-5488: Eliminate some NPEs in ParameterMappingTest when run on OJEC. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1199392 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/BigIntegerDecimal.java", "hunks": [ { "added": [ "import java.math.BigDecimal;" ], "header": "@@ -21,6 +21,7 @@", "removed": [] }, { "added": [ "\tpublic Object\tgetObject() throw...
derby-DERBY-5488-ce664ad5
DERBY-5488: Rename SCOPE_CATLOG to SCOPE_CATALOG and add a redundant trailing SCOPE_CATLOG column to the ResultSet returned by DatabaseMetaData.getColumns(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1204684 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java", "hunks": [ { "added": [ " * <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the" ], "header": "@@ -1864,7 +1864,7 @@ public class EmbedDatabaseMetaData extends ConnectionCh...