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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.3.0
    • 10.5.3.1, 10.6.1.0
    • SQL
    • None
    • 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

      Attachments

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

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              dagw Dag H. Wanvik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: