Derby
  1. Derby
  2. DERBY-4704

Incorrect nullability when casting non-nullable VARCHAR to BOOLEAN

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.7.1.1
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Patch Available
    • Bug behavior facts:
      Wrong query result

      Description

      With the following table definition and query

      CREATE TABLE T (X VARCHAR(10) NOT NULL);
      INSERT INTO T VALUES 'true', 'false', 'unknown';
      SELECT CAST(X AS BOOLEAN) FROM T;

      the meta-data for the returned result will say that the column is not nullable, although it will contain a NULL value in the third row.

      1. repro.diff
        2 kB
        Knut Anders Hatlen
      2. derby-4704-01-aa-nullability.diff
        4 kB
        Rick Hillegas

        Issue Links

          Activity

          Knut Anders Hatlen created issue -
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Bug behavior facts [Wrong query result]
          Knut Anders Hatlen made changes -
          Attachment repro.diff [ 12447445 ]
          Rick Hillegas made changes -
          Link This issue is part of DERBY-499 [ DERBY-499 ]
          Rick Hillegas made changes -
          Assignee Rick Hillegas [ rhillegas ]
          Rick Hillegas made changes -
          Attachment derby-4704-01-aa-nullability.diff [ 12447466 ]
          Rick Hillegas made changes -
          Issue & fix info [Patch Available]
          Rick Hillegas made changes -
          Fix Version/s 10.7.0.0 [ 12314971 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Rick Hillegas made changes -
          Affects Version/s 10.7.1.1 [ 12315564 ]
          Affects Version/s 10.7.1.0 [ 12314971 ]
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Gavin made changes -
          Workflow jira [ 12513732 ] Default workflow, editable Closed status [ 12800243 ]

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development