Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.0a1
-
None
-
3.9
Description
Since execute() and executemany() use the same callback for retrieving data, array_size needs to be cleared.
Example:
import mariadb
connection= mariadb.connect(db="test") |
|
cursor= connection.cursor() |
|
cursor.execute("create temporary table t1 (a int, b int)") |
|
cursor.executemany("insert into t1 values (?,?)", [(1,2),(3,4)]) |
|
cursor.execute("insert into t1 values (?,?)", (4,5)) |
raises exception:
mariadb.DataError: Can't access column number 1 at row 1