From 22ac46d15d2e30be8b432f98a9832162f2b7d774 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 14 Aug 2004 18:34:54 +0000 Subject: [PATCH] Fix a bug that was preventing "PRAGMA temp_store=MEMORY" from working. (CVS 1887) FossilOrigin-Name: bb55894521848b6a9d8b516a3c7eeb3482936d7e --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/main.c | 17 ++++++----------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/manifest b/manifest index 8815ea15fb..b179ba695a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\scommand-line\sshell\sshould\savoid\swriting\schanges\sinto\sstring\sconstants.\s(CVS\s1886) -D 2004-08-14T18:18:44 +C Fix\sa\sbug\sthat\swas\spreventing\s"PRAGMA\stemp_store=MEMORY"\sfrom\sworking.\s(CVS\s1887) +D 2004-08-14T18:34:55 F Makefile.in 4a5e570a9e2d35b09c31b3cf01b78cea764ade4b F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -39,7 +39,7 @@ F src/hash.c f0a2f22c2a7052d67053b5f4690ea3010bb3fb9f F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb F src/insert.c bedcba371401395033a1a1c578d8fdc3fec87bec F src/legacy.c 2f3617c61bcdcd1d776154a9cfebf99facda8ad8 -F src/main.c 41da595846e299b757cc413d18de804f97f68748 +F src/main.c 32b91a5799d53586af068b5f95cd851242d681ca F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070 F src/os.h d1780e0db95cad01f213d48da22ab490eb4fd345 F src/os_common.h cd7eb025fdab7dc91e0e97bf6310f1648205857f @@ -242,7 +242,7 @@ F www/tclsqlite.tcl 06a86cba4d7fc88e2bcd633b57702d3d16abebb5 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P fce56ba6a3c53843fabdfad4f545e35a83a01aa9 -R b1881f94fad0c59172cf45c286e4715e +P 6b8178de9936e48ed69d1546218b5def6665b459 +R dd5d27280c9e7d8e0c9807625c7d9299 U drh -Z bc92f5f0cf522e7edc05817456da33d7 +Z 1990a2927b4118ca945a16b473a82826 diff --git a/manifest.uuid b/manifest.uuid index e04e699a94..d5d7cc1236 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6b8178de9936e48ed69d1546218b5def6665b459 \ No newline at end of file +bb55894521848b6a9d8b516a3c7eeb3482936d7e \ No newline at end of file diff --git a/src/main.c b/src/main.c index def984a291..e46e7cb1d2 100644 --- a/src/main.c +++ b/src/main.c @@ -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.249 2004/08/01 00:10:45 drh Exp $ +** $Id: main.c,v 1.250 2004/08/14 18:34:55 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -817,7 +817,6 @@ int sqlite3BtreeFactory( ){ int btree_flags = 0; int rc; - int useMem = 0; assert( ppBtree != 0); if( omitJournal ){ @@ -825,25 +824,21 @@ int sqlite3BtreeFactory( } if( zFilename==0 ){ #ifndef TEMP_STORE -# define TEMP_STORE 2 +# define TEMP_STORE 1 #endif #if TEMP_STORE==0 - useMem = 0; + /* Do nothing */ #endif #if TEMP_STORE==1 - useMem = db->temp_store==2; + if( db->temp_store==2 ) zFilename = ":memory:"; #endif #if TEMP_STORE==2 - useMem = db->temp_store!=1; + if( db->temp_store!=1 ) zFilename = ":memory:"; #endif #if TEMP_STORE==3 - useMem = 1; + zFilename = ":memory:"; #endif } - if( (zFilename && strcmp(zFilename, ":memory:")==0) - || (zFilename==0 && useMem) ){ - btree_flags |= BTREE_MEMORY; - } rc = sqlite3BtreeOpen(zFilename, ppBtree, btree_flags); if( rc==SQLITE_OK ){