title: Is a SQLite3 database file locked globally while writing to temp tables?
body: <p>I have an application with different threads that all access a common SQLite3 database file. All threads create their own connection handle plus some temporary table using a statement like <code>CREATE TEMP TABLE FileCacheTemp AS ...</code>.</p>
  
  <p>Now I perform a long-running transaction block into the temp table on one thread using <code>BEGIN TRANSACTION</code>, followed by multiple <code>INSERT INTO FileCacheTemp ...</code> statements and finalized with a <code>COMMIT</code>. Will SQLite3 lock only read/writes to the thread-local, non-shared, in-memory temp table or will it lock the whole database file for all threads?</p>
  
  <p>I am using SQLite3 version 3.13.0 with default journal mode, etc.</p>