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
For one-off commands (i.e. no app is running), one would expect that the connection is released when an error occurs. MySQL and Postgresql pools relies on context managers from their respective libraries, which does close the connection if error happens, while SQLite pool implemented by mayim does not, hanging the command indefinitely until interrupted with ^C, which shows that a thread does not releases its lock:
Summary
For one-off commands (i.e. no app is running), one would expect that the connection is released when an error occurs. MySQL and Postgresql pools relies on context managers from their respective libraries, which does close the connection if error happens, while SQLite pool implemented by mayim does not, hanging the command indefinitely until interrupted with ^C, which shows that a thread does not releases its lock:
Expectation
The connection is closed so that the command can end.
Reproduce
Assuming we have a table for storing user account:
and the query
insert_account.sql
to insert new user:We insert the user twice to raise
IntegrityError
The
IntegrityError
is raised and the script hangs indefinitely.The text was updated successfully, but these errors were encountered: