Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6904 Enhance ALTER TABLE to allow CYCLE option to be changed.
  3. DERBY-6903

ALTER TABLE ALTER COLUMN resets CYCLE option of IDENTITY column

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 10.13.1.0
    • 10.14.1.0
    • SQL
    • None

    Description

      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.

      Attachments

        Activity

          People

            harshvardhan145 Harshvardhan Gupta
            bryanpendleton Bryan Pendleton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: