Commit bf6ce7d9 authored by Carl Friedrich Bolz-Tereick's avatar Carl Friedrich Bolz-Tereick
Browse files

fix #3432: apparently there was no code path reaching...

fix #3432: apparently there was no code path reaching _reset_already_committed_statements in our tests :-(
_reset now requires an argument, use _force_reset

--HG--
branch : release-pypy3.7-v7.x
parent 0b4f1d11e2ed
Pipeline #22273 passed with stage
in 8 minutes and 45 seconds
......@@ -404,3 +404,13 @@ class TestBackup:
result = con2.execute("SELECT key FROM foo ORDER BY key").fetchall()
assert result[0][0] == 3
assert result[1][0] == 4
def test_reset_already_committed_statements_bug(con):
con.execute('''CREATE TABLE COMPANY
(ID INT PRIMARY KEY,
A INT);''')
con.execute("INSERT INTO COMPANY (ID, A) \
VALUES (1, 2)")
cursor = con.execute("SELECT id, a from COMPANY")
con.commit()
con.execute("DROP TABLE COMPANY")
......@@ -396,7 +396,7 @@ class Connection(object):
for weakref in lst:
statement = weakref()
if statement is not None:
statement._reset()
statement._force_reset()
@_check_thread_wrap
@_check_closed_wrap
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment