SQLite Forum

Random crash doing SELECT
> I hope SQLite can be a little bit more verbose and precise on documentation and that could help prevent people from learning it the hard way...

We make every reasonable effort to enable those who read and heed the docs to avoid being schooled by hard knocks.

My problem with your plaintive hope is that I do not see how to (attempt to) block your confusion without simply putting some of what is already said in bold or repeating it in the "pay attention here:"<sup><b>a</b></sup> section.

> \[on SQLITE_OPEN_NOMUTEX effect\] And the last sentence says "as long as each thread is using a different database connection", I don't think this means this: each thread should have its own exclusive connection. So it leads me to suppose as long as only one thread is using one connection at a time, it's OK.

It would be ok, if "only one thread is using one connection at a time" means that reentrant execution is blocked by means external to the SQLite library. But the fact that you see a functional change between using "SQLITE_OPEN_NOMUTEX" and "SQLITE_OPEN_FULLMUTEX" means your code did not actually manage to avoid the reentrancy.  I do not see any documentation deficiency here; just a failure to adhere to the requirements you correctly read or inferred from the documentation.


a. There is no such section. Having one would be akin to putting something like "These requirements shall be met." into a specification.