[jira] [Commented] (DERBY-6904) Enhance ALTER TABLE to allow CYCLE option to be changed.
[ https://issues.apache.org/jira/browse/DERBY-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15907498#comment-15907498 ] Bryan Pendleton commented on DERBY-6904: Thanks for all the work on this! I shall try to find some time to download your patches and see if I can observe the same results that you do. There is an upgrade process in Derby, and I agree with you that it seems like it is not succeeding to upgrade the database properly to be aware of the changed columns in SYSCOLUMNS. I shall have to do some study to understand why the upgrade isn't occurring as you expect. The upgrade is supposed to be automatic based on the version number of the database, but perhaps there is an upgrade function that we will need to code to make the change to SYSCOLUMNS. Or it may be more delicate because SYSCOLUMNS is a particularly sensitive core table. I suppose, as an experiment, you could back out just the SYSCOLUMNS portion of your patch, leaving all the other aspects in place, and see how the various test suites behavior in that scenario? > 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: 10.13.1.0 >Reporter: Bryan Pendleton >Priority: Minor > Attachments: 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 (v6.3.15#6346)
[jira] [Updated] (DERBY-6904) Enhance ALTER TABLE to allow CYCLE option to be changed.
[ 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: 10.13.1.0 >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 (v6.3.15#6346)
[jira] [Comment Edited] (DERBY-6904) Enhance ALTER TABLE to allow CYCLE option to be changed.
[ https://issues.apache.org/jira/browse/DERBY-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15907861#comment-15907861 ] Harshvardhan Gupta edited comment on DERBY-6904 at 3/13/17 5:05 PM: 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. Additionally all the update logic is contained in DD_VERSION file. Please let me know if the current soft strategy I am using is not a desired one. was (Author: harshvardhan145): 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: 10.13.1.0 >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 (v6.3.15#6346)