Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-49

MariaDB python connector and have noticed a difference in how things seem to be converted

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 0.9.56
    • Generic
    • None

    Description

      We are testing out utilizing the MariaDB python connector and have noticed a difference in how things seem to be converted. We have a lot of processes that return the value as a decimal, and from that point we do comparisons on them. When running the MariaDB python connector, these seem to be converted into a string when returned from the database, this causing issues in the direct comparisons.

      MariaDB Connector return with decimal values, shown as a string:
      [['27', 53549, '0.0005', '0.9995']]

      Other connectors:
      [[Decimal('27'), 53549, Decimal('0.0005'), Decimal('0.9995')]]

      Attachments

        Activity

          hill David Hill (Inactive) created issue -
          georg Georg Richter made changes -
          Field Original Value New Value
          Fix Version/s 0.9.56 [ 24303 ]
          georg Georg Richter made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          georg Georg Richter added a comment -

          Decimal is a non standard type and requires import of the decimal module. Decimal also needs to be supported when passing parameters to execute() and executemany().

          georg Georg Richter added a comment - Decimal is a non standard type and requires import of the decimal module. Decimal also needs to be supported when passing parameters to execute() and executemany().

          Even if it is a double it could be returned as such. Just probably not returned as a string as it is.

          bwitzke Brandon Witzke added a comment - Even if it is a double it could be returned as such. Just probably not returned as a string as it is.
          georg Georg Richter made changes -
          issue.field.resolutiondate 2020-04-05 20:04:29.0 2020-04-05 20:04:29.361
          georg Georg Richter made changes -
          Component/s Generic [ 14515 ]
          Resolution Fixed [ 1 ]
          Status Confirmed [ 10101 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 106681 ] MariaDB v4 [ 135624 ]

          People

            georg Georg Richter
            hill David Hill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.