Derby
  1. Derby
  2. DERBY-4442

Evaluation of default value and identity in an INSERT result set evaluated too early.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Bug behavior facts:
      Deviation from standard

      Description

      In contrast to generated column, which are evaluated when the next row from the result set to be inserted, currently default values and identity columns are generated "early", that is as part of avaluating the subquery (SELECT or VALUES as the case may be).
      This does not currently cause a user visible bug in Derby, but it lies behind DERBY-3 and the effect Bryan observed in DERBY-4.
      Additionally, "early" computation has given rise to much special handling and ensuing bugs, cf. DERBY-1644, DERBY-4413, DERBY-4419, DERBY-4425 and others.

      DERBY-4397 requires this fix for correct behaviour with INSERT.

      See also
      https://issues.apache.org/jira/browse/DERBY-4413?focusedCommentId=12769532&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12769532

      1. backout-derby-4425.diff
        0.6 kB
        Knut Anders Hatlen
      2. d4442-1b.diff
        17 kB
        Knut Anders Hatlen
      3. d4442-1a.diff
        17 kB
        Knut Anders Hatlen
      4. d4442-1a.stat
        0.5 kB
        Knut Anders Hatlen
      5. insert.diff
        7 kB
        Dag H. Wanvik
      6. always_prn.diff
        11 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Dag H. Wanvik created issue -
          Dag H. Wanvik made changes -
          Field Original Value New Value
          Link This issue is related to DERBY-4 [ DERBY-4 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-3 [ DERBY-3 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-1644 [ DERBY-1644 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4413 [ DERBY-4413 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-4419 [ DERBY-4419 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-4425 [ DERBY-4425 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4433 [ DERBY-4433 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4433 [ DERBY-4433 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4413 [ DERBY-4413 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4413 [ DERBY-4413 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4433 [ DERBY-4433 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4433 [ DERBY-4433 ]
          Dag H. Wanvik made changes -
          Link This issue blocks DERBY-4413 [ DERBY-4413 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-4413 [ DERBY-4413 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-4433 [ DERBY-4433 ]
          Knut Anders Hatlen made changes -
          Attachment always_prn.diff [ 12425601 ]
          Dag H. Wanvik made changes -
          Attachment insert.diff [ 12425607 ]
          Dag H. Wanvik made changes -
          Link This issue is related to DERBY-4426 [ DERBY-4426 ]
          Knut Anders Hatlen made changes -
          Attachment d4442-1a.stat [ 12425660 ]
          Attachment d4442-1a.diff [ 12425661 ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-4433 [ DERBY-4433 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Attachment d4442-1b.diff [ 12426282 ]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Affects Version/s 10.5.3.0 [ 12314117 ]
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-3 [ DERBY-3 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-4457 [ DERBY-4457 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-4460 [ DERBY-4460 ]
          Knut Anders Hatlen made changes -
          Attachment backout-derby-4425.diff [ 12427160 ]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Issue & fix info [Patch Available]
          Resolution Fixed [ 1 ]
          Lily Wei made changes -
          Link This issue is required by DERBY-4728 [ DERBY-4728 ]
          Lily Wei made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Mike Matrigali made changes -
          Assignee Knut Anders Hatlen [ knutanders ] Mike Matrigali [ mikem ]
          Mike Matrigali made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Mike Matrigali [ mikem ] Knut Anders Hatlen [ knutanders ]
          Fix Version/s 10.5.3.1 [ 12314182 ]
          Resolution Fixed [ 1 ]
          Dag H. Wanvik made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12481989 ] Default workflow, editable Closed status [ 12799999 ]

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development