[MDEV-14392] CONNECT - Table Type: ODBC - HAVING Clause (Wihtout WHERE and GROUP BY) Has Wrong Results Created: 2017-11-14  Updated: 2017-12-03  Resolved: 2017-12-03

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

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

Windows



 Description   

When using CONNECT Engine and Table Type ODBC, when using a HAVING clause for filtering data, wrong results are returned if no WHERE and GROUP BY clause is used.

For example:

SELECT
     *
FROM
     MyTable
HAVING
     MyColumn <> 'MyValue' OR MyColumn IS NULL

Does not perform a correct filtering. I think that the correct MariaDB behaviour with the HAVING clause shall be that a "local" copy of the table is done in MariaDB Server, bringing the table through ODBC connection, and then filter it in the "local" server itself.

Thank you,
Juan



 Comments   
Comment by Olivier Bertrand [ 2017-11-20 ]

Can you elaborate? Trying to execute:

select * from oremployees where salary > 10000 and commission_pct is null;
select * from oremployees having salary > 10000 and commission_pct is null;

on the sample employees table of Oracle, I get the same result.

So to try reproduce the bug I should have:

  1. The used ODBC server
  2. The table contains
  3. The table create table
  4. The select statement that gives wrong result
  5. The wrong result

Thanks.

Comment by Juan Telleria [ 2017-11-22 ]

The SELECT Query Calls a 10 million record table in SQL Server, and gives / shows results little by little, before the query is completed.

I did not wait when I filled the bug report to see how where results when the hole query executed, because it took more than 2 hours...
¿Maybe results aren't filtered until all data is on the local MariaDB Server?

I will check it out, and try to provide more accurate feedback.

Thank you,
Juan

Comment by Juan Telleria [ 2017-12-03 ]

I checked it, and it is not a bug.

Juan

Generated at Thu Feb 08 08:13:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.