title: Is it allowed to start multiple transactions in the same Sqlite database connection?
body: <p>I have a multi-threaded C++ application which uses Sqlite3 for the database. I am storing the SQLite database connection and threads which need access to the database, use the same connection creating the transactions of their own. </p>
  
  <p>I use the below command to get the database connection. </p>
  
  <pre><code>const int errorCode =  sqlite3_open_v2(fileNameUtf8.c_str(), &amp;Handle, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, Vfs-&gt;GetName().c_str()); 
  </code></pre>
  
  <p>But as multiple threads are accessing the database, I am facing the issue of starting multiple transactions in the same connection. When the second thread tries to begin transaction error message "cannot start a transaction within a transaction" is returned. </p>
  
  <p>I thought SQLITE_OPEN_FULLMUTEX flag allows the case of multiple threads using the same connection. I assumed it might even allow multiple transactions in the same connection. </p>
  
  <p>Is there any option in Sqlite3 to begin multiple transactions corresponding to different threads using the same SQLite database connection ?  </p>
  
  <p>Thanks in advance. </p>