Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C870A200CA3 for ; Fri, 2 Jun 2017 00:03:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C6E53160BE0; Thu, 1 Jun 2017 22:03:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 19A97160BC4 for ; Fri, 2 Jun 2017 00:03:08 +0200 (CEST) Received: (qmail 52264 invoked by uid 500); 1 Jun 2017 22:03:08 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 52253 invoked by uid 99); 1 Jun 2017 22:03:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 22:03:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B61CECEDFB for ; Thu, 1 Jun 2017 22:03:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8-R1GkXFYSN9 for ; Thu, 1 Jun 2017 22:03:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E85B060E26 for ; Thu, 1 Jun 2017 22:03:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 475BFE0C1B for ; Thu, 1 Jun 2017 22:03:06 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0477D21B5A for ; Thu, 1 Jun 2017 22:03:05 +0000 (UTC) Date: Thu, 1 Jun 2017 22:03:05 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6903) ALTER TABLE ALTER COLUMN resets CYCLE option of IDENTITY column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 01 Jun 2017 22:03:10 -0000 [ https://issues.apache.org/jira/browse/DERBY-6903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033787#comment-16033787 ] ASF subversion and git services commented on DERBY-6903: -------------------------------------------------------- Commit 1797283 from [~bryanpendleton] in branch 'code/trunk' [ https://svn.apache.org/r1797283 ] 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. > ALTER TABLE ALTER COLUMN resets CYCLE option of IDENTITY column > --------------------------------------------------------------- > > Key: DERBY-6903 > URL: https://issues.apache.org/jira/browse/DERBY-6903 > Project: Derby > Issue Type: Sub-task > Components: SQL > Affects Versions: 10.13.1.0 > Reporter: Bryan Pendleton > Assignee: Harshvardhan Gupta > Priority: Minor > > Using ALTER TABLE with the SET INCREMENT BY or SET RESTART WITH > options to make a change to a GENERATED ... BY IDENTITY column resets the CYCLE option of that column to "off". > Some test cases demonstrating this behavior were added as part of > the DERBY-6852 change revision 1756287 > The problem occurs when the ALTER TABLE code drops and recreates > the underlying SEQUENCE object, and does not preserve the CYCLE > option of the underlying SEQUENCE object. > I believe the correct behavior would be for the ALTER TABLE code > to read the current CYCLE option of the underlying SEQUENCE object > first, and then create the new SEQUENCE object with the same value > for the CYCLE option. -- This message was sent by Atlassian JIRA (v6.3.15#6346)