mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Add comments to the changes of check-in (3200). (CVS 3202)
FossilOrigin-Name: 697498d4e86a42d7063417a9549ad04aaf4db31c
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\swindows\sportability\sproblem\sin\strans.test.\s(CVS\s3201)
|
C Add\scomments\sto\sthe\schanges\sof\scheck-in\s(3200).\s(CVS\s3202)
|
||||||
D 2006-06-04T23:20:10
|
D 2006-06-04T23:31:49
|
||||||
F Makefile.in 87b6d483513ab8a4e763775bc5b434d6b5c34963
|
F Makefile.in 87b6d483513ab8a4e763775bc5b434d6b5c34963
|
||||||
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
|
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -59,7 +59,7 @@ F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
|
|||||||
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
|
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
|
||||||
F src/os_unix.c 17d91581a0ab478a06cb6f257b707a4c4a93e5a7
|
F src/os_unix.c 17d91581a0ab478a06cb6f257b707a4c4a93e5a7
|
||||||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||||
F src/os_win.c e64e6bdfc42d867fff05f4d7a64ea110d675bcee
|
F src/os_win.c c6976ae50b61fb5b7dce399e578aa1865f02b84f
|
||||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||||
F src/pager.c ddd05666bb89808a516baef2c186d6a75887ae90
|
F src/pager.c ddd05666bb89808a516baef2c186d6a75887ae90
|
||||||
F src/pager.h 43f32f3847421f7502cfbb66f4eb2302b8033818
|
F src/pager.h 43f32f3847421f7502cfbb66f4eb2302b8033818
|
||||||
@@ -358,7 +358,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||||
P f32dbe47ffd1e7e5695f02bf4263d80bea177ffb
|
P f2538dfdb608b7f849bfc5fac0ec9d0d8dece4c7
|
||||||
R fdbddefcc4faca3a136fc36ee74f50cf
|
R 450ca953aa563fb633123fb7704167a9
|
||||||
U drh
|
U drh
|
||||||
Z 3232c1640de3ece87648ffe1a2cfee85
|
Z 91538f76d1061379dfa3e8a2e60214bc
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
f2538dfdb608b7f849bfc5fac0ec9d0d8dece4c7
|
697498d4e86a42d7063417a9549ad04aaf4db31c
|
||||||
32
src/os_win.c
32
src/os_win.c
@@ -476,8 +476,18 @@ static BOOL winceLockFileEx(
|
|||||||
#endif /* OS_WINCE */
|
#endif /* OS_WINCE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Delete the named file
|
** Delete the named file.
|
||||||
|
**
|
||||||
|
** Note that windows does not allow a file to be deleted if some other
|
||||||
|
** process has it open. Sometimes a virus scanner or indexing program
|
||||||
|
** will open a journal file shortly after it is created in order to do
|
||||||
|
** whatever it is it does. While this other process is holding the
|
||||||
|
** file open, we will be unable to delete it. To work around this
|
||||||
|
** problem, we delay 100 milliseconds and try to delete again. Up
|
||||||
|
** to MX_DELETION_ATTEMPTs deletion attempts are run before giving
|
||||||
|
** up and returning an error.
|
||||||
*/
|
*/
|
||||||
|
#define MX_DELETION_ATTEMPTS 3
|
||||||
int sqlite3WinDelete(const char *zFilename){
|
int sqlite3WinDelete(const char *zFilename){
|
||||||
WCHAR *zWide = utf8ToUnicode(zFilename);
|
WCHAR *zWide = utf8ToUnicode(zFilename);
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
@@ -485,7 +495,7 @@ int sqlite3WinDelete(const char *zFilename){
|
|||||||
if( zWide ){
|
if( zWide ){
|
||||||
do{
|
do{
|
||||||
rc = DeleteFileW(zWide);
|
rc = DeleteFileW(zWide);
|
||||||
}while( rc==0 && cnt++ < 3 && (Sleep(100), 1) );
|
}while( rc==0 && cnt++ < MX_DELETION_ATTEMPTS && (Sleep(100), 1) );
|
||||||
sqliteFree(zWide);
|
sqliteFree(zWide);
|
||||||
}else{
|
}else{
|
||||||
#if OS_WINCE
|
#if OS_WINCE
|
||||||
@@ -493,7 +503,7 @@ int sqlite3WinDelete(const char *zFilename){
|
|||||||
#else
|
#else
|
||||||
do{
|
do{
|
||||||
rc = DeleteFileA(zFilename);
|
rc = DeleteFileA(zFilename);
|
||||||
}while( rc==0 && cnt++ < 3 && (Sleep(100), 1) );
|
}while( rc==0 && cnt++ < MX_DELETION_ATTEMPTS && (Sleep(100), 1) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
TRACE2("DELETE \"%s\"\n", zFilename);
|
TRACE2("DELETE \"%s\"\n", zFilename);
|
||||||
@@ -630,6 +640,12 @@ int sqlite3WinOpenReadWrite(
|
|||||||
** On success, write the file handle into *id and return SQLITE_OK.
|
** On success, write the file handle into *id and return SQLITE_OK.
|
||||||
**
|
**
|
||||||
** On failure, return SQLITE_CANTOPEN.
|
** On failure, return SQLITE_CANTOPEN.
|
||||||
|
**
|
||||||
|
** Sometimes if we have just deleted a prior journal file, windows
|
||||||
|
** will fail to open a new one because there is a "pending delete".
|
||||||
|
** To work around this bug, we pause for 100 milliseconds and attempt
|
||||||
|
** a second open after the first one fails. The whole operation only
|
||||||
|
** fails if both open attempts are unsuccessful.
|
||||||
*/
|
*/
|
||||||
int sqlite3WinOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
|
int sqlite3WinOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
|
||||||
winFile f;
|
winFile f;
|
||||||
@@ -808,7 +824,15 @@ int sqlite3WinTempFileName(char *zBuf){
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** Close a file.
|
** Close a file.
|
||||||
|
**
|
||||||
|
** It is reported that an attempt to close a handle might sometimes
|
||||||
|
** fail. This is a very unreasonable result, but windows is notorious
|
||||||
|
** for being unreasonable so I do not doubt that it might happen. If
|
||||||
|
** the close fails, we pause for 100 milliseconds and try again. As
|
||||||
|
** many as MX_CLOSE_ATTEMPT attempts to close the handle are made before
|
||||||
|
** giving up and returning an error.
|
||||||
*/
|
*/
|
||||||
|
#define MX_CLOSE_ATTEMPT 3
|
||||||
static int winClose(OsFile **pId){
|
static int winClose(OsFile **pId){
|
||||||
winFile *pFile;
|
winFile *pFile;
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
@@ -817,7 +841,7 @@ static int winClose(OsFile **pId){
|
|||||||
TRACE2("CLOSE %d\n", pFile->h);
|
TRACE2("CLOSE %d\n", pFile->h);
|
||||||
do{
|
do{
|
||||||
rc = CloseHandle(pFile->h);
|
rc = CloseHandle(pFile->h);
|
||||||
}while( rc==0 && cnt++ < 3 && (Sleep(100), 1) );
|
}while( rc==0 && cnt++ < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
|
||||||
#if OS_WINCE
|
#if OS_WINCE
|
||||||
winceDestroyLock(pFile);
|
winceDestroyLock(pFile);
|
||||||
if( pFile->zDeleteOnClose ){
|
if( pFile->zDeleteOnClose ){
|
||||||
|
|||||||
Reference in New Issue
Block a user