Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
-
Python 3.7.8 (64-bit) for Windows
mariadb package 1.0.0 installed from pip
Server version 10.3.21-MariaDB on Synology DSM installed from Package Center
$ cat /var/packages/MariaDB10/etc/my.cnf
[mariadb]
character_set_client=utf8mb4
character_set_server=utf8mb4
collation_server=utf8mb4_general_ci
explicit_defaults_for_timestamp=on
Python 3.7.8 (64-bit) for Windows mariadb package 1.0.0 installed from pip Server version 10.3.21-MariaDB on Synology DSM installed from Package Center $ cat /var/packages/MariaDB10/etc/my.cnf [mariadb] character_set_client=utf8mb4 character_set_server=utf8mb4 collation_server=utf8mb4_general_ci explicit_defaults_for_timestamp=on
Description
When I execute the following line, server receives zero in the first parameter instead of one:
cursor.execute(
|
'select %(value)s, %(dummy)s', |
dict(value=decimal.Decimal(1), dummy=1), |
)
|
The following parts are important: parameter count (a minimum of 2), parameter type (should be decimal.Decimal, not int), parameter style (should be %(value)s, not %s or ?).
Actual query is not important, works as well with insert etc (inseting incorrect values into database). Type of second parameter is not important (reproduces with both str and int).
Test case is attached.