[MDEV-11986] CONNECT ODBC Bug: Engine Converts LEFT JOIN into INNER JOIN Created: 2017-02-03  Updated: 2017-02-03  Resolved: 2017-02-03

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.1.21
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Juan Telleria Assignee: Olivier Bertrand
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Windows



 Description   

I just realized about a bug, I do not know if it is because of the CONNECT ODBC Engine or MariaDB Server itself:

When I do a query such as:

SELECT
     *
FROM
     t_name_Local_Server AS A
     LEFT JOIN t_Name_Remote_Server AS B
          ON A.Join_Column_Name = B.Join_Column_Name

MariaDB returns a Result Set which performs an INNER JOIN, not a LEFT JOIN. That is, it returns a result set which contains only those rows which are not null in Table aliased as B (t_Name_Remote_Server).



 Comments   
Comment by Olivier Bertrand [ 2017-02-03 ]

This is logical. In this query t_Name_Remote_Server is not a real table but the result set retrieved from the remote server. SQL result sets do not contain null rows. This explains that.

Ok to add this information in the documentation.

Generated at Thu Feb 08 07:54:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.