]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the build for SQLITE_OMIT_SHARED_CACHE, which was broken, possibly
authordrh <drh@noemail.net>
Fri, 8 Jan 2016 19:34:39 +0000 (19:34 +0000)
committerdrh <drh@noemail.net>
Fri, 8 Jan 2016 19:34:39 +0000 (19:34 +0000)
by check-in [2d96aeba].

FossilOrigin-Name: 3392f8fa2ddf2c10ffe91ddd92470040c909b36d

manifest
manifest.uuid
src/btree.c

index 192536623d8c1afbdf20e6037e5787b5829661aa..e79fa8d733c9d41c642d6fff27a00659f6c2ade4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sproblem\swith\s#ifdefs\son\sthe\ssystem\scalls\sin\sthe\sunix\sVFS\sthat\scauses\nproblems\swhen\scompiling\swith\sSQLITE_OMIT_WAL.
-D 2016-01-08T19:17:30.620
+C Fix\sthe\sbuild\sfor\sSQLITE_OMIT_SHARED_CACHE,\swhich\swas\sbroken,\spossibly\nby\scheck-in\s[2d96aeba].
+D 2016-01-08T19:34:39.323
 F Makefile.in 7c8cc4c2f0179efc6fa9492141d1fb65f4807054
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc e45d8b9b56dfa3f2cd860b2c28bd9d304513b042
@@ -276,7 +276,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
 F src/backup.c 2869a76c03eb393ee795416e2387005553df72bc
 F src/bitvec.c 1a78d450a17c5016710eec900bedfc5729bf9bdf
 F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
-F src/btree.c 09ec3ca5e7a6b8c277cef6c4471a1427cab5fa01
+F src/btree.c 6bd9b3d778a023e2238a81cd0b87b00085220e0e
 F src/btree.h 68ef301795e00cdf1d3ab93abc44a43b7fe771e0
 F src/btreeInt.h b5f2651b41808f038dee9282c5dc0232ce6532d3
 F src/build.c 9d497ff4bf3c82cecb520436e0e9963785627583
@@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e9a51d2a580daa0fb152fe4c891149caa8025b9d
-R f00c1274aa3c73407d2f148ceadecbc9
+P ceceea4c5ee242b20ebf216593c15c11ce2c369a
+R aa88b0148c6ce2e00f60d1f7cb2cd85a
 U drh
-Z f360db7d4eecffb564b5a77c7b7dafa5
+Z d454daea05e67b50f7d16f4e08b90e6b
index 386a22a52d29983d805d32f152c0133884056e30..7260cdc2d8e9aa7d6a69fe8c059a2b0662af4927 100644 (file)
@@ -1 +1 @@
-ceceea4c5ee242b20ebf216593c15c11ce2c369a
\ No newline at end of file
+3392f8fa2ddf2c10ffe91ddd92470040c909b36d
\ No newline at end of file
index 5c60364a6b828664c0932c6558eb5b15976e9441..77552d5831b982353bb2d7ec1daaa1df491b0365 100644 (file)
@@ -3130,7 +3130,6 @@ int sqlite3BtreeNewDb(Btree *p){
 ** proceed.
 */
 int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
-  sqlite3 *pBlock = 0;
   BtShared *pBt = p->pBt;
   int rc = SQLITE_OK;
 
@@ -3153,27 +3152,30 @@ int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
   }
 
 #ifndef SQLITE_OMIT_SHARED_CACHE
-  /* If another database handle has already opened a write transaction 
-  ** on this shared-btree structure and a second write transaction is
-  ** requested, return SQLITE_LOCKED.
-  */
-  if( (wrflag && pBt->inTransaction==TRANS_WRITE)
-   || (pBt->btsFlags & BTS_PENDING)!=0
-  ){
-    pBlock = pBt->pWriter->db;
-  }else if( wrflag>1 ){
-    BtLock *pIter;
-    for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
-      if( pIter->pBtree!=p ){
-        pBlock = pIter->pBtree->db;
-        break;
+  {
+    sqlite3 *pBlock = 0;
+    /* If another database handle has already opened a write transaction 
+    ** on this shared-btree structure and a second write transaction is
+    ** requested, return SQLITE_LOCKED.
+    */
+    if( (wrflag && pBt->inTransaction==TRANS_WRITE)
+     || (pBt->btsFlags & BTS_PENDING)!=0
+    ){
+      pBlock = pBt->pWriter->db;
+    }else if( wrflag>1 ){
+      BtLock *pIter;
+      for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
+        if( pIter->pBtree!=p ){
+          pBlock = pIter->pBtree->db;
+          break;
+        }
       }
     }
-  }
-  if( pBlock ){
-    sqlite3ConnectionBlocked(p->db, pBlock);
-    rc = SQLITE_LOCKED_SHAREDCACHE;
-    goto trans_begun;
+    if( pBlock ){
+      sqlite3ConnectionBlocked(p->db, pBlock);
+      rc = SQLITE_LOCKED_SHAREDCACHE;
+      goto trans_begun;
+    }
   }
 #endif
 
@@ -9676,9 +9678,11 @@ int sqlite3BtreeIsReadonly(Btree *p){
 */
 int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); }
 
+#if !defined(SQLITE_OMIT_SHARED_CACHE)
 /*
 ** Return true if the Btree passed as the only argument is sharable.
 */
 int sqlite3BtreeSharable(Btree *p){
   return p->sharable;
 }
+#endif