Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-405

can't read DECIMAL values : Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 3.1.19
    • 3.2.2, 3.1.21
    • General
    • None
    • Windows

    Description

      When using ODBC Connector, values of DECIMAL types cannot be read : reading the recordset's field values causes error "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

      Sample SQL code :

      SET @testDECIMAL := CAST(1.5 AS DECIMAL(15,2));
      SELECT @testDECIMAL;
      

      I attached a sample JSCRIPT to reproduce the bug : run it with CSCRIPT.EXE on a Windows host:

      SET MYSQL_PASSWORD=[ROOT_PASSWORD]
      CSCRIPT.EXE mariadb_decimal_odbc_bug.js
      

      It outputs the error when trying to read the @testDECIMAL variable...

      E.

      Attachments

        Issue Links

          Activity

            Thank you for your report.

            It's strange - the trace has no errors or any signs of abnormality. It will take some more time

            Lawrin Lawrin Novitsky added a comment - Thank you for your report. It's strange - the trace has no errors or any signs of abnormality. It will take some more time

            I did additional tests, and here are more info :

            Regards,

            E.

            edot06 Emmanuel KARTMANN added a comment - I did additional tests, and here are more info : the issue is not new nor specific to this version of MariaDB Driver - in fact, it happens also on mysql drivers , at least since version 5.2.6 (see bug https://bugs.mysql.com/bug.php?id=72541 "Error for fetching a decimal value from a variable" - from 2014 !!!) there is no issue with mysql driver 3.51.30 (reading decimal values from a variable simply works) - I downloaded it from here : https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-3.51.30-winx64.msi Regards, E.

            The reason was that for variable server has bigger max precision for decimal values in variables, than in fields, and the connector returns the value for fields as max precision for decimal type in in the SQLGetTypeInfo. Apparently that causes error in ADO, when it receives the value with higher precision, than it thinks is maximal.
            The fix limits field precision the connector sets in the IRD to the max decimal field precision.

            Lawrin Lawrin Novitsky added a comment - The reason was that for variable server has bigger max precision for decimal values in variables, than in fields, and the connector returns the value for fields as max precision for decimal type in in the SQLGetTypeInfo. Apparently that causes error in ADO, when it receives the value with higher precision, than it thinks is maximal. The fix limits field precision the connector sets in the IRD to the max decimal field precision.

            I confirm that this bug is fixed in latest release (3.2.3) - many thanks!

            Regards,

            E.

            edot06 Emmanuel KARTMANN added a comment - I confirm that this bug is fixed in latest release (3.2.3) - many thanks! Regards, E.

            People

              Lawrin Lawrin Novitsky
              edot06 Emmanuel KARTMANN
              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.