Derby
  1. Derby
  2. DERBY-4284

All Columns become Nullable when Using left join

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: JDBC, SQL
    • Labels:
      None
    • Environment:
      Microsoft Windows XP SP3, Sun JDK 6 Update 14
    • Urgency:
      Normal

      Description

      Consider following:-

      create table person (
      id varchar(20) not null,
      name varchar(100) not null
      );

      create table car (
      id varchar(20) not null,
      person_id varchar(20) not null,
      model varchar(100) not null,
      plat_no varchar(100) not null
      );

      When select :-
      select
      p.name,
      c.model,
      c.plat_no
      from person p
      left join car c on (p.id = c.person_id);

      From the ResultSet, get the ResultSetMetaData and inspect each column's isNullable() value, which is always = 1 (always nullable). Expected : column 'p.name' isNullable = 0 (not nullable), but I get 'p.name' isNullable = 1 (nullable)

      1. derby-4284-1a.diff
        8 kB
        Knut Anders Hatlen
      2. derby-4284-1b.diff
        12 kB
        Knut Anders Hatlen
      3. derby-4284-1b.stat
        0.5 kB
        Knut Anders Hatlen
      4. derby-4284-1c.diff
        14 kB
        Knut Anders Hatlen
      5. derby-4284-1c.stat
        0.7 kB
        Knut Anders Hatlen
      6. derby-4284-1d.diff
        14 kB
        Knut Anders Hatlen
      7. Main.java
        2 kB
        Dag H. Wanvik

        Issue Links

          Activity

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Chua Chee Seng
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development