Permalink
Commits on Jun 22, 2017
  1. DERBY-6905: Enhance SYS.SYSCOLUMNS to report the CYCLE value for IDEN…

    …TITY column
    
    This patch updates the dblook test output to reflect the expected value for
    the CYCLE column in the output.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1799586 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 22, 2017
Commits on Jun 10, 2017
  1. DERBY-6935: Test coverage for added features

    This patch was contributed by Harshvardhan Gupta (harshvardhan145 at gmail dot com)
    
    The patch adds additional test cases for the new CYCLE-related features
    of the identity column support.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1798340 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 10, 2017
  2. DERBY-6935: Test coverage for added features

    This patch was contributed by Harshvardhan Gupta (harshvardhan145 at gmail dot com)
    
    The patch adds additional test cases for the new CYCLE-related features
    of the identity column support.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1798290 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 10, 2017
Commits on Jun 1, 2017
  1. DERBY-6903: ALTER TABLE ALTER COLUMN resets CYCLE option

    DERBY-6904: Enhance ALTER TABLE to allow CYCLE option to be changed
    DERBY-6905: Enhance SYS.SYSCOLUMNS to report the CYCLE value
    DERBY-6906: Allow a GENERATED column to explicitly specify NO CYCLE
    
    This patch was contributed by Harshvardhan Gupta (harshvardhan145 at gmail dot com)
    
    The patch adds the CYCLE property as a fundamental property associated
    with a column similar to current increment value, current increment step etc.
    
     *  SYS.SYSCOLUMNS extended to hold the cycle value of identity column.
     *  Extended the grammar to accept "cycle","no cycle" in alter clause
        and changed the underlying column descriptor and sequencing objects.
     *  ALTER clause not involving cycle option (i.e increment and restart)
        won't affect the cycle option.
    
    The code flow for the upgrade handling was modelled after Derby-534
    for introducing a new in column SYSTRIGGERS. There are new behaviors
    for SYSCOLUMNS in both soft- and hard-upgrade scenarios.
    
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1797283 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 1, 2017
Commits on May 7, 2017
  1. DERBY-6932: Tests passed cleanly against derby-6932-01-aa-suppressDep…

    …recationWarnings.diff, committing...
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1794230 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed May 7, 2017
Commits on Jan 19, 2017
  1. DERBY-6856: Fix the old-style test harness to run with recent jigsaw-…

    …related changes introduced in JDK 9; tests passed cleanly on derby-6856-11-aa-jigsawResourceLocation.diff.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1779411 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed Jan 19, 2017
Commits on Jan 15, 2017
  1. DERBY-6856: Disable SystemPrivilegesPermissionTest.testSerialization(…

    …), an unnecessary test case which fails on JDK 9. Tests passed cleanly on derby-6856-10-aa-disable-permissions-subverting-test.diff.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1778945 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed Jan 15, 2017
Commits on Dec 3, 2016
  1. DERBY-6918: Problem with schema name containing a period

    When processing DELETE statements in a database schema including
    referential integrity constraints that specify ON DELETE CASCADE,
    it is easiest to keep the schema name and table name separate,
    rather than pasting them together into a compound name joined with
    a period, because pasting them together results in ambiguity about
    which period separates the schema name from the table name, and
    which period was simply part of the schema name proper.
    
    Adjusted the logic in DeleteNode and DMLModStatementNode accordingly.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1772428 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Dec 3, 2016
Commits on Nov 19, 2016
  1. DERBY-6902: Value out of range error

    This change adds still more new test cases to ParameterMappingTest, derived
    from the original scenario described in the issue.
    
    The new test cases explore some datatype conversions from string-to-integer.
    
    They also look at some other variations on the original query from the
    issue, demonstrating that the details of the phrasing of the query affect
    the query compiler's decisions about intermediate data types.
    
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1770458 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Nov 19, 2016
Commits on Nov 16, 2016
  1. DERBY-6902: Value out of range error

    This change adds several new test cases to ParameterMappingTest, derived
    from the original scenario described in the issue.
    
    These test cases are designed to demonstrate the particular exception
    discussed in the issue, as well as to demonstrate several ways to use
    a CAST operator so that the query executes as desired.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1769904 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Nov 16, 2016
