/ Check-in [a29401e9]
Login

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

Overview
Comment:Get the build working with SQLITE_OMIT_CONCURRENT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA3-256: a29401e924e6f82ca1c3eec98c6c0b2f1d5b9d7fba9af41a78516f21a7bab3a2
User & Date: drh 2017-07-20 18:28:33
Wiki:begin-concurrent
Context
2017-07-20
18:56
Fix a faulty #ifdef on the previous check-in check-in: 7355e742 user: drh tags: begin-concurrent
18:28
Get the build working with SQLITE_OMIT_CONCURRENT. check-in: a29401e9 user: drh tags: begin-concurrent
17:47
Merge all the latest trunk enhancements. check-in: 213c61cb user: drh tags: begin-concurrent
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

 10310  10310   int sqlite3BtreeExclusiveLock(Btree *p){
 10311  10311     int rc;
 10312  10312     Pgno pgno = 0;
 10313  10313     BtShared *pBt = p->pBt;
 10314  10314     assert( p->inTrans==TRANS_WRITE && pBt->pPage1 );
 10315  10315     sqlite3BtreeEnter(p);
 10316  10316     rc = sqlite3PagerExclusiveLock(pBt->pPager, pBt->pPage1->pDbPage, &pgno);
        10317  +#ifdef SQLITE_OMIT_CONCURRENT
        10318  +  assert( pgno==0 );
        10319  +#else
 10317  10320     if( rc==SQLITE_BUSY_SNAPSHOT && pgno ){
 10318  10321       PgHdr *pPg = 0;
 10319  10322       int rc2 = sqlite3PagerGet(pBt->pPager, pgno, &pPg, 0);
 10320  10323       if( rc2==SQLITE_OK ){
 10321  10324         int bWrite = -1;
 10322  10325         const char *zObj = 0;
 10323  10326         const char *zTab = 0;
................................................................................
 10358  10361             (int)pgno,
 10359  10362             (bWrite==0?"read-only":(bWrite>0?"read/write":"unknown")),
 10360  10363             (zTab ? "index" : "table"),
 10361  10364             (zTab ? zTab : ""), (zTab ? "." : ""), (zObj ? zObj : "UNKNOWN")
 10362  10365         );
 10363  10366       }
 10364  10367     }
 10365         -
        10368  +#endif
 10366  10369     sqlite3BtreeLeave(p);
 10367  10370     return rc;
 10368  10371   }
 10369  10372   
 10370  10373   #if !defined(SQLITE_OMIT_SHARED_CACHE)
 10371  10374   /*
 10372  10375   ** Return true if the Btree passed as the only argument is sharable.

Changes to src/btreeInt.h.

   273    273   */
   274    274   struct MemPage {
   275    275     u8 isInit;           /* True if previously initialized. MUST BE FIRST! */
   276    276     u8 bBusy;            /* Prevent endless loops on corrupt database files */
   277    277     u8 intKey;           /* True if table b-trees.  False for index b-trees */
   278    278     u8 intKeyLeaf;       /* True if the leaf of an intKey table */
   279    279     Pgno pgno;           /* Page number for this page */
          280  +#ifndef SQLITE_OMIT_CONCURRENT
          281  +  Pgno pgnoRoot;       /* Root page of b-tree that this page belongs to */
          282  +#endif
   280    283     /* Only the first 8 bytes (above) are zeroed by pager.c when a new page
   281    284     ** is allocated. All fields that follow must be initialized before use */
   282    285     u8 leaf;             /* True if a leaf page */
   283    286     u8 hdrOffset;        /* 100 for page 1.  0 otherwise */
   284    287     u8 childPtrSize;     /* 0 if leaf==1.  4 if leaf==0 */
   285    288     u8 max1bytePayload;  /* min(maxLocal,127) */
   286    289     u8 nOverflow;        /* Number of overflow cell bodies in aCell[] */
................................................................................
   297    300     u8 *aData;           /* Pointer to disk image of the page data */
   298    301     u8 *aDataEnd;        /* One byte past the end of usable data */
   299    302     u8 *aCellIdx;        /* The cell index area */
   300    303     u8 *aDataOfst;       /* Same as aData for leaves.  aData+4 for interior */
   301    304     DbPage *pDbPage;     /* Pager page handle */
   302    305     u16 (*xCellSize)(MemPage*,u8*);             /* cellSizePtr method */
   303    306     void (*xParseCell)(MemPage*,u8*,CellInfo*); /* btreeParseCell method */
   304         -#ifndef SQLITE_OMIT_CONCURRENT
   305         -  u32 pgnoRoot;        /* Root page of b-tree that this page belongs to */
   306         -#endif
   307    307   };
   308    308   
   309    309   /*
   310    310   ** A linked list of the following structures is stored at BtShared.pLock.
   311    311   ** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor 
   312    312   ** is opened on the table with root page BtShared.iTable. Locks are removed
   313    313   ** from this list when a transaction is committed or rolled back, or when

Changes to src/pager.h.

   225    225   int sqlite3PagerUpgradeSnapshot(Pager *pPager, DbPage*);
   226    226   void sqlite3PagerSetDbsize(Pager *pPager, Pgno);
   227    227   int sqlite3PagerIsWal(Pager*);
   228    228   #else
   229    229   # define sqlite3PagerEndConcurrent(x)
   230    230   #endif
   231    231   
          232  +#if !defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_CONCURRENT)
   232    233   int sqlite3PagerIswriteable(DbPage*);
          234  +#endif
   233    235   
   234    236   int sqlite3PagerWalInfo(Pager*, u32 *pnPrior, u32 *pnFrame);
   235    237   
   236    238   #if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL)
   237    239   void *sqlite3PagerCodec(DbPage *);
   238    240   #endif
   239    241