diff options
author | drh <drh@noemail.net> | 2011-12-23 00:25:02 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-23 00:25:02 +0000 |
commit | bec7c97899cc6ff656ea134d2b718909e80c5063 (patch) | |
tree | b70dcf4eb4fe894e56811550373fb848703323f3 /src/os_unix.c | |
parent | 3a7df358ab0518f0b4057093a901896dd66d5250 (diff) | |
parent | 9291372094ec5dfa66fb9ca67171a7d9c7b4ceba (diff) | |
download | sqlite-bec7c97899cc6ff656ea134d2b718909e80c5063.tar.gz sqlite-bec7c97899cc6ff656ea134d2b718909e80c5063.zip |
Merge the latest trunk changes into the statvfs branch.
FossilOrigin-Name: d5e36327c12f264429eb079bddbb71a310f76389
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 4a31c8cde..5378f862e 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3917,10 +3917,8 @@ static int unixOpenSharedMemory(unixFile *pDbFd){ } if( pInode->bProcessLock==0 ){ - const char *zRO; int openFlags = O_RDWR | O_CREAT; - zRO = sqlite3_uri_parameter(pDbFd->zPath, "readonly_shm"); - if( zRO && sqlite3GetBoolean(zRO) ){ + if( sqlite3_uri_boolean(pDbFd->zPath, "readonly_shm", 0) ){ openFlags = O_RDONLY; pShmNode->isReadonly = 1; } @@ -4592,7 +4590,6 @@ static int fillInUnixFile( const sqlite3_io_methods *pLockingStyle; unixFile *pNew = (unixFile *)pId; int rc = SQLITE_OK; - const char *zZeroDam; /* Value of the zero_damage query parameter */ assert( pNew->pInode==NULL ); @@ -4619,9 +4616,10 @@ static int fillInUnixFile( pNew->h = h; pNew->pVfs = pVfs; pNew->zPath = zFilename; - zZeroDam = sqlite3_uri_parameter(zFilename, "zero_damage"); - if( zZeroDam==0 ) zZeroDam = "1"; - pNew->ctrlFlags = atoi(zZeroDam) ? UNIXFILE_ZERO_DAMAGE : 1; + pNew->ctrlFlags = 0; + if( sqlite3_uri_boolean(zFilename, "zero_damage", 1) ){ + pNew->ctrlFlags |= UNIXFILE_ZERO_DAMAGE; + } if( memcmp(pVfs->zName,"unix-excl",10)==0 ){ pNew->ctrlFlags |= UNIXFILE_EXCL; } |