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

CONNECT ODBC : not reliable anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 10.4.22, 10.5.13, 10.6.5, 10.7.1
    • Fix Version/s: N/A
    • Environment:
      CentOS 7
      CentOS 8 Stream
      Windows 10
      Windows Server 2019
      SQL Server 2000
      SQL Server 2012

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              cedx Cédric Belin
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.