db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harshvardhan Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6904) Enhance ALTER TABLE to allow CYCLE option to be changed.
Date Mon, 13 Mar 2017 17:03:41 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Harshvardhan Gupta updated DERBY-6904:
    Attachment: 6904_2.diff

Thanks Bryan, 

Soft Upgrade Strategy - 
In the attached updated patch, I tweaked the SYSColumnsRowFactory to serve all columns except
the newly introduced one while running a database in soft upgrade mode. (i.e both forward
and backward compatible). The code flow was modelled after Derby-534 for introducing a new
in column SYSTRIGGERS..

Since most test suites used only soft upgrade mode, I passed all the test suites except the
upgradeTests package which explicitly boots the old databases in hard upgrade mode other than
soft upgrade mode. I am yet to implement a hard upgrade strategy.

Should we look at the SYSSEQUENCES column and populated the value in SYSCOLUMNS as part of
explicit hard upgrade?
The updated patch passed all the test suites other than upgradeTests test suite where some
tests require a hard update strategy. I also tested soft updates using IJ for database created
using 10.13, the created databases are both backward and forward compatible with 10.14.

> Enhance ALTER TABLE to allow CYCLE option to be changed.
> --------------------------------------------------------
>                 Key: DERBY-6904
>                 URL: https://issues.apache.org/jira/browse/DERBY-6904
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Bryan Pendleton
>            Priority: Minor
>         Attachments: 6904_2.diff, 6904.diff, columnMismatch, compareDbName
> It would be nice to have a variant of the ALTER TABLE statement,
> similar to the SET INCREMENT BY or SET RESTART WITH variants,
> that allowed a user to change the CYCLE option on an IDENTITY column.
> I think that the code flow for this could be closely modelled on the
> code flow for the SET INCREMENT BY variant: after the statement
> is parsed, we simply need to drop and recreate the underlying SEQUENCE
> object with the desired CYCLE option (and preserving all the other
> aspects of the underlying SEQUENCE object.

This message was sent by Atlassian JIRA

View raw message