Changing the setting while a session is active will lead
to serious problems. That's why I added a check for that
behavior that makes the routine return SQLITE_MISUSE instead.
Ok, then the documentation is wrong as it says calling the
routine when connections exist will cause memory corruption.
You have implmented it in such a way that no memory corruption
is possible. You just get SQLITE_MISUSE if called while there
are connections.
Similarly the doc for this and sqlite3_thread_cleanup doesn't
make it clear that if you do close all your connections then
you don't need to call any of them.
Roger