[CONPY-167] Commands out of sync Created: 2021-09-25  Updated: 2021-09-25  Resolved: 2021-09-25

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   

The following snippet fails if the statements in execute() and executemany() are the same, since the current implementation doesn't reprepare the statement.

import mariadb
 
c=mariadb.connect(db="test", user="foobar", password="foobar", host="127.0.0.1")
cursor=c.cursor()
 
cursor.execute("insert into t1 values (NULL,?)", (1,));
cursor.executemany("insert into t1 values (NULL,?)", [(1,),(2,)]);



 Comments   
Comment by Georg Richter [ 2021-09-25 ]

fixed - rev. cfe3eee3b4c7acb542f0a5c41c601822ee1c89f7

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