/ Check-in [9f4da101]
Login

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

Overview
Comment:always use random access mode when opening files (like on Windows) (CVS 4784)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9f4da1013b558fcabadc3a3bec6bcdae9b06399e
User & Date: pweilbacher 2008-02-13 23:48:03
Context
2008-02-14
00:00
small correctness fix for os2CheckReservedLock() (CVS 4785) check-in: f364d934 user: pweilbacher tags: trunk
2008-02-13
23:48
always use random access mode when opening files (like on Windows) (CVS 4784) check-in: 9f4da101 user: pweilbacher tags: trunk
18:25
Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783) check-in: 990237e2 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
  }else{
    ulFileAttribute = FILE_ARCHIVED | FILE_NORMAL;
    pFile->delOnClose = 0;
    pFile->pathToDel = NULL;
    OSTRACE1( "OPEN normal file attribute\n" );
  }

  //ulOpenMode |= flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB) ?
  //                  OPEN_FLAGS_RANDOM : OPEN_FLAGS_SEQUENTIAL;
  if( flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB) ){
    ulOpenMode |= OPEN_FLAGS_RANDOM;
    OSTRACE1( "OPEN random access\n" );
  }else{
    ulOpenMode |= OPEN_FLAGS_SEQUENTIAL;
    OSTRACE1( "OPEN sequential access\n" );
  }
  ulOpenMode |= OPEN_FLAGS_FAIL_ON_ERROR;

  rc = DosOpen( (PSZ)zName,
                &h,
                &ulAction,
                0L,
                ulFileAttribute,







|
<
<
|
<
<
<
<
<







637
638
639
640
641
642
643
644


645





646
647
648
649
650
651
652
  }else{
    ulFileAttribute = FILE_ARCHIVED | FILE_NORMAL;
    pFile->delOnClose = 0;
    pFile->pathToDel = NULL;
    OSTRACE1( "OPEN normal file attribute\n" );
  }

  /* always open in random access mode for possibly better speed */


  ulOpenMode |= OPEN_FLAGS_RANDOM;





  ulOpenMode |= OPEN_FLAGS_FAIL_ON_ERROR;

  rc = DosOpen( (PSZ)zName,
                &h,
                &ulAction,
                0L,
                ulFileAttribute,