Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12818

Inner join output is incorrect (extra row is returned)

    XMLWordPrintable

Details

    Description

      1. ddl/dml is attached.
      2. using server - MariaDB 10.2.4 RC
      using client - version 1.5.9 (mariadb-java-client-1.5.9.jar)
      3. incorrect results (extra row) for the below sql.

      SELECT
          `T2`.`PNO`, 
          `T1`.`SNO`, 
          `T1`.`PNO`, 
          `T1`.`QTY`
      FROM
          `TPARTS` `T2`, 
          `TPARTS` `T3`, 
          (
          SELECT
              `SNO`, 
              `PNO`, 
              `QTY`
          FROM
              `TSUPPLY` 
          WHERE 
              `SNO` = 'S1' AND
              `PNO` = 'P1'
          ) T1 
      WHERE 
          `T2`.`PNO` = `T1`.`PNO` AND
          `T2`.`PNO` = `T3`.`PNO`
      

      Expected results

      PNO SNO PNO QTY
      P1	S1	P1	200
      P1	S1	P1	700
      

      MariaDB results

      PNO SNO PNO QTY
      P1	S1	P1	200
      P1	S1	P1	700
      P1	S5	P1	100
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            yoonse Seong Yoon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.