A bug was introduced by the fix to #2 that causes a crash. If the callback to an exec statement does an immediate disconnect, there is a race condition between the clean-up of the prepared statement (created by the exec), and the disconnection. The clean-up code should be modified to check if the database connection is still active before trying to clear the prepared statement.
A bug was introduced by the fix to #2 that causes a crash. If the callback to an
exec
statement does an immediate disconnect, there is a race condition between the clean-up of the prepared statement (created by theexec
), and the disconnection. The clean-up code should be modified to check if the database connection is still active before trying to clear the prepared statement.