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

All Columns become Nullable when Using left join

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.1.1
    • 10.5.3.1, 10.6.1.0
    • JDBC, SQL
    • None
    • Microsoft Windows XP SP3, Sun JDK 6 Update 14
    • 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)

      Attachments

        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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            knutanders Knut Anders Hatlen
            chuacheeseng83 Chua Chee Seng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment