On 11 Jan 2016 1:45 PM, Scott Hess wrote:
>
> As far as preventing the other process from using it before the schema
> exists, do "SELECT count(*) FROM sqlite_master", and if the result is 0,
> the schema does not exist.  If you create the schema as a transaction, that
> will be atomic.

But in order for that SELECT to avert TOCTTOU errors, we?d have to do 
BEGIN EXCLUSIVE LOCK at the beginning of every single DB handle 
creation. That would seem to get expensive?

-FG

Reply via email to