/ Check-in [4f195aa1]
Login

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

Overview
Comment:Remove a superfluous call to access() in the unix driver. Error spotted by Coverity. (CVS 3175)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4f195aa1ebef5129e6f912e78b3d5f97b393a06c
User & Date: drh 2006-04-19 01:24:53
Context
2006-04-21
09:38
Additional information about index sorting in EXPLAIN QUERY PLAN. (CVS 3176) check-in: 39dd9695 user: drh tags: trunk
2006-04-19
01:24
Remove a superfluous call to access() in the unix driver. Error spotted by Coverity. (CVS 3175) check-in: 4f195aa1 user: drh tags: trunk
2006-04-16
12:05
Allocate enough memory for the worst-case UTF-16 to UTF-8 conversion. Ticket #1773. (CVS 3174) check-in: 2a0120c0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

   748    748   */
   749    749   int sqlite3UnixOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
   750    750     int rc;
   751    751     unixFile f;
   752    752   
   753    753     CRASH_TEST_OVERRIDE(sqlite3CrashOpenExclusive, zFilename, pId, delFlag);
   754    754     assert( 0==*pId );
   755         -  if( access(zFilename, 0)==0 ){
   756         -    return SQLITE_CANTOPEN;
   757         -  }
   758    755     f.h = open(zFilename,
   759    756                   O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_LARGEFILE|O_BINARY,
   760    757                   SQLITE_DEFAULT_FILE_PERMISSIONS);
   761    758     if( f.h<0 ){
   762    759       return SQLITE_CANTOPEN;
   763    760     }
   764    761     sqlite3OsEnterMutex();