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

Scalar time and date functions return 0 instead NULL when argument is NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.3.2, 10.2.1.6
    • 10.3.1.4
    • SQL
    • None
    • Release Note Needed

    Description

      The scalar time and date functions should return NULL when argument is NULL.

      Sample ij run that reproduces the bug

      ij> create table dt (ts timestamp);
      0 rows inserted/updated/deleted
      ij> insert into dt values (

      {ts '2005-11-28 14:49:40'}

      ), (NULL);
      2 rows inserted/updated/deleted
      ij> select * from dt;
      TS
      --------------------------
      2005-11-28 14:49:40.0
      NULL

      2 rows selected
      ij> select

      {fn hour(ts)}

      from dt;
      1
      -----------
      14
      0

      might be a problem with other scalar functions too.

      Attachments

        1. releaseNote.html
          3 kB
          Myrna van Lunteren
        2. DERBY-729-1.stat
          0.4 kB
          Bernt Johnsen
        3. DERBY-729-1.diff
          12 kB
          Bernt Johnsen

        Activity

          People

            bernt Bernt Johnsen
            bernt Bernt Johnsen
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: