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

Cast to UDT in CHECK constraint causes NPE or assert failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.10.1.1
    • 10.11.1.1
    • SQL
    • None
    • Repro attached

    Description

      ij version 10.10
      ij> connect 'jdbc:derby:memory:db;create=true';
      ij> create type typ external name 'java.util.ArrayList' language java;
      0 rows inserted/updated/deleted
      ij> create table ttt(x int, check (cast(null as typ) is null));
      0 rows inserted/updated/deleted
      ij> insert into ttt values 1,2,3;
      ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

      or with debug build:

      ij> insert into ttt values 1,2,3;
      ERROR XJ001: Java exception: 'ASSERT FAILED no current dependent for compilation: org.apache.derby.shared.common.sanity.AssertFailure'.

      Attachments

        1. d6421-1a.diff
          4 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: