/ Check-in [5ed2a445]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fixes so that it builds without warnings both with and without SQLITE_ENABLE_CONCURRENT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA1: 5ed2a445a164f0f0c2669c6681ea76618e639961
User & Date: drh 2015-09-01 17:48:54
Wiki:begin-concurrent
Context
2015-09-01
18:01
Merge the latest trunk enhancements. check-in: 3dea0474 user: drh tags: begin-concurrent
17:48
Fixes so that it builds without warnings both with and without SQLITE_ENABLE_CONCURRENT. check-in: 5ed2a445 user: drh tags: begin-concurrent
2015-08-28
09:27
Merge latest trunk changes with this branch. check-in: 57bc0194 user: dan tags: begin-concurrent
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  4005   4005         }
  4006   4006       }
  4007   4007       sqlite3PagerSetDbsize(pPager, nFin);
  4008   4008     }
  4009   4009   
  4010   4010     return rc;
  4011   4011   }
  4012         -#endif
         4012  +#else
         4013  +# define btreeFixUnlocked(X)  SQLITE_OK
         4014  +#endif /* ENABLE_CONCURRENT */
  4013   4015   
  4014   4016   /*
  4015   4017   ** This routine does the first phase of a two-phase commit.  This routine
  4016   4018   ** causes a rollback journal to be created (if it does not already exist)
  4017   4019   ** and populated with enough information so that if a power loss occurs
  4018   4020   ** the database can be restored to its original state by playing back
  4019   4021   ** the journal.  Then the contents of the journal are flushed out to

Changes to src/pager.c.

   902    902   
   903    903       case PAGER_WRITER_LOCKED:
   904    904         assert( p->eLock!=UNKNOWN_LOCK );
   905    905         assert( pPager->errCode==SQLITE_OK );
   906    906         if( !pagerUseWal(pPager) ){
   907    907           assert( p->eLock>=RESERVED_LOCK );
   908    908         }
          909  +#ifdef SQLITE_ENABLE_CONCURRENT
   909    910         assert( pPager->dbSize==pPager->dbOrigSize || pPager->pAllRead );
          911  +#endif
   910    912         assert( pPager->dbOrigSize==pPager->dbFileSize );
   911    913         assert( pPager->dbOrigSize==pPager->dbHintSize );
   912    914         assert( pPager->setMaster==0 );
   913    915         break;
   914    916   
   915    917       case PAGER_WRITER_CACHEMOD:
   916    918         assert( p->eLock!=UNKNOWN_LOCK );

Changes to src/pager.h.

   196    196   
   197    197   #ifdef SQLITE_ENABLE_CONCURRENT
   198    198   void sqlite3PagerEndConcurrent(Pager*);
   199    199   int sqlite3PagerBeginConcurrent(Pager*);
   200    200   void sqlite3PagerDropExclusiveLock(Pager*);
   201    201   int sqlite3PagerUpgradeSnapshot(Pager *pPager, DbPage*);
   202    202   void sqlite3PagerSetDbsize(Pager *pPager, Pgno);
          203  +int sqlite3PagerIsWal(Pager*);
   203    204   #else
   204    205   # define sqlite3PagerEndConcurrent(x)
   205    206   #endif
   206    207   
   207    208   int sqlite3PagerIswriteable(DbPage*);
   208    209   
   209    210   #if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL)

Changes to src/wal.c.

  2485   2485         }
  2486   2486       }
  2487   2487       assert( iRead==iRead2 );
  2488   2488     }
  2489   2489   #endif
  2490   2490   
  2491   2491     *piRead = iRead;
  2492         -  return SQLITE_OK;
         2492  +  return rc;
  2493   2493   }
  2494   2494   
  2495   2495   /*
  2496   2496   ** Read the contents of frame iRead from the wal file into buffer pOut
  2497   2497   ** (which is nOut bytes in size). Return SQLITE_OK if successful, or an
  2498   2498   ** error code otherwise.
  2499   2499   */

Changes to src/wal.h.

   122    122   
   123    123   /* Return true if the argument is non-NULL and the WAL module is using
   124    124   ** heap-memory for the wal-index. Otherwise, if the argument is NULL or the
   125    125   ** WAL module is using shared-memory, return false. 
   126    126   */
   127    127   int sqlite3WalHeapMemory(Wal *pWal);
   128    128   
          129  +#ifdef SQLITE_ENABLE_CONCURRENT
          130  +/* Tell the wal layer that we want to commit a concurrent transaction */
   129    131   int sqlite3WalLockForCommit(Wal *pWal, PgHdr *pPg, Bitvec *pRead);
          132  +
          133  +/* Upgrade the state of the client to take into account changes written
          134  +** by other connections */
   130    135   int sqlite3WalUpgradeSnapshot(Wal *pWal);
          136  +#endif
   131    137   
   132    138   #ifdef SQLITE_ENABLE_ZIPVFS
   133    139   /* If the WAL file is not empty, return the number of bytes of content
   134    140   ** stored in each frame (i.e. the db page-size when the WAL was created).
   135    141   */
   136    142   int sqlite3WalFramesize(Wal *pWal);
   137    143   #endif
   138    144   
   139    145   #endif /* ifndef SQLITE_OMIT_WAL */
   140    146   #endif /* _WAL_H_ */