Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3566

Alter column set data type not allowed in soft upgrade with unique constraint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.4.1.3
    • 10.4.1.3, 10.5.1.1
    • SQL
    • None
    • Regression

    Description

      In 10.3 I can do this:

      ij> create table t0 (i int not null, v varchar(1) not null, constraint uq unique(v,i));
      0 rows inserted/updated/deleted
      ij> alter table t0 alter v set data type varchar(2);
      0 rows inserted/updated/deleted
      ij>

      In 10.4 soft upgrade mode I cannot:
      ij> create table t0 (i int not null, v varchar(1) not null, constraint uq unique(v,i));
      0 rows inserted/updated/deleted
      ij> alter table t0 alter v set data type varchar(2);
      ERROR 42Z20: Column 'V' cannot be made nullable. It is part of a primary key or unique constraint, which cannot have any
      nullable columns.
      ij>

      Attachments

        1. derby-3566_v1.diff
          3 kB
          Anurag Aggarwal

        Activity

          People

            anurag Anurag Aggarwal
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: