id
stringlengths
22
25
commit_message
stringlengths
137
6.96k
diffs
listlengths
0
63
derby-DERBY-6629-aba4ea11
DERBY-6629: Restrict privileged operation in CreateXMLFile Remove the privileged operation in the CreateXMLFile class. Instead, let the caller do the privileged operation and pass in a Writer object that CreateXMLFile can write the file to. Make the tests invoke the plan exporter tool via its main class instead of calling the internal API. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605021 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/planexporter/CreateXMLFile.java", "hunks": [ { "added": [], "header": "@@ -21,14 +21,8 @@", "removed": [ "import java.io.BufferedWriter;", "import java.io.FileOutputStream;", "import java.io.OutputS...
derby-DERBY-6630-b1008f38
DERBY-6630: Reduce visibility of JCECipherFactory and protect it with the usederbyinternals permission; tests passed cleanly on derby-6630-01-aa-usederbyinternals.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1628206 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.security.SecurityUtil;" ], "header": "@@ -21,6 +21,7 @@", "removed": [] }, { "added": [ "final...
derby-DERBY-6631-e7deac45
DERBY-6631: FileMonitor can be used to elevate an application's privileges Don't elevate privileges in the setThreadPriority() method. Instead, let the callers use doPrivileges() themselves. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1620534 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java", "hunks": [ { "added": [ "import java.security.AccessController;", "import java.security.PrivilegedAction;" ], "header": "@@ -31,6 +31,8 @@ import org.apache.derby.shared.common.s...
derby-DERBY-6634-7139f7c7
DERBY-6634: Improve test coverage of SqlXmlUtil.java Remove impossible code paths so that they don't show up as untested code. In particular: - Remove some unnecessary null tests. The callers already make sure that the arguments cannot be null, so it's better to skip the checks so that potential future bugs get reported as NPEs instead of being silently ignored. - Remove code that serializes lists of atomic values. Derby only supports queries that return single atomic values. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1607017 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java", "hunks": [ { "added": [ "import java.io.StringWriter;" ], "header": "@@ -33,6 +33,7 @@ import java.util.List;", "removed": [] }, { "added": [ " Document d...
derby-DERBY-6634-cc2990dc
DERBY-6634: Improve test coverage of SqlXmlUtil.java Add missing test cases for: - XMLQUERY that returns an atomic boolean - XMLEXISTS where the query returns an atomic value git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605287 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6634-ed7f8b90
DERBY-6634: Improve test coverage of SqlXmlUtil.java Remove dead code from the time when SqlXmlUtil implemented the Formatable interface (before DERBY-3870). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605285 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java", "hunks": [ { "added": [], "header": "@@ -128,12 +128,6 @@ public class SqlXmlUtil", "removed": [ " // Used to recompile the XPath expression when this formatable", " // object is reco...
derby-DERBY-6635-c670aa44
DERBY-6635: Prevent the optimizerTracing optional tool from writing its output over an existing file; commit derby-6635-01-ab-noOverwrite.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1629192 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java", "hunks": [ { "added": [ "import java.io.File;", "import java.security.PrivilegedExceptionAction;", "import org.apache.derby.iapi.error.PublicAPI;", "import org.apache.derby.i...
derby-DERBY-6636-d7a318a4
DERBY-6636: Prevent blackhats from creating a BaseDataFileFactory; tests passed cleanly for me on derby-6636-01-aa-usederbyinternals.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1628256 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.security.SecurityUtil;" ], "header": "@@ -23,7 +23,7 @@ package org.apache.derby.impl.store.raw.data;", "removed": [ ...
derby-DERBY-6638-a516dd2c
DERBY-6638 Remove unnecessary use of reflection in SignatureChecker Remove the reflection + some missing javadocs and IDE warning fixes. Removes unused argument from method "checkSignature", and changes all StringBuilder usage to avoid concatenation. I tested the tool manually for a simple case, but see DERBY-6639. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605738 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/tools/SignatureChecker.java", "hunks": [ { "added": [ "import java.sql.DriverManager;" ], "header": "@@ -21,14 +21,13 @@", "removed": [ "import java.lang.reflect.Method;", "" ] }, {...
derby-DERBY-6639-a516dd2c
DERBY-6638 Remove unnecessary use of reflection in SignatureChecker Remove the reflection + some missing javadocs and IDE warning fixes. Removes unused argument from method "checkSignature", and changes all StringBuilder usage to avoid concatenation. I tested the tool manually for a simple case, but see DERBY-6639. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605738 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/tools/SignatureChecker.java", "hunks": [ { "added": [ "import java.sql.DriverManager;" ], "header": "@@ -21,14 +21,13 @@", "removed": [ "import java.lang.reflect.Method;", "" ] }, {...
derby-DERBY-6642-8ee4fdfa
DERBY-6642 Make the JUnit result set assertion methods dump the actual rs when assertion fails Patch derby-6642b. The patch works by always collecting columns and rows as they are read. The method JDBC#addRsToReport takes these collections and what's left of the result set and formats a dump of the result set and adds it to the text of already existing assertion failure. This is then (re)thrown. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1607069 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/JDBC.java", "hunks": [ { "added": [ "import junit.framework.AssertionFailedError;" ], "header": "@@ -31,6 +31,7 @@ import java.util.ListIterator;", "removed": [] }, { "added": [ ...
derby-DERBY-6644-497ce7bd
DERBY-6644: Support standard syntax for altering column nullability Implement SQL:2011 syntax for altering nullability: ALTER TABLE t ALTER COLUMN c SET NOT NULL ALTER TABLE t ALTER COLUMN c DROP NOT NULL git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1607559 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6648-a0dbbd72
DERBY-6648: Prevent user code from calling the public static entry points in ContextService; commit derby-6648-01-ae-regressionTests.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1625960 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/catalog/Java5SystemProcedures.java", "hunks": [ { "added": [ "import java.security.AccessController;", "import java.security.PrivilegedAction;", "import org.apache.derby.iapi.services.context.Context;" ], "he...
derby-DERBY-665-ffd4e9bd
Fix for DERBY-665, committed on behalf of Suresh Thalamati. Comments from submitter: This patch removes the unused backup functions with File as parameter, git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@372263 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/database/Database.java", "hunks": [ { "added": [], "header": "@@ -85,18 +85,6 @@ public interface Database", "removed": [ "\t/**", "\t * Backup the database to a backup directory. See online documentation", ...
derby-DERBY-6650-a69ff90a
DERBY-6650: Lucene tests fail on compact profile 2 Implement the IndexInput.slice() method required by Lucene 4.9. Lucene 4.9 works on compact profile 2. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1609655 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/optional/org/apache/derby/optional/lucene/DerbyIndexInput.java", "hunks": [ { "added": [ "import java.io.EOFException;" ], "header": "@@ -21,6 +21,7 @@", "removed": [] }, { "added": [ " private final ArrayList<I...
derby-DERBY-6650-d1c479d2
DERBY-6650: Lucene tests fail on compact profile 2 Disable LuceneSuite on platforms that don't support JMX if the Lucene version is lower than 4.8. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1609686 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6650-d3f7a7c1
DERBY-6650: Lucene tests fail on compact profile 2 Implement IndexOutput.getChecksum() which is required by Lucene 4.8. Lucene 4.8 works on compact profile 2. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1609428 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/optional/org/apache/derby/optional/lucene/DerbyIndexOutput.java", "hunks": [ { "added": [ "import java.util.zip.CRC32;" ], "header": "@@ -22,9 +22,8 @@", "removed": [ "import java.util.ArrayList;", "import org.apache.lucene....
derby-DERBY-6652-57f53e3e
DERBY-6652: Disable the use of views as the source data sets of MERGE statements; tests passed cleanly for me on derby-6652-01-aa-disableSourceViews.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1609450 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/MergeNode.java", "hunks": [ { "added": [ " throw StandardException.newException( SQLState.LANG_SOURCE_NOT_BASE_OR_VTI );" ], "header": "@@ -346,7 +346,7 @@ public final class MergeNode extends DMLModS...
derby-DERBY-6654-35b010b5
DERBY-6654: Commit ClassLoadingTest with derby-6654-02-aa-ClassLoadingTest.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1626807 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6660-c9398289
DERBY-6660: ResultSet assertion methods fail in upgrade tests If an error happens in addRsToReport(), don't let it shadow the original error. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1610412 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/JDBC.java", "hunks": [ { "added": [ " try {", " if (rs == null) {", " return BaseTestCase.newAssertionFailedError(", " afe.getMessage() + \"\\n<...
derby-DERBY-6661-3130800a
DERBY-6661: Make dblook recognize deferrable constraints; tests passed cleanly on derby-6661-01-aa-recreateDeferrableConstraints.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1610858 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/dblook/DB_Check.java", "hunks": [ { "added": [ "\t\t\t\"CS.TABLEID, CS.SCHEMAID, CS.STATE, CK.CHECKDEFINITION FROM SYS.SYSCONSTRAINTS CS, \" +" ], "header": "@@ -49,7 +49,7 @@ public class DB_Check {", "removed...
derby-DERBY-6662-f0d43cea
DERBY-6662; DatabaseMetaData.usesLocalFiles() returns true for in-memory databases Adding a test case using the metadata optional tool. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1627851 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6663-b08f4211
DERBY-6663: NPE when a trigger tries to insert into a table with a foreign key Make sure FKInfo serializes its fkIds field so that the information is available in stored prepared plans too. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1610711 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/FKInfo.java", "hunks": [ { "added": [ " ArrayUtil.writeArray(out, fkIds);" ], "header": "@@ -291,6 +291,7 @@ public class FKInfo implements Formatable", "removed": [] } ] } ]
derby-DERBY-6664-f65be8f9
DERBY-6664: Schema 'null' does not exist when trigger inserts into table with deferred foreign key Make sure the FKInfo class stores its schemaName field. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1610836 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/FKInfo.java", "hunks": [ { "added": [ " out.writeObject(schemaName);" ], "header": "@@ -277,6 +277,7 @@ public class FKInfo implements Formatable", "removed": [] } ] } ]
derby-DERBY-6665-2db96c55
DERBY-6665 Violation of deferred constraints not detected when conglomerates are shared Patch (derby-6665-dhw-dont-share) to fix missing logic to exclude deferrable foreign key constrants form sharing supporting index. Adds repro tests to ForeignKeysDeferrableTest. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1614327 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java", "hunks": [ { "added": [ " cChars[0],", " cChars[1]," ], "header": "@@ -1061,12 +1061,8 @@ class TableElementList extends QueryTreeN...
derby-DERBY-6666-bde481bd
DERBY-6666 Deferred constraint validation fails with "dead statement" when query plan logging is enabled Patch derby-6666c. It removes this issue by adding push and push of the statement context to the lcc before we execute the internal query to check for check constraint violation. We had neglected to do this, which caused a problem for the logging since the statement context should always be properly initialized during execution. This patch also adds a new test, derby6666 to ConstraintCharacteristicsTest which fails without the fix in this patch (equivalent to repro). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1614796 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/DeferredConstraintsMemory.java", "hunks": [ { "added": [ "import java.sql.ResultSet;" ], "header": "@@ -20,6 +20,7 @@", "removed": [] }, { "added": [ "import org.apache.derb...
derby-DERBY-6668-64b63085
DERBY-6668: Forbid TRUNCATE on tables referenced by deferred foreign keys; commit derby-6668-01-ab-disallowTruncateOnReferencedTable.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1611342 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6672-f80e3cee
DERBY-6672: Allow the renaming of referenced tables; commit derby-6672-01-ab-addTests.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1614681 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java", "hunks": [ { "added": [ "\t\t case DependencyManager.RENAME:" ], "header": "@@ -547,6 +547,7 @@ public abstract class ConstraintDescriptor", "removed": [] } ] ...
derby-DERBY-6674-a42c32ea
DERBY-6674 Cleanup brittle code in ValidateCheckConstraintResultSet Patch derby-6674. Refactors the code by reusing getNextRowCore (to avoid the redundancy) for ValidateCheckConstraintResultSet but abstracting out the loop control, which is overridden by ValidateCheckConstraintResultSet. fix git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1614963 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java", "hunks": [ { "added": [ "", " boolean loopControl(boolean moreRows) throws StandardException {", " return scanController.fetchNext(candidate.getRowArray());", " ...
derby-DERBY-668-aeb4b102
DERBY-668: SysInfo does not print the right info in class loader scenarios This change modifies the sysinfo tool to print additional information about the classes and jars that it examines. For each class that sysinfo examines, it now calls getProtectionDomain().getCodeSource() to retrieve information about the source of that file, which might be: an entry in the application classpath, an entry in a class loader location list, a jar fetched due to being listed in the manifest entry of another jar, a standard extension in the JRE's extensions directory, a jar installed into the application server, or any of various other possibilities. The additional information about the class's origin is displayed in the sysinfo output. Note that when sysinfo runs under a Java security manager, it may need special permissions to access this additional information, including the permission to read the java.class.path property, and the permission to call getProtectionDomain on a class. If sysinfo is not granted these permissions, it will display an error message about the security problem in place of displaying the class origin information. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@387599 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/sysinfo/Main.java", "hunks": [ { "added": [ "import java.net.URL;", "import java.security.ProtectionDomain;", "import java.security.CodeSource;", "import java.security.PrivilegedAction;", "impor...
derby-DERBY-6680-953afd70
DERBY-6680 Other jar files may need to be granted permission to read derby.ui.* properties derby-6680-2. This patch moves the reading of the two system properties up into NetworkServerControlImpl. Other usage of LocalizedResource is unaffected and might still try to read those system properties, i.e. as called from ij. Removes the note about LocalizedResource in the policy template file. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1620378 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetServlet.java", "hunks": [ { "added": [ " LocalizedResource langUtil = new LocalizedResource(SERVLET_PROP_MESSAGES);" ], "header": "@@ -122,7 +122,7 @@ public class NetServlet extends HttpServlet {", ...
derby-DERBY-6684-dd7698b8
DERBY-6684(Failure in testDERBY5120NumRowsInSydependsForTrigger when upgrading from 10.11.1.0 to trunk) We ran into DERBY-6684 after the fix for DERBY-2041 went into 10.11 The failure is the expected behavior since when dropping a table, we should detect any dependent triggers defined on other tables and drop table should fail if such dependencies exist. To fix the test failure, we just need to switch the order of drop table DERBY-2041(Trigger should register a dependency on tables and columns used in its body) Drop ATDC_TAB1 before ATDC_BKUP1 because ATDC_TAB1 has a trigger on it which references ATDC_BKUP1. If we try dropping ATDC_BKUP1 without first dropping ATDC_TAB1, there will be an error message that trigger ATDC_TAB1_TRG1 depends on ATDC_BKUP1 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1617641 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6688-e9ac8241
DERBY-6688 NPE (or sane: ASSERT failure) with ROW_NUMBER in some subqueries In FromSubquery (used in the OK subquery) the phasing is different than in SubqueryNode (used in the failing query): the order by list is pushed down too late in the SubqueryNode (after the SelectNode#preprocess), so that the fact that the order by carries an implicit window definition isn't recorded, causing the "windows" field to be null, leading to missing rewriting in the getProjectRestrict phase, hence the error. In FromSubquery, the order by list is pushed down into the child select node just before calling its preprocess method, i.e. the order by list is present what that happens. The patch (derby-6688-b) moves the pushing down of the order by list in SubqueryNode#preprocess to the resultSet (the SelectNode) to just before the call to preprocess of the resultSet, so the rest of the windows rewriting machinery kicks in. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616332 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java", "hunks": [ { "added": [ " final boolean haveOrderBy; // need to remember for flattening decision", "", " // Push the order by list down to the ResultSet", " ...
derby-DERBY-6690-b737f16b
DERBY-6690 ROW_NUMBER should not be allowed in generation clause Patch *derby-6690* makes this illegal by adding a check in TableElementList#bindAndValidateGeneration. I had to add an acceptChildren method to GenerationClauseNode for the visitor to reach down into the generation clause. Added a test to OLAPTest#testBasicOperations for both CREATE TABLE and ALTER TABLE ADD COLUMN. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616365 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.compile.Visitor;" ], "header": "@@ -26,6 +26,7 @@ import org.apache.derby.iapi.error.StandardException;", "removed": ...
derby-DERBY-6691-5b0cb063
DERBY-6691 ROW_NUMBER should not be allowed as argument in a procedure call Patch *derby-6691* makes this usage throw 42ZC2 and adds a test to OLAPTest#testBasicOperations. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616335 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6692-4222fe98
DERBY-6692: Fix self-deadlock regression in soft-upgraded database; commit derby-6692-01-ab-withTests.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616299 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6693-843145a2
DERBY-6693 Assert failure/ArrayIndexOutOfBoundsException when using COUNT in MERGE matching clause Patch derby-6693 which forbids aggregates in the matching clauses, and adds a test case to MergeStatementTest, but: the checked in code using assertCompileError instead of assertStatementError for more precision (in MergeStatementTest). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616523 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6697-3be84645
DERBY-6697: Failures when running tests with JaCoCo Add permissions needed by JaCoCo to MissingPermissionTest's custom policy file. Make BaseTestCase.execJavaCmd() propagate the empty jacoco.active property to sub-processes if the tests are running with JaCoCo. Adjust dummy arguments given to procedures in DBOAccessTest so that they fail with an error that is not affected by the broader permissions granted when running with JaCoCo. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1617240 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6699-5c2ad716
DERBY-6699 Error in PredicatePushdownTest.test_predicatePushdown Patch derby-6699-diagnostics makes the sane build print information about the contents of the two stacks when the ASSERT fails. Since this error is intermittent it may help debug the issue. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1616807 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/bytecode/Type.java", "hunks": [ { "added": [ " @Override", " public String toString() {", " StringBuilder sb = new StringBuilder();", " sb.append(\"[\");", " sb.ap...
derby-DERBY-670-0ce6b779
DERBY-670 - improve automatic space reclamation of long rows and long columns. This patch provides a non-upgrade solution to the problem. It uses existing row and column format information to determine at delete time if the row or column is "long". If so it schedules a post commit reclamation immediately rather than waiting for all rows on a page to be deleted. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@383663 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/store/raw/Page.java", "hunks": [ { "added": [], "header": "@@ -317,10 +317,6 @@ public interface Page", "removed": [ "\t/**", "\t\tUpdate the complete record identified by the record handle.", "", ...
derby-DERBY-6701-086dc6d3
DERBY-6701: Instability in RuntimeInfoTest.x_testRuntimeInfoAfterConnClose Keep calling getRuntimeInfo() for up to a minute until it gives the expected response. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1619776 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6702-dac3aab9
DERBY-6702; test failure in NSSecurityMechanismTest; The expected SQL state must be five characters long Working around this intermittent error condition; when it happens we'll see 'ALARM', but no test failure. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1624064 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6704-8ad67d3b
DERBY-6704 Hang in AutoloadTest.spawnProcess:JDBCDriversEmbeddedTest on Mac/jdk7,8 Patch derby-6704b: it collects std out and err for the spawned subprocesses, and also forward the debug options "derby.tests.debug" and "derby.tests.trace" to the subprocesses. If any of those are set, we collect the std err and std out and print them interleaved with that of the top process. The patch will also try to get a jstack status of a hanging subprocess before killing it (only works on Unixen) - hopefully this would work also on MacOs; it uses a little dirty reflection to access a private PID field in the underlying Process class object before trying a jstack. For this to work, the test must also run using an Oracle JDK, a JRE doesn't have a jstack. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1618088 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java", "hunks": [ { "added": [ "import java.io.File;", "import java.lang.reflect.Field;", "import java.security.AccessController;", "import java.security.PrivilegedActionException;", ...
derby-DERBY-6704-bc39f0ed
DERBY-6704 Hang in AutoloadTest.spawnProcess:JDBCDriversEmbeddedTest on Mac/jdk7,8 Diagnostic patch to print the output of stderr and stdout from the subprocesses if one of "derby.tests.{trace,debug}" is true. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1617825 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6705-d043e29f
DERBY-6705: Triggers should not allow MERGE statements that reference temporary tables git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1618544 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/MergeNode.java", "hunks": [ { "added": [ " private QueryTreeNodeVector<MatchingClauseNode> _matchingClauses;" ], "header": "@@ -183,7 +183,7 @@ public final class MergeNode extends DMLModStatementNode", ...
derby-DERBY-6708-b21afa1f
DERBY-6708 OOME when running ConstraintCharacteristicsTest with smaller heap Patch derby-6708. Reduces the number of rows of the fixture testManySimilarDuplicates from 40K to 4K. Removes the use of in-memory database for all fixtures that use it. In my setup (Ubuntu 12.04 64 bits, JDK 8u20) the test now runs fine with -Xmx128M, in ca. 70 seconds with "derby.system.durability=test". git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1619456 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6709-43bb9d46
DERBY-6709: Convert the storetests suite to JUnit git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1619376 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6714-4f1dcde0
DERBY-6714: RuntimeInfoTest failed with insufficient data from server Tighten up checks for sessions being closed while reading runtime info from them, in order to protect against NullPointerExceptions on the server. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1620608 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/Session.java", "hunks": [ { "added": [ "", " // DERBY-6714: database can be null if the session gets closed", " // while we construct the runtime info.", " Database db = database;", ...
derby-DERBY-6717-281f9033
DERBY-6717: Policies with multiple SystemPermissions are not handled well Override newPermissionCollection() and return an instance that is able to distinguish between SystemPermissions with the same name and different actions. The default implementation in BasicPermission only considers the name of the permission. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1621257 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/security/SystemPermission.java", "hunks": [ { "added": [ "import java.io.ObjectOutputStream;", "import java.security.PermissionCollection;", "import java.util.Collections;", "import java.util.Enumeration;", ...
derby-DERBY-6717-d09cda8f
DERBY-6717: Policies with multiple SystemPermissions are not handled well Extra test cases to improve test coverage. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1621260 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-672-0acf7976
DERBY-672: Allow aggregates on user defined types. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1391034 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java", "hunks": [ { "added": [ " TypeDescriptor aggForType = bindUserCatalogType( (TypeDescriptor) aggElements[ AGG_FOR_TYPE ] );", " TypeDescriptor aggReturnType = bind...
derby-DERBY-672-0ad97c9a
DERBY-672: Tighten up the bounds checking for input and return types of user-defined aggregates. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1400984 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/loader/Java5ClassInspector.java", "hunks": [ { "added": [ " // PUBLIC BEHAVIOR" ], "header": "@@ -62,7 +62,7 @@ public class Java5ClassInspector extends ClassInspector", "removed": [ " // BE...
derby-DERBY-672-0e07b2e9
DERBY-672: Improve the javadoc for the merge method of Aggregator so that implementors can figure out how to test their code. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1459837 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/agg/Aggregator.java", "hunks": [ { "added": [ " * <p>", " * the partial results together. This method can be called when", " * performing a grouped aggregation with a large number of groups.", " * W...
derby-DERBY-672-1cb558f1
DERBY-672: Attempt to fix broken test case for user defined aggregates on jsr169 platforms. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1379519 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-672-2cf546d5
DERBY-672: Add implicit casts and handle string truncation for user-defined aggregates. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1398352 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ " if ( isUserDefinedAggregate() )" ], "header": "@@ -319,7 +319,7 @@ public class AggregateNode extends UnaryOperatorNode", "removed": [ " ...
derby-DERBY-672-2f535f8a
DERBY-672: Run user-defined aggregate tests with collation turned off and turned on. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1398934 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-672-3d1bc57e
DERBY-672: Remove unneeded exceptions and a redundant null check git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1401250 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java", "hunks": [ { "added": [ "\tpublic String getSchemaName()" ], "header": "@@ -182,7 +182,7 @@ public final class AliasDescriptor", "removed": [ "\tpublic String\tgetSche...
derby-DERBY-672-61bb5d0a
DERBY-672: Attempt to fix test order problem on Java 7 on Sol32. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1379527 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-672-63e09107
DERBY-672: Forbid user-defined aggregates in GROUP BY clauses just as builtin aggregates are illegal there. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1399364 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java", "hunks": [ { "added": [ " private boolean appearsInGroupBy = false;", "" ], "header": "@@ -133,6 +133,8 @@ public class StaticMethodCallNode extends MethodCallNode", ...
derby-DERBY-672-aad60576
DERBY-672: Add support and tests for dependencies between user-defined types and aggregates. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1401303 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java", "hunks": [ { "added": [ "import org.apache.derby.catalog.types.AggregateAliasInfo;" ], "header": "@@ -30,6 +30,7 @@ import org.apache.derby.catalog.AliasInfo;", "removed": [] ...
derby-DERBY-672-b215dfd0
DERBY-672: Add tests for precision mismatches when using user-defined aggregates. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1400208 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-672-c8603c40
DERBY-672: Wire in bind and execute logic for non-distinct user-defined aggregates in the SELECT list. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1378639 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java", "hunks": [ { "added": [ "public class ClassInspector" ], "header": "@@ -35,7 +35,7 @@ import java.lang.reflect.*;", "removed": [ "public final class ClassInspector" ...
derby-DERBY-672-cb25c656
DERBY-672: More negative tests for illegal placement of user-defined aggregates in various statements. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1400083 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ "\t\t\t\tthrow StandardException.newException", " (", " SQLState.LANG_USER_AGGREGATE_CONTAINS_AGGREGATE, ", " ...
derby-DERBY-672-d389f7d5
DERBY-672: Add support for DISTINCT user defined aggregates in the SELECT list. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1379505 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;", "import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;" ], "header": "@@ -29,7 +29,9...
derby-DERBY-672-d861c230
DERBY-672: Allow binding of user-defined aggregates to generic classes. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1392307 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ "\t\t\tthrow StandardException.newException", " (", " SQLState.LANG_USER_AGGREGATE_BAD_TYPE, ", " getSQLN...
derby-DERBY-672-f3c62175
DERBY-672: Adding GRANT/REVOKE support for user-defined aggregates. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1380202 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java", "hunks": [ { "added": [ " public static final int AGGREGATE_PRIVILEGES = 4;" ], "header": "@@ -49,6 +49,7 @@ public class PrivilegeNode extends QueryTreeNode", "removed": [] ...
derby-DERBY-672-f798a41a
DERBY-672: Add tests of user-defined aggregates on all builtin Derby types except for XML. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1396589 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.reference.JDBC40Translation;" ], "header": "@@ -30,6 +30,7 @@ import org.apache.derby.catalog.types.RoutineAliasInfo;", "remov...
derby-DERBY-6724-8bef59d4
DERBY-6724: NPE if insert statement needs recompilation after having fired a trigger Allow InternalTriggerExecutionContext.cleanup() to be called more than once. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1622631 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java", "hunks": [ { "added": [], "header": "@@ -23,7 +23,6 @@ package org.apache.derby.impl.sql.execute;", "removed": [ "import java.util.Enumeration;" ] } ] }...
derby-DERBY-6725-314a19ac
DERBY-6725(Add a system function which returns the name of the database.) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1651284 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java", "hunks": [ { "added": [ " // On upgrade from versions before 10.6, create system procedures" ], "header": "@@ -404,7 +404,7 @@ public\tclass DD_Version implements\tFormatable", ...
derby-DERBY-6725-3967d8be
DERBY-6725: Canonicalize the database names returned by syscs_get_database_name(); comit derby-6725-02-aa-canonicalize.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1717646 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/catalog/SystemProcedures.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.monitor.ModuleFactory;", "import org.apache.derby.iapi.services.monitor.Monitor;" ], "header": "@@ -47,6 +47,8 @@ import or...
derby-DERBY-6726-617d55ab
DERBY-6726: NPE from trigger When there are multiple triggers on the same table, it is crucial that the TriggerDescriptor class always uses the getTableDescriptor() getter method to access its 'td' member field, so that the field can be lazy-initialized if it has not yet been set. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1763024 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java", "hunks": [ { "added": [ "\t\t\t\t\tgetTableDescriptor()," ], "header": "@@ -411,7 +411,7 @@ public class TriggerDescriptor extends UniqueSQLObjectDescriptor", "removed": [ ...
derby-DERBY-6727-947a7233
DERBY-6727; test behavior of open XA transactions when the database is crashed (not just shutdown) Adding further test cases to Derby5165Test git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1625093 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-673-57f2b05c
DERBY-673: Get rid of the NodeFactory Followup fix to patch derby-673-typesafe-lists-2. The patch introduced an issue causing ConcurrentModificationException. Roll back that change. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1497742 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/PredicateList.java", "hunks": [ { "added": [ "\t\tint size = size();", "\t\tfor (int index = 0; index < size; index++)", "\t\t\tAndNode\t\t\tandNode;", "\t\t\tPredicate\t\tpredicate;", "\...
derby-DERBY-6730-19ca71c1
DERBY-6730: Allow spaces in the names of key names used by Lucene indexes; commit derby-6730-02-ab-spacesInKeyName.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1624507 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/optional/org/apache/derby/optional/lucene/LuceneSupport.java", "hunks": [ { "added": [ " vetColumnName( derbyIdentifier( textcol ) );" ], "header": "@@ -462,7 +462,7 @@ public class LuceneSupport implements OptionalTool", "removed": [ ...
derby-DERBY-6730-3240e21f
DERBY-6730: Allow case-sensitive names for key columns when creating Lucene indexes; commit derby-6730-01-aa-correctCasing.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1623782 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java", "hunks": [ { "added": [ "", " String delimitedColumnName = LuceneSupport.delimitID( _column );", " DerbyLuceneDir derbyLuceneDir = LuceneSupport.getDerbyLuc...
derby-DERBY-6733-0c12cdea
DERBY-6733: Implement an MBean for monitoring caches Add test that verifies that a SecurityException is raised if the MBean is accessed by code that hasn't been granted permission to monitor the engine. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1626682 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6733-6da88fc6
DERBY-6733: Implement an MBean for monitoring caches Add an MBean for the statement cache. Fix the values returned from getAllocatedEntries() and getUsedEntries(). The first patch got them mixed up. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1624974 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " deregisterMBean();" ], "header": "@@ -625,14 +625,7 @@ final class ConcurrentCache implements CacheManager {", "removed": [ "", ...
derby-DERBY-6733-86ee0a0d
DERBY-6733: Implement an MBean for monitoring caches Add a new MBean called CacheManagerMBean, which provides information about a CacheManager instance. Create CacheManagerMBean instances for the page cache and the container cache when a database is booted. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1624469 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/jmx/ManagementService.java", "hunks": [ { "added": [], "header": "@@ -22,10 +22,8 @@", "removed": [ "import org.apache.derby.iapi.reference.Module;", "" ] }, { "added": [ ...
derby-DERBY-6737-012a4edf
DERBY-6737: CLOB retrieve exceptions after moving cursor around Always fetch the row again from the server when moving the position of a scrollable result set that contains LOB columns. Without this fix, if one of the absolute positioning methods is used (first(), last() or absolute(int)), and the old position is the same as the new position, the result set will use the values it already has for the row on that position. Any locators will have been released, though, so accessing LOBs in the row will fail with 'invalid locator'. By fetching the row again from the server, we get a fresh and valid locator for the LOB columns in that row. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1625904 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-674-c3c7251e
DERBY-674(analyze impact of poodle security alert on Derby client - server ssl support) Changes based on Knut's feedback. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1636668 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/net/OpenSocketAction.java", "hunks": [ { "added": [ " \t//If SSLv3 and/or SSLv2Hello is one of the enabled protocols, ", " \t// then we want to remove it from the list of enabled protocols ", " ...
derby-DERBY-6741-b6a45f5e
DERBY-6741: Add a privilege barrier to prevent users from getting a ContextManager from an embedded connection object; tests passed cleanly on derby-6741-01-aa-usederbyinternals.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1626274 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.security.SecurityUtil;" ], "header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.services.property.PropertyUtil;", "removed": [] ...
derby-DERBY-6742-21044de3
DERBY-6880: Update failing with java.sql.SQLDataException This change reverts part of the changes made by revision 1628596 for DERBY-6742. Specifically, the section of code added to UpdateResultSet.collectAffectedRows is removed. That code caused problems with certain SQL UPDATE statements which were compiled with Statement.RETURN_GENERATED_KEYS. The new test cases added by this change include several examples of such SQL statements. The JDBC documentation for the intended behavior of UPDATE statements with the RETURN_GENERATED_KEYS option is unclear; the intended behavior is much clearer with INSERT statements. Given that I don't understand the intended behavior, it seems safer to me to return Derby to the previous state for UPDATE statements; namely, that no attempt is made to compute the set of generated keys for an UPDATE statement. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1741380 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6742-a826375a
CERBY-6414(Incorrect handling when using an UPDATE to SET an identity column to DEFAULT) I have created DERBY-6742 for JDBC part of this feature so we can generate auto generated resultset for an update statement updating generated columns. This implementation is supported through Statement.RETURN_GENERATED_KEYS flag. Junit tests for this feature are in GeneratedColumnsTest.java. Upgrade tests are in Changes10_12.java. Upgrade test shows that a soft upgrade from pre-10.11 will not support update of generated columns using DEFAULT but 10.11 to trunk soft upgrade will allow it. This is because starting 10.11, we have started using sequence generator to create unique ids. If we want to support updating of idetity columns for pre-10.11 releases, we will need to maintain the code for old way of generating unique ids. In order to avoid that, this feature is available to only 10.11 db during soft upgrade. For UPDATE of identity column to work in the MERGE sql, we need to make changes to MERGE code(DERBY-6743). MERGE already has required code for insert putting DEFAULT in generated columns. Implementation needs to be added for update putting DEFAULT in generated columns in case of MERGE. In the mean time, I have renamed existing junit test test_015_bug_6414 to atest_015_bug_6414 in MergeStatementTest.java so we do not run into failures. Some detail about the part of the implementation that was tricky for DERBY-6414. The existing code was originally written to handle inserting values in identity columns using DEFAULT. In case of insert, InsertResultSet uses ColumnDescriptors in resultDescription to find the type of the generated columns. This data structure holds the column descriptors of all the columns in the table. All the columns are in this data structure because even though INSERT statement may not explicitly assign a value to each and every column in the table, all the columns end up getting some value in them through an INSERT statement. The code in InsertResultSet.initializeAIcache method relies on availability of all the columns type information. But in case of Update, resultDescription does not include all the columns in the table. It only has the columns being touched by the Update statement(the rest of the columns in the table will retain their original values), and for each of those touched columns, it has a duplicate entry in resultDescription in order to have before and after values for the changed column values. This difference in array content of resultDescription requires us to have separate implementation of initializeAIcache method for insert and update. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1625884 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/InsertNode.java", "hunks": [ { "added": [], "header": "@@ -41,13 +41,11 @@ import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;", "removed": [ "import org.apache.derby.iapi.sql.dictionary.SequenceDe...
derby-DERBY-6742-aa302c30
DERBY-6742(For update statement, collect generated keys if Statement.RETURN_GENERATED_KEYS flag is supplied to the JDBC call.) This commit now allows JDBC statement to receive a resultset for auto generated keys for an UPDATE statement updating the generated values with DEFAULT clause. Such a resultset will be generated only if the UPDATE statement updated a single row and there were generated columns involved in the update. This functionality already exists for INSERT statement. It is currently implemented for INSERT statement by calling VALUES IDENTITY_VAL_LOCAL() from EmbedStatement.getGeneratedKeys(). I have used this existing mechanism to collect generated values resultset for UPDATE too. This means that the scope of IDENTITY_VAL_LOCAL() function has grown from INSERT statement to also include UPDATE statement. This will require us to update the documentation for IDENTITY_VAL_LOCAL(). I have created DERBY-6753(Docs for IDENTITY_VAL_LOCAL needs to be updated to indicate that the return value will be impacted by single row UPDATE of identity column) for the documentation task. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1628596 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/ClientPreparedStatement.java", "hunks": [ { "added": [ " boolean chainOpenQueryForAutoGeneratedKeys = ", " \t\t((sqlUpdateMode_ == isInsertSql__ || sqlUpdateMode_ == isUpdateSql__) ", ...
derby-DERBY-6743-a826375a
CERBY-6414(Incorrect handling when using an UPDATE to SET an identity column to DEFAULT) I have created DERBY-6742 for JDBC part of this feature so we can generate auto generated resultset for an update statement updating generated columns. This implementation is supported through Statement.RETURN_GENERATED_KEYS flag. Junit tests for this feature are in GeneratedColumnsTest.java. Upgrade tests are in Changes10_12.java. Upgrade test shows that a soft upgrade from pre-10.11 will not support update of generated columns using DEFAULT but 10.11 to trunk soft upgrade will allow it. This is because starting 10.11, we have started using sequence generator to create unique ids. If we want to support updating of idetity columns for pre-10.11 releases, we will need to maintain the code for old way of generating unique ids. In order to avoid that, this feature is available to only 10.11 db during soft upgrade. For UPDATE of identity column to work in the MERGE sql, we need to make changes to MERGE code(DERBY-6743). MERGE already has required code for insert putting DEFAULT in generated columns. Implementation needs to be added for update putting DEFAULT in generated columns in case of MERGE. In the mean time, I have renamed existing junit test test_015_bug_6414 to atest_015_bug_6414 in MergeStatementTest.java so we do not run into failures. Some detail about the part of the implementation that was tricky for DERBY-6414. The existing code was originally written to handle inserting values in identity columns using DEFAULT. In case of insert, InsertResultSet uses ColumnDescriptors in resultDescription to find the type of the generated columns. This data structure holds the column descriptors of all the columns in the table. All the columns are in this data structure because even though INSERT statement may not explicitly assign a value to each and every column in the table, all the columns end up getting some value in them through an INSERT statement. The code in InsertResultSet.initializeAIcache method relies on availability of all the columns type information. But in case of Update, resultDescription does not include all the columns in the table. It only has the columns being touched by the Update statement(the rest of the columns in the table will retain their original values), and for each of those touched columns, it has a duplicate entry in resultDescription in order to have before and after values for the changed column values. This difference in array content of resultDescription requires us to have separate implementation of initializeAIcache method for insert and update. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1625884 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/InsertNode.java", "hunks": [ { "added": [], "header": "@@ -41,13 +41,11 @@ import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;", "removed": [ "import org.apache.derby.iapi.sql.dictionary.SequenceDe...
derby-DERBY-675-4a8e892a
DERBY-675: The "readLine" method in ODBCMetadataGenerator.java was treating single backslashes as "end-of-line" markers and hence was not recognizing escaped sequences like "\n". It turns out that the check for backslashes in that method is unnecessary, so this patch removes it. I ran the metadata.java and odbc_metadata.java tests with this patch and they ran okay, so I think it should be safe. I still want to run some more tests tonight, just to be sure, but I thought I'd post the patch now since it is affecting another developer's current work (Mamta's). Submitted by Army Brown (qozinx@sbcglobal.net) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@330672 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java", "hunks": [ { "added": [ "import java.io.LineNumberReader;" ], "header": "@@ -23,6 +23,7 @@ package org.apache.derbyBuild;", "removed": [] }, { "added": [ "\t...
derby-DERBY-6751-1ae0d7dc
DERBY-6751: Prevent user code from getting a LanguageConnectionContext out of an EmbedConnection; tests passed cleanly on derby-6751-01-ad-usederbyinternals.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1628855 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;", "import java.security.AccessController;", "import java.security.PrivilegedAction;" ], ...
derby-DERBY-6751-a57220c2
DERBY-6751: Improve performance of ResultSet.next() by caching the lcc in ConnectionChild; tests passed cleanly on derby-6751-02-ab-cacheLCC.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1629866 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java", "hunks": [ { "added": [ " /** Cached LanguageConnectionContext */", " private LanguageConnectionContext lcc;", "" ], "header": "@@ -42,6 +42,9 @@ abstract class Connec...
derby-DERBY-6755-cf8e7ff4
DERBY-6755: Adjust MathTrigFunctionsTest to account for discrepancy introduced by Java 9; commit derby-6755-01-aa-java9diff.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1629251 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6764-383bfd5f
DERBY-6764(analyze impact of poodle security alert on Derby client - server ssl support) Fixed problem with array counter. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1636798 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ " String[] supportedProtocols = new String[enabledProtocols.length];", " int supportedProtocolsCount = 0;", " if (!(enabledProtocols[i...
derby-DERBY-6764-f78eb01c
DERBY-6764(analyze impact of poodle security alert on Derby client - server ssl support) Removed SSLv3 and SSLv2Hello from list of enabled protocols on the client and server side to avoid poodle security breach. Also, changed NaiveTrustManager to use TLS as the default protocol rather than SSL. If NaiveTrustManager used SSL, then it won't find any enabled protocols for SSL after the removal of SSLv3 and SSLv2Hello. Changing it to TLS makes TLS protocols available for communication. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1636509 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/net/OpenSocketAction.java", "hunks": [ { "added": [ "" ], "header": "@@ -22,6 +22,7 @@", "removed": [] }, { "added": [ "import javax.net.ssl.SSLSocket;" ], "header": "...
derby-DERBY-6768-99d48baf
DERBY-6768(List the enabled protocols in derby.log for network server configuration) With this change, we will now print the enabled protocols list in the log file when the server starts up. A sample new line in the log will look as follows Wed Nov 12 21:32:21 PST 2014 : Apache Derby Network Server - 10.12.0.0 alpha - (1636020M) Enabled Protocols are SSLv3, TLSv1, TLSv1.1, TLSv1.2 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1639804 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ " /*", " * DERBY-6768(List the enabled protocols in derby.log for network ", " * server configuration)", " * Get the enabled protocols...
derby-DERBY-6773-d02bb72f
DERBY-6773: Derby throws plain SQLIntegrityConstraintViolationException This patch includes contributions from Abhinav Gupta (abhinavgupta2004 at gmail dot com) This patch enables use of the new Derby-specific subclass of SQLIntegrityConstraintViolationException in both the embedded and client-server configurations of the SQLExceptionFactory. In addition, a number of new tests are added to verify that the new exception is thrown and can be caught as we expect, and that the accessor methods on the new exception allow applications to determine which table name and constraint name were responsible for the exception. We still have a couple cleanup tasks before DERBY-6773 is fully complete, but as of this patch the new behavior is in effect. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1696690 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/SQLExceptionFactory.java", "hunks": [ { "added": [ "import org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException;" ], "header": "@@ -34,6 +34,7 @@ import org.apache.derby.iapi.error.Standar...
derby-DERBY-6774-dbde907f
DERBY-6774 org.apache.derbyTesting.functionTests.tests.lang.AlterTableTest.testAddIdentityColumn failed with assert in nightlys Temporarily removing assert that is failing, looks like code should handle the condition anyway. Will renable after figuring out what is going on, hoping this will allow for clean runs from others while I work on this issue. My current theory is that there is a long time problem with alter table and the conglomerate cache that has been uncovered by this relatively new test and the new background work introduced by DERBY-4057. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1641753 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/heap/Heap.java", "hunks": [ { "added": [ " // DERBY-6774 - temp disabling this ASSERT while working on", " // why it is firing in trunk. The hope is that trunk tests", " /...
derby-DERBY-6775-2678c360
DERBY-4057 Removing one check in test that is failing across platforms. Separate work under DERBY-6775 will improve the test in this area. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1643463 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6775-a48aa44d
DERBY-6775 add to testBlobLinkedListReclamationOnRollback() test to check that free space is used on subsequent inserts increasing wait time, hoping to make test stable on slow machine in oracle nightly testing. Making it retry at least twice and increasing second retry time. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1647844 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6783-54844c3a
DERBY-6783: WHEN clause in CREATE TRIGGER for UPDATE is not working. This patch was contributed by Abhinav Gupta (abhinavgupta2004 at gmail dot com) The main challenge raised by this issue involved the analysis of which columns are referenced by the trigger. Trigger statements can reference columns in a number of ways, including the "AFTER UPDATE OF" clause, the trigger's action statement, and the trigger's "WHEN" clause. When the WHEN clause support was introduced, this added a new way in which a TRIGGER could reference columns, and the compiler code which translated the trigger's logic into specific column references at runtime wasn't getting the right set of columns. The intent of this patch is to successfully run sql queries in Derby that trigger updates in a table, affecting only a certain rows of data that is determined by the when clause. This patch tries to cover a wide range of possible ways in which rows are conditionally updated after an event. Before this patch such trigger commands failed to execute correctly and left the data in an inconsistent state. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1688062 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java", "hunks": [ { "added": [ "\tpublic int[] examineTriggerNodeAndCols(", "\t\t\tVisitable actionStmt,", "\t\t\tString oldReferencingName,", "\t\t\tString newReferencingName,", ...
derby-DERBY-6786-2302f2a5
DERBY-6786(NullPointerException in INSERT INTO statement with multiple subselects) Adding test casee for DERBY-6786. One test case(zztestDerby6786InsertIntoSelectCase3) which will result into NPE has been disabled. Once DERBY-6786 is fixed, we should enable that test by removing the zz in front of the test name. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1651707 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6786-36dd3e20
DERBY-6788(Wrong value inserted by INSERT INTO with multiple subselects) Adding a junit test case for DERBY-6788. This bug might be related to DERBY-6786(NullPointerException in INSERT INTO statement with multiple subselects) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1653986 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-6788-36dd3e20
DERBY-6788(Wrong value inserted by INSERT INTO with multiple subselects) Adding a junit test case for DERBY-6788. This bug might be related to DERBY-6786(NullPointerException in INSERT INTO statement with multiple subselects) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1653986 13f79535-47bb-0310-9956-ffa450edef68
[]