[MDEV-27285] CONNECT ODBC : not reliable anymore Created: 2021-12-16  Updated: 2021-12-17  Resolved: 2021-12-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.4.22, 10.5.13, 10.6.5, 10.7.1
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Cédric Belin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: connect-engine, regression
Environment:

CentOS 7
CentOS 8 Stream
Windows 10
Windows Server 2019
SQL Server 2000
SQL Server 2012


Issue Links:
Duplicate
duplicates MDEV-27055 ENGINE = CONNECT Closed

 Description   

We use the CONNECT engine with ODBC tables to query instances of SQL Server (2000 and 2012).
Everything worked fine until we upgraded our MariaDB Servers (from 10.5.10 to 10.5.13, from 10.5.10 to 10.6.5, and from 10.5.10 to 10.7.1).

After the upgrade, some SQL queries return totally wrong results. For example:

SELECT *
FROM `f_docentete`
WHERE `DO_Type` = 7 AND `DO_Piece` LIKE 'E%'

...returns a result set of 2174 rows. But this query:

SELECT COUNT( * )
FROM `f_docentete`
WHERE `DO_Type` = 7 AND `DO_Piece` LIKE 'E%'

...returns 0 (zero) whereas before the upgrade it returned the right value (i.e. 2174).

A more complex query like this one :

SELECT `documentHeader`.`CT_NumPayeur` AS `documentHeader@@@CT_NumPayeur`
FROM `f_docentete` AS `documentHeader`
LEFT JOIN `p_expedition` AS `carrier` ON (`carrier`.`cbMarq` = `documentHeader`.`DO_Expedit`)
LEFT JOIN `f_docregl` AS `documentSettlement` ON ((`documentSettlement`.`DO_Piece` = `documentHeader`.`DO_Piece`) AND (`documentSettlement`.`DO_Type` = `documentHeader`.`DO_Type`))
LEFT JOIN `f_represent` AS `representative` ON (`representative`.`RE_No` = `documentHeader`.`RE_No`)
LEFT JOIN `f_comptet` AS `thirdPartyAccount` ON (`thirdPartyAccount`.`CT_Num` = `documentHeader`.`DO_Tiers`)
WHERE ((`documentHeader`.`DO_Piece` = 'EBL24592') AND (`documentHeader`.`DO_Type` = 3))
LIMIT 1

...returned one row whereas now it returns no row.
If we use "SELECT *" instead of specifying a specific column, the query returns one row when the result should be the same (i.e. no row)!

Installing a previous version like 10.4.22 did not resolve the issue, but downgrading to 10.5.10 worked.

This issue is not tied to the platform : our MariaDB servers are hosted on CentOS 7, CentOS 8, Windows Server 2019 and Windows 10, and all platforms are affected.



 Comments   
Comment by Alice Sherepa [ 2021-12-16 ]

probably the same regression as MDEV-27055

Comment by Cédric Belin [ 2021-12-16 ]

Ah, I hadn't seen that ticket. I have the impression that it is the same.
So I just have to wait for the next MariaDB releases to see if it is indeed fixed.

Generated at Thu Feb 08 09:51:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.