Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
Description
When casting to binary the fetched result will be a unicode string instead of a binary:
Python 3.8.2rc2+ (heads/3.8-dirty:44c6901, Jul 28 2020, 18:31:20)
|
[GCC 8.3.0] on linux
|
Type "help", "copyright", "credits" or "license" for more information.
|
>>> import mariadb
|
>>>
|
>>> conn= mariadb.connect()
|
>>> cursor=conn.cursor()
|
>>> cursor.execute("SELECT CAST('foo' AS BINARY) AS anon_1 WHERE 1=?", (1,))
|
>>> cursor.fetchone()
|
('foo',)
|
>>> cursor.execute("SELECT CAST('foo' AS BINARY) AS anon_1")
|
>>> cursor.fetchone()
|
('foo',)
|