SQLite

Check-in [cdcf08cb18]
Login

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

Overview
Comment:Merge together the accident fork.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cdcf08cb18b1e290a4093454bebbd3e7094d6804
User & Date: drh 2010-07-07 14:00:17.000
Context
2010-07-07
14:19
Avoid the need for a NEVER() from pager_write_pagelist() by passing in pPager as an extra parameter. (check-in: b317937943 user: drh tags: trunk)
14:00
Merge together the accident fork. (check-in: cdcf08cb18 user: drh tags: trunk)
13:58
Fix minor issue in xAccess() method for Windows. (check-in: 4bfd46f1db user: shaneh tags: trunk)
13:54
Make sure the schema is loaded before preparing a "PRAGMA journal_mode" command. This helps it return meaningful results when it is the first command executed by a new database connection. (check-in: ef126e775a user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_win.c.
2084
2085
2086
2087
2088
2089
2090
2091
2092

2093
2094
2095
2096
2097

2098





2099
2100
2101
2102
2103
2104
2105
  UNUSED_PARAMETER(pVfs);
  if( zConverted==0 ){
    return SQLITE_NOMEM;
  }
  if( isNT() ){
    WIN32_FILE_ATTRIBUTE_DATA sAttrData;
    memset(&sAttrData, 0, sizeof(sAttrData));
    attr = GetFileAttributesExW((WCHAR*)zConverted,
                               GetFileExInfoStandard, &sAttrData);

    /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file
    ** as if it does not exist.
    */
    if( flags==SQLITE_ACCESS_EXISTS && attr!=INVALID_FILE_ATTRIBUTES
        && sAttrData.nFileSizeHigh==0 && sAttrData.nFileSizeLow==0 ){

            attr = INVALID_FILE_ATTRIBUTES;





    }
/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
** Since the ASCII version of these Windows API do not exist for WINCE,
** it's important to not reference them for WINCE builds.
*/
#if SQLITE_OS_WINCE==0
  }else{







|
|
>
|
|
|
|
|
>
|
>
>
>
>
>







2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
  UNUSED_PARAMETER(pVfs);
  if( zConverted==0 ){
    return SQLITE_NOMEM;
  }
  if( isNT() ){
    WIN32_FILE_ATTRIBUTE_DATA sAttrData;
    memset(&sAttrData, 0, sizeof(sAttrData));
    if( GetFileAttributesExW((WCHAR*)zConverted,
                             GetFileExInfoStandard, 
                             &sAttrData) ){
      /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file
      ** as if it does not exist.
      */
      if(    flags==SQLITE_ACCESS_EXISTS
          && sAttrData.nFileSizeHigh==0 
          && sAttrData.nFileSizeLow==0 ){
        attr = INVALID_FILE_ATTRIBUTES;
      }else{
        attr = sAttrData.dwFileAttributes;
      }
    }else{
      return SQLITE_IOERR;
    }
/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
** Since the ASCII version of these Windows API do not exist for WINCE,
** it's important to not reference them for WINCE builds.
*/
#if SQLITE_OS_WINCE==0
  }else{