Commits on Oct 29, 2016
  1. DERBY-6911: Update STATUS page

    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1767115 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Oct 29, 2016
Commits on Oct 27, 2016
  1. DERBY-6911: Add 10.13.1.1 jars to upgrade test quites

    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1766755 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Oct 27, 2016
Commits on Oct 1, 2016
  1. 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
    Bryan Pendleton committed Oct 1, 2016
Commits on Sep 27, 2016
  1. DERBY-6911: Update the release id in trunk to 10.14

    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1762398 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Sep 27, 2016
  2. Bump version number on trunk to 10.14.0.0

    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1762397 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Sep 27, 2016
  3. Add public key for Bryan Pendleton

    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1762392 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Sep 27, 2016
Commits on Aug 13, 2016
  1. DERBY-6852: Allow identity columns to cycle

    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This change introduces the new CYCLE keyword to the syntax of a
    generated identity column. The CYCLE keyword, if specified, causes Derby
    to select the CYCLE option in the sequence object that is created
    internally to implement the identity column.
    
    In turn, this means that values can be generated for the identity column
    beyond the maximum value for the column's datatype; when that maximum
    is reached, the sequence "cycles" and begins over again, (re-)generating
    the values all over again.
    
    Note that, as part of this change, when a Derby sequence cycles, it now
    cycles to its minimum/maximum value (depending on whether it has a 
    positive increment or a negative increment) rather than to its start
    value; we believe this is improved behavior and is still standards-compliant.
    
    With this change, the basic behavior is operational and there are tests
    to demonstrate this. Various syntax checks are made, and the underlying
    sequence is created correctly.
    
    There is follow-up work to be done, which will be addressed possibly as
    separate projects; we believe the basic feature is certainly usable
    as of this change (and once we add documentation for it).
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1756287 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Aug 13, 2016
Commits on Aug 4, 2016
  1. DERBY-853: ResultSetMetaData.getScale returns inconsistent values

    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    When a SQL statement contains arithmetic expressions, the result of the
    expression may be of a different type than the operands to the expression,
    due to type precedence rules which may require promoting the operand
    values during evaluation of the expression.
    
    For example, subtracting a DOUBLE from a DECIMAL results in a DOUBLE.
    
    In some of these cases, Derby was reporting that the result column
    had a non-zero scale, although the result column was not of DECIMAL type.
    
    This change modifies the NumericTypeCompiler so that it only computes
    a non-zero scale for the result column when it is of DECIMAL type.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1755133 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Aug 4, 2016
Commits on Jul 31, 2016
  1. DERBY-6752: Derby tries to load non-existent class AutoloadedDriver40

    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This patch removes the code that tries to load AutoloadedDriver40. That code
    was always failing, because the class was removed from the Derby code by
    revision 1494482, but the attempt to load the class was wrapped in an
    exception catch block so there were no symptoms of the failed class load
    attempt.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1754680 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 31, 2016
Commits on Jul 30, 2016
  1. DERBY-5585: Improve error message when user function can't find class.

    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    Several test output files are adjusted to reflect the new error message text.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1754588 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 30, 2016
Commits on Jul 28, 2016
  1. DERBY-5585: Improve error message when user function can't find class.

    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    Additional text is added to the 42x50 and 42x51 error messages suggesting
    an additional possible cause of the error might be derby.database.classpath.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1754348 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 28, 2016
Commits on Jul 23, 2016
  1. DERBY-4555: Expand SYSCS_IMPORT_TABLE to accept CSV file with header …

    …lines
    
    DERBY-6894: Enhance COLUMNINDEXES parsing for SYSCS_IMPORT_DATA
    
    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This patch is a follow-on to revision 1752990, and ensures that the
    new readHeaders() logic correctly increments the ImportReadData's
    lineNumber field as it's reading the column header lines, so that if
    an error occurs while reading those header lines, a reasonable line
    number is reported in the error message.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1753876 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 23, 2016
