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

Incorrect nullability when casting non-nullable VARCHAR to BOOLEAN

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1
    • 10.7.1.1
    • SQL
    • None
    • Patch Available
    • 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.

      Attachments

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

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: