Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.4
-
None
Description
on actual 1.1 branch. if i run a second executemany, command fails with "Commands out of sync; you can't run this command now"
If this second executemany runs on another cursor, command run successfully.
example to reproduce change test "test_inserttuple" in test_cursor to run 2 x executemany:
def test_inserttuple(self):
|
if is_maxscale(): |
self.skipTest("MAXSCALE doesn't support BULK yet") |
cursor = self.connection.cursor()
|
cursor.execute("CREATE TEMPORARY TABLE test_inserttuple (" |
"id int, name varchar(64), " |
"city varchar(64))") |
params = ((1, u"Jack", u"Boston"), |
(2, u"Martin", u"Ohio"), |
(3, u"James", u"Washington"), |
(4, u"Rasmus", u"Helsinki"), |
(5, u"Andrey", u"Sofia")) |
cursor.executemany("INSERT INTO test_inserttuple VALUES (?,?,?)", |
params)
|
cursor.executemany("INSERT INTO test_inserttuple VALUES (?,?,?)", |
params)
|
cursor = self.connection.cursor()
|
cursor.execute("SELECT name FROM test_inserttuple ORDER BY id DESC") |
row = cursor.fetchone()
|
self.assertEqual("Andrey", row[0]) |
del cursor
|