Commits on Jul 19, 2016
  1. DERBY-6879: Engine deadlock between XA timeout handling and cleanupOn…

    …Error
    
    This patch was contributed by Brett Bergquist (brett at thebergquistfamily dot com)
    
    This change is a follow-up to revision 1751977.
    
    The problem with that revision occurs if a timeout occurs calling "cancel"
    and if an error occurs on the clients connection causing the "cleanupOnError"
    to be called at the same time.
    
    This change creates a new private static class that is used to track if
    "cancel" or "cleanupOnError" has been invoked. The methods are synchronized
    so that there is no timing issue on checking and recording the state.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1753333 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 19, 2016
Commits on Jul 17, 2016
  1. DERBY-6856: Fix javadoc warnings raised when compiling Derby javadoc …

    …with build 124 of JDK 9: commit derby-6856-09-aa-javadocEntities.diff.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1753091 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed Jul 17, 2016
Commits on Jul 16, 2016
  1. DERBY-4555: Expand SYSCS_IMPORT_TABLE to accept CSV file with header …

    …lines
    
    DERBY-6894: Enhance COLUMNINDEXES parsing for SYSCS_IMPORT_DATA
    
    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    The purpose of this patch is to allow the COLUMNINDEXES value to specify
    columns in the input file by column header "name", as an alternate to
    column index number. Column header names can be specified as double-quoted
    strings, and you can mix-and-match indexes and names, so that
    COLUMNINDEXES could be specified as:
    
        1,3,"LastName","FirstName",7
    
    During the preparation of the input file for import processing, the
    new "readHeaders" method that is added to the Import class will,
    if 'skip > 0', open the input file, read the first 'skip' number of lines,
    parse the column structure, and construct an array of the column headers,
    then close the input file and return the headers array.
    
    Then, the COLUMNINDEXES value, if it contains any column names, rather
    than column index numbers, is matched against the headers array to
    determine which column(s) to use.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1752990 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 16, 2016
Commits on Jul 9, 2016
  1. DERBY-6879: Engine deadlock between XA timeout handling and cleanupOn…

    …Error
    
    This patch was contributed by Brett Bergquist (brett at thebergquistfamily dot com)
    
    The original problem to be solved is that a connection that is performing a
    XA transaction that discovers an error that must be cleaned up is going to
    have a lock on a EmbedConnection and will then require a lock on the
    XATransactionState.
    
    And if the same XA transaction times out (because of the XA transaction
    timer value) while the original XA transaction is being worked, then the
    timeout handling is going to have a lock on the XATransactionState and then
    require a lock on the EmbedConnection, triggering the deadlock.
    
    The change in the patch fixes this problem by altering the locking on
    the XATransactionState when invoked via the timeout by removing the
    synchronization on the "cancel" method and instead using inline
    synchronization on the "XATransactionState" while its internals are being
    altered.
    
    Then, it releases the XATransactionState lock to allow the
    EmbedConnection.rollback method to be invoked without the lock.
    
    Finally, it acquires the lock again to finish cleaning up the XATransactionState.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1751978 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 9, 2016
  2. DERBY-6879: Engine deadlock between XA timeout handling and cleanupOn…

    …Error
    
    This patch was contributed by Brett Bergquist (brett at thebergquistfamily dot com)
    
    The original problem to be solved is that a connection that is performing a
    XA transaction that discovers an error that must be cleaned up is going to
    have a lock on a EmbedConnection and will then require a lock on the
    XATransactionState.
    
    And if the same XA transaction times out (because of the XA transaction
    timer value) while the original XA transaction is being worked, then the
    timeout handling is going to have a lock on the XATransactionState and then
    require a lock on the EmbedConnection, triggering the deadlock.
    
    The change in the patch fixes this problem by altering the locking on
    the XATransactionState when invoked via the timeout by removing the
    synchronization on the "cancel" method and instead using inline
    synchronization on the "XATransactionState" while its internals are being
    altered.
    
    Then, it releases the XATransactionState lock to allow the
    EmbedConnection.rollback method to be invoked without the lock.
    
    Finally, it acquires the lock again to finish cleaning up the XATransactionState.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1751977 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 9, 2016
Commits on Jul 8, 2016
  1. DERBY-4555: Expand SYSCS_IMPORT_TABLE to accept CSV file with headers

    DERBY-6893: Create new SYSCS_IMPORT_DATA_BULK procedure
    
    This change was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This change modifies the method Import.importTable so that it has
    a varargs interface, which makes it easier to call it in a variety
    of ways from different system procedures.
    
    Additionally, the change adds a new system procedure, named
    SYSCS_UTIL.SYSCS_IMPORT_DATA_BULK, which is a variant of the
    existing SYSCS_IMPORT_DATA system procedure, but has an additional
    argument at the end that specifies the number of initial lines of
    data in the input file to be skipped.
    
    The anticipated use for this system procedure is to process input
    data files which have been generated by a CSV-data-generating tool
    which includes column header data at the start of the input file.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1751852 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 8, 2016
Commits on Jul 3, 2016
  1. DERBY-4555: Expand SYSCS_IMPORT_TABLE to accept CSV file with headers

    DERBY-6892: Create new SYSCS_IMPORT_TABLE_BULK procedure
    
    This change was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This change modifies the method Import.importTable so that it has
    a varargs interface, which makes it easier to call it in a variety
    of ways from different system procedures.
    
    Additionally, the change adds a new system procedure, named
    SYSCS_UTIL.SYSCS_IMPORT_TABLE_BULK, which is a variant of the
    existing SYSCS_IMPORT_TABLE system procedure, but has an additional
    argument at the end that specifies the number of initial lines of
    data in the input file to be skipped.
    
    The anticipated use for this system procedure is to process input
    data files which have been generated by a CSV-data-generating tool
    which includes column header data at the start of the input file.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1751159 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jul 3, 2016
Commits on Jun 25, 2016
  1. DERBY-6891: Improve the synchronization behavior of DerbyObservable; …

    …commit derby-6891-01-ab-synchronizeMethods.diff.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1750214 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed Jun 25, 2016
Commits on Jun 18, 2016
  1. DERBY-6890: ALTER TABLE DROP COLUMN corrupts secondary index collatio…

    …n data.
    
    During ALTER TABLE DROP COLUMN, we rebuild all the indexes on the table. Some
    indexes may be entirely dropped, some indexes may be rebuilt with a subset
    of columns, some indexes are simply rebuild with essentially the same content.
    
    The issue is that the index rebuild logic was incorrectly setting the
    collation data for each index. So the indexes had the right data, but the
    wrong collation information, causing them to be damaged.
    
    This change moves the computation of the index collation ids out of the
    setUpAllSorts method, into the getAffectedIndexes method, where it is simpler
    to compute the index collation ids appropriately, because the code in that
    location already has logic to manipulate both the old (pre-DROP) and new
    (post-DROP) table descriptions, and so it is straightforward to compute the
    correct collation ids there.
    
    As part of this change, an old test case in CollationTest2, which was marked
    with the comment "this test does not work yet", and was disabled, is changed
    (un-commented) and is now enabled.
    
    I found no new problems with this test case. I believe that, at the time
    that comment was written, there were bugs in Derby that have since been
    repaired, and hence it is appropriate to enable this test case at this time.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1749069 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 18, 2016
Commits on Jun 9, 2016
  1. DERBY-6550: Bulk-insert causes identity columns to cycle when they sh…

    …ouldn't
    
    This change was contributed by Danoja Dias (danojadias at gmail dot com)
    
    Adds a new test case to verify that a bigint identity column correctly
    refuses to cycle when the identity value reaches the maximum value.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1747486 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 9, 2016
Commits on Jun 3, 2016
  1. DERBY-6856: Cleanup javadoc warnings introduced by the previous patch…

    … on this issue.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1746712 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed Jun 3, 2016
Commits on Jun 1, 2016
  1. DERBY-3181: DatabaseMetaData.getBestRowIdentifier behavior with inval…

    …id scope
    
    This patch was contributed by Danoja Dias (danojadias at gmail dot com)
    
    This change is a follow-on to revision 1745414, and removes the
    getBestRowIdentifierEmpty query definition from the queries in
    metadata.properties.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1746487 13f79535-47bb-0310-9956-ffa450edef68
    Bryan Pendleton committed Jun 1, 2016
Commits on May 30, 2016
  1. DERBY-6856: Clean up the last deprecation warning introduced by build…

    … 118 of JDK 9: commit derby-6856-07-aa-oneMoreNewInstance.diff.
    
    git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1746132 13f79535-47bb-0310-9956-ffa450edef68
    Richard N. Hillegas committed May 30, 2016