1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Make use of the sqlite3GetBoolean() interface for more robust processing

of the readonly_shm query parameter inside of unixShmMap().

FossilOrigin-Name: 1f930d7e04cd4a5ff3d91a0e9f1b62114f1cebd2
This commit is contained in:
drh
2011-06-01 20:13:36 +00:00
parent 66dfec8b7a
commit fd019ef7ce
3 changed files with 8 additions and 8 deletions

View File

@@ -3787,7 +3787,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
if( pShmNode->h<0 ){
const char *zRO;
zRO = sqlite3_uri_parameter(pDbFd->zPath, "readonly_shm");
if( zRO && (zRO[0]!='0' || zRO[1]!=0) ){
if( zRO && sqlite3GetBoolean(zRO) ){
pShmNode->h = robust_open(zShmFilename, O_RDONLY,
(sStat.st_mode & 0777));
pShmNode->isReadonly = 1;