]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Move the implementation of sqlite3_enable_shared_cache from btree.c to main.c. (CVS...
authordrh <drh@noemail.net>
Tue, 10 Jan 2006 13:58:48 +0000 (13:58 +0000)
committerdrh <drh@noemail.net>
Tue, 10 Jan 2006 13:58:48 +0000 (13:58 +0000)
FossilOrigin-Name: 4f2ec95283f1ae0a28b2f9ce0afc5a7203de87fb

manifest
manifest.uuid
src/btree.c
src/main.c

index d43f3bfd9811d96b211404202d179fd628f0d398..a1b404d92c02573b173ff4c6ed3ba41d32b5c63f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sproblem\swith\sshared-schemas\sand\stemp\striggers.\s(CVS\s2901)
-D 2006-01-10T12:31:40
+C Move\sthe\simplementation\sof\ssqlite3_enable_shared_cache\sfrom\sbtree.c\sto\smain.c.\s(CVS\s2902)
+D 2006-01-10T13:58:48
 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -34,7 +34,7 @@ F src/alter.c d0dd079b9ef0d551ff4a4ce09ee270c07b307bbb
 F src/analyze.c ed87abad3f6f60e1bd5308ed6ff6e0fa396db52b
 F src/attach.c 8438a2808f89c01cfd472e676a27d771ac4405aa
 F src/auth.c cdec356a5cd8b217c346f816c5912221537fe87f
-F src/btree.c 5e5dff4a667d93d49925d38de2d451a5bd1eabfd
+F src/btree.c 874eaba6dec1660c7c917d5afc790f69de82cf2e
 F src/btree.h 5663c4f43e8521546ccebc8fc95acb013b8f3184
 F src/build.c 97997d435acfb9406f776f14931c16559bd534e5
 F src/callback.c 1c2b78a210fda18cdd4d0b604ed41bf0e1f5125c
@@ -48,7 +48,7 @@ F src/hash.c 8747cf51d12de46512880dfcf1b68b4e24072863
 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
 F src/insert.c 16610475976dc9b25d231338e283dd4b4362a430
 F src/legacy.c f651ccd3700f99fa05766ac53506bf9a0694761b
-F src/main.c eb4ba0a5068b7fa086e04338eb78997e9e5c4941
+F src/main.c 3fe4b606db7d269d7a57c7b51ab3d9ff488e4b98
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/os.c 1d1a61cdf150e9f9520a3bc787c8465148ea2e78
 F src/os.h 8710c0068f3386a73a37f8ad242b92c7580464df
@@ -340,7 +340,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P bd02a6faefa3602d0b93d54bc57809a2222d5903
-R b3a5083bd04048926b4b9deff43305a7
-U danielk1977
-Z 4a23a33bfc9bd6ad6c92d55f05958140
+P 9c18a1ce1e7ff6a02eb0f9ce344cab9660819740
+R d6f71e8344cce361f5d74f812339b551
+U drh
+Z a1174a32567e13b6cc8e755afde6cc38
index 12c8109420d2d46b1836c7eb3c71cba6176bcd86..64c55b7e5853048deab630e4bdd0b7497e72d107 100644 (file)
@@ -1 +1 @@
-9c18a1ce1e7ff6a02eb0f9ce344cab9660819740
\ No newline at end of file
+4f2ec95283f1ae0a28b2f9ce0afc5a7203de87fb
\ No newline at end of file
index df96325d95f934f8caf6af960ac9f28ad124e384..daa45277ab4987c961d7bdd81ae9825d675db513 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.288 2006/01/09 09:59:49 danielk1977 Exp $
+** $Id: btree.c,v 1.289 2006/01/10 13:58:48 drh Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** For a detailed discussion of BTrees, refer to
@@ -6498,25 +6498,3 @@ int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
 #endif
   return rc;
 }
-
-#ifndef SQLITE_OMIT_SHARED_CACHE
-/*
-** Enable the shared pager and schema features.
-*/
-int sqlite3_enable_shared_cache(int enable){
-  ThreadData *pTd = sqlite3ThreadData();
-  
-  /* It is only legal to call sqlite3_enable_shared_cache() when there
-  ** are no currently open b-trees that were opened by the calling thread.
-  ** This condition is only easy to detect if the shared-cache were 
-  ** previously enabled (and is being disabled). 
-  */
-  if( pTd->pBtree && !enable ){
-    assert( pTd->useSharedData );
-    return SQLITE_MISUSE;
-  }
-
-  pTd->useSharedData = enable;
-  return SQLITE_OK;
-}
-#endif
index 9bbb5105bbfd0c06c714092feb92cad96ca11e0a..1b4c04900dff042dca9b078b50b16555986b2540 100644 (file)
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.321 2006/01/10 07:14:24 danielk1977 Exp $
+** $Id: main.c,v 1.322 2006/01/10 13:58:48 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -1053,3 +1053,30 @@ int sqlite3Corrupt(void){
   return SQLITE_CORRUPT;
 }
 #endif
+
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** Enable or disable the shared pager and schema features for the
+** current thread.
+**
+** This routine should only be called when there are no open
+** database connections.
+*/
+int sqlite3_enable_shared_cache(int enable){
+  ThreadData *pTd = sqlite3ThreadData();
+  
+  /* It is only legal to call sqlite3_enable_shared_cache() when there
+  ** are no currently open b-trees that were opened by the calling thread.
+  ** This condition is only easy to detect if the shared-cache were 
+  ** previously enabled (and is being disabled). 
+  */
+  if( pTd->pBtree && !enable ){
+    assert( pTd->useSharedData );
+    return SQLITE_MISUSE;
+  }
+
+  pTd->useSharedData = enable;
+  return SQLITE_OK;
+}
+#endif