[CONPY-49] MariaDB python connector and have noticed a difference in how things seem to be converted Created: 2020-04-02 Updated: 2020-08-25 Resolved: 2020-04-05 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Generic |
| Affects Version/s: | None |
| Fix Version/s: | 0.9.56 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hill (Inactive) | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 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: Other connectors: |
| Comments |
| Comment by Georg Richter [ 2020-04-02 ] |
|
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(). |
| Comment by Brandon Witzke [ 2020-04-03 ] |
|
Even if it is a double it could be returned as such. Just probably not returned as a string as it is. |