You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following snippet demonstrates a bug that we did not experience with 3.36.0 but started to experience when upgrading to 3.39.4.0 (3.39.3.0 is also affected, but I guess this is not very relevant):
Traceback (most recent call last):
File "C:\Users\hofmandl\apsw_bug.py", line 6, in <module>
cursor.execute('SELECT 2;').fetchone()
File "apsw\src\cursor.c", line 229, in resetcursor
AddTraceBackHere(__FILE__, __LINE__, "resetcursor", "{s: i}", "res", res);
apsw.IncompleteExecutionError: Error: there are still remaining sql statements to execute
Changing either the first fetchone to fetchall or removing the newline character at the end of the statement or removing the semicolon makes the exception go away.
Note that this may be easier to produce than one might think. In our case we also didn't use the newline literal, but had a multiline-string:
cursor.execute('''
SELECT A, B, C
FROM FOO
WHERE BAR = 1;
''').fetchone()
The text was updated successfully, but these errors were encountered:
Thank you for finding and reporting this. The root cause was that the statement cache was significantly simplified (a quarter of the code) in 3.38.1-r1. However I missed that the previous implementation scanned and ignored whitespace after the end of a regular query, which is why it now falls over that same whitespace.
the following snippet demonstrates a bug that we did not experience with 3.36.0 but started to experience when upgrading to 3.39.4.0 (3.39.3.0 is also affected, but I guess this is not very relevant):
Error is
Changing either the first
fetchone
tofetchall
or removing the newline character at the end of the statement or removing the semicolon makes the exception go away.Note that this may be easier to produce than one might think. In our case we also didn't use the newline literal, but had a multiline-string:
The text was updated successfully, but these errors were encountered: