From fc3afb6a9835a7af5fd1be38666281893ff5c31b Mon Sep 17 00:00:00 2001 From: drh Date: Tue, 9 Oct 2007 15:36:10 +0000 Subject: [PATCH] Still more tweaks to the wince interface. Ticket #2711. (CVS 4482) FossilOrigin-Name: b2bdb476858c6e4b8977ea06be68b2331d1d84df --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/os_win.c | 13 ++++--------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/manifest b/manifest index 579cac37ae..766ef37426 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\stypo\sin\sthe\swince\sdriver.\s\sTicket\s#2710.\s\sSee\salso\sticket\s#2702.\s(CVS\s4481) -D 2007-10-09T15:20:40 +C Still\smore\stweaks\sto\sthe\swince\sinterface.\s\sTicket\s#2711.\s(CVS\s4482) +D 2007-10-09T15:36:10 F Makefile.in 75b729d562e9525d57d9890ec598b38e1a8b02bc F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -118,7 +118,7 @@ F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 F src/os_unix.c 308bd8ad6977f66f608228cccaecc4cbc1a24693 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e -F src/os_win.c 13b80c00eefac383e09d2b370df33ac4f5d68b03 +F src/os_win.c fe8f2d8fc3a010a2e9d4a0acbdcf4981522cac7b F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b F src/pager.c 0a92a08192785af79547b017cda45eb683b22552 F src/pager.h d783e7f184afdc33adff37ba58d4e029bd8793b3 @@ -581,7 +581,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 07c00fffe50e8380748f7ae02328531a75d64610 -R 87effa23f67301612b5a4904681b4423 +P beb91af7061a3950636064bf60946132a884cd7b +R c96cd61a3f0ce59ab096a8987f60365d U drh -Z 4946d916a41e6ddb436d8c356df5466f +Z 8159b8ccb5f123a5d7af87677f2c9596 diff --git a/manifest.uuid b/manifest.uuid index c66c3b1acf..317004c3e6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -beb91af7061a3950636064bf60946132a884cd7b \ No newline at end of file +b2bdb476858c6e4b8977ea06be68b2331d1d84df \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index acf3ce9592..ebaee49328 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -1081,6 +1081,7 @@ static int winOpen( DWORD dwShareMode; DWORD dwCreationDisposition; DWORD dwFlagsAndAttributes = 0; + int isTemp; winFile *pFile = (winFile*)id; void *zConverted = convertUtf8Filename(zName); if( zConverted==0 ){ @@ -1111,20 +1112,14 @@ static int winOpen( | FILE_ATTRIBUTE_HIDDEN | FILE_FLAG_DELETE_ON_CLOSE; #endif + isTemp = 1; }else{ dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL; + isTemp = 0; } -#if 0 - if( flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB) ){ - dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; - }else{ - dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; - } -#else /* Reports from the internet are that performance is always ** better if FILE_FLAG_RANDOM_ACCESS is used. Ticket #2699. */ dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; -#endif if( isNT() ){ h = CreateFileW((WCHAR*)zConverted, dwDesiredAccess, @@ -1176,7 +1171,7 @@ static int winOpen( free(zConverted); return SQLITE_CANTOPEN; } - if( dwFlagsAndAttributes & FILE_FLAG_DELETE_ON_CLOSE ){ + if( isTemp ){ pFile->zDeleteOnClose = zConverted; }else #endif