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

Decimal values returned as strings when passing in paramaters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 0.9.58
    • DBAPI 2.0
    • None

    Description

      Passing in parameters causes decimals to be returned as strings.

      conn = mariadb.connect(**config)
      cur = conn.cursor()
      query = "select round(.75 * (? / 3), 2) as val"
      cur.execute(query,[5])
      print(result)

      1. returns ('1.25',)

      conn = mariadb.connect(**config)
      cur = conn.cursor()
      query = "select round(.75 * (6 / 3), 2) as val"
      cur.execute(query)
      print(result)

      1. returns (Decimal('1.50'),)

      Attachments

        Activity

          People

            georg Georg Richter
            rhedgpeth Rob Hedgpeth (Inactive)
            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.