Fixed a crash in the :mod:`sqlite3` module caused by closing the database
connection from within a callback function invoked during
sqlite3_step() (e.g., an aggregate step, a user-defined function
via :meth:`~sqlite3.Connection.create_function`, a progress handler, or a
collation callback). Raise :exc:`~sqlite3.ProgrammingError` instead of
crashing.