/ Changes On Branch winNotFound
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch winNotFound Excluding Merge-Ins

This is equivalent to a diff from d4c36d4991 to 692ad3c02b

2012-11-27
21:12
Improved detection of file-does-not-exist in winDelete. (check-in: 92e9b5bc05 user: drh tags: trunk)
15:56
Fix a problem causing the "number-of-documents" field maintained by FTS4 to be set incorrectly by REPLACE queries. (check-in: e38fb02d5e user: dan tags: trunk)
2012-11-26
19:50
Add an option to register global hooks used for logging all SQL executed by an application. (check-in: cd501bbccf user: dan tags: sqllog)
2012-11-21
02:10
In winDelete, determine that a file does not exist by checking for a last error of ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND. (Closed-Leaf check-in: 692ad3c02b user: mistachkin tags: winNotFound)
2012-11-20
15:06
Have the windows implementation of xDelete return SQLITE_IOERR_DELETE_NOENT if the file to be deleted does not exist. The unix implementation was previously modified to behave this way. The current changes simply brings the two implementations into alignment. (check-in: d4c36d4991 user: drh tags: trunk)
2012-11-13
11:16
Strive to use posix_fallocate() rather than ftruncate() when posix_fallocate() is available. Ticket [5eaa61ea18]. (check-in: 29980b08ec user: drh tags: trunk)

Changes to src/os_win.c.

3884
3885
3886
3887
3888
3889
3890


3891



3892
3893
3894
3895
3896
3897


3898



3899
3900
3901
3902
3903
3904
3905
#if SQLITE_OS_WINRT
      WIN32_FILE_ATTRIBUTE_DATA sAttrData;
      memset(&sAttrData, 0, sizeof(sAttrData));
      if ( osGetFileAttributesExW(zConverted, GetFileExInfoStandard,
                                  &sAttrData) ){
        attr = sAttrData.dwFileAttributes;
      }else{


        rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */



        break;
      }
#else
      attr = osGetFileAttributesW(zConverted);
#endif
      if ( attr==INVALID_FILE_ATTRIBUTES ){


        rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */



        break;
      }
      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){
        rc = SQLITE_ERROR; /* Files only. */
        break;
      }
      if ( osDeleteFileW(zConverted) ){







>
>
|
>
>
>






>
>
|
>
>
>







3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
#if SQLITE_OS_WINRT
      WIN32_FILE_ATTRIBUTE_DATA sAttrData;
      memset(&sAttrData, 0, sizeof(sAttrData));
      if ( osGetFileAttributesExW(zConverted, GetFileExInfoStandard,
                                  &sAttrData) ){
        attr = sAttrData.dwFileAttributes;
      }else{
        lastErrno = osGetLastError();
        if( lastErrno==ERROR_FILE_NOT_FOUND || lastErrno==ERROR_PATH_NOT_FOUND ){
          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */
        }else{
          rc = SQLITE_ERROR;
        }
        break;
      }
#else
      attr = osGetFileAttributesW(zConverted);
#endif
      if ( attr==INVALID_FILE_ATTRIBUTES ){
        lastErrno = osGetLastError();
        if( lastErrno==ERROR_FILE_NOT_FOUND || lastErrno==ERROR_PATH_NOT_FOUND ){
          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */
        }else{
          rc = SQLITE_ERROR;
        }
        break;
      }
      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){
        rc = SQLITE_ERROR; /* Files only. */
        break;
      }
      if ( osDeleteFileW(zConverted) ){
3913
3914
3915
3916
3917
3918
3919




3920

3921
3922
3923
3924
3925
3926
3927
    } while(1);
  }
#ifdef SQLITE_WIN32_HAS_ANSI
  else{
    do {
      attr = osGetFileAttributesA(zConverted);
      if ( attr==INVALID_FILE_ATTRIBUTES ){




        rc = SQLITE_OK; /* Already gone? */

        break;
      }
      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){
        rc = SQLITE_ERROR; /* Files only. */
        break;
      }
      if ( osDeleteFileA(zConverted) ){







>
>
>
>
|
>







3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
    } while(1);
  }
#ifdef SQLITE_WIN32_HAS_ANSI
  else{
    do {
      attr = osGetFileAttributesA(zConverted);
      if ( attr==INVALID_FILE_ATTRIBUTES ){
        lastErrno = osGetLastError();
        if( lastErrno==ERROR_FILE_NOT_FOUND || lastErrno==ERROR_PATH_NOT_FOUND ){
          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */
        }else{
          rc = SQLITE_ERROR;
        }
        break;
      }
      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){
        rc = SQLITE_ERROR; /* Files only. */
        break;
      }
      if ( osDeleteFileA(zConverted) ){