[CONPY-168] SELECT with binary object fails Created: 2021-09-29  Updated: 2021-10-03  Resolved: 2021-10-03

Status: Closed
Project: MariaDB Connector/Python
Component/s: DBAPI 2.0
Affects Version/s: 1.1.0b1
Fix Version/s: 1.1.0b2

Type: Bug Priority: Major
Reporter: Georg Richter Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None

Python Version: 3.9

 Description   

Select with binary parameter fails.

Example:

import mariadb
import os
 
connection= mariadb.connect(db="test")
 
data= os.urandom(32)
cursor= connection.cursor()
cursor.execute("create temporary table t1 (a blob)")
 
cursor.execute("insert into t1 values (?)", (data,))
cursor.execute("select * from t1 where a=?", (data,))
rows= cursor.fetchall()
print(rows)

Output:

[]


Generated at Thu Feb 08 03:30:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.