Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.7.3, 10.3, 10.4, 10.10.3, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
-
None
Description
This issue was initially reported on stackoverflow
When using subselects in bulk insert wrong values are inserted.
How to repeat:
SQL:
create table t1 (a int); |
create table t2 like t1;
|
insert into t2 values (1),(2); |
Python script:
import mariadb |
conn= mariadb.connect(db="test") |
cursor=conn.cursor() |
cursor.executemany("INSERT INTO t1 VALUES ((SELECT a FROM t2 WHERE a=?))", [(1,),(2,)]) |
cursor.execute("SELECT a FROM t1") |
row= cursor.fetchall() |
print(row) |
Output:
[(1,), (1,)]
|
Expected Output:
[(1,), (2,)]
|