/ Check-in [fc8d4508]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Optimization to sqlite3VtabUnlockList() for the common case when there is no work to do.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fc8d45086dc2bcb9bce756088e99e63cbeedf9129139fb0e6a48b43c4f502180
User & Date: drh 2019-10-05 19:24:52
Context
2019-10-05
19:53
Omit the check for conflicting shared-cache locks in sqlite3Prepare() if the database connection uses no shared cache. We might be able to go back and remove this code completely, due to the newer Schema.iGeneration logic, but that will take more analysis. This check-in gives the speed benefit but not the reduction in code size. check-in: 0b73a092 user: drh tags: trunk
19:24
Optimization to sqlite3VtabUnlockList() for the common case when there is no work to do. check-in: fc8d4508 user: drh tags: trunk
18:33
Call sqlite3Prepare() directly, rather than going through sqlite3_prepare(), when processing the sqlite_master.sql column for a schema. check-in: cc49380e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vtab.c.

   301    301   **      the database handle mutex is held.
   302    302   **
   303    303   ** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously 
   304    304   ** by multiple threads. It is thread-safe.
   305    305   */
   306    306   void sqlite3VtabUnlockList(sqlite3 *db){
   307    307     VTable *p = db->pDisconnect;
   308         -  db->pDisconnect = 0;
   309    308   
   310    309     assert( sqlite3BtreeHoldsAllMutexes(db) );
   311    310     assert( sqlite3_mutex_held(db->mutex) );
   312    311   
   313    312     if( p ){
          313  +    db->pDisconnect = 0;
   314    314       sqlite3ExpirePreparedStatements(db, 0);
   315    315       do {
   316    316         VTable *pNext = p->pNext;
   317    317         sqlite3VtabUnlock(p);
   318    318         p = pNext;
   319    319       }while( p );
   320    320     }