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

@ -1,5 +1,5 @@
C Simplify\sthe\swal-readonly\sbranch\sso\sthat\sit\sdoes\snot\srequire\schanges\sto\nanything\sother\sthan\sos_unix.c\sand\swal.c\sand\sa\scouple\sof\snew\serror\scodes.
D 2011-06-01T20:01:49.650
C Make\suse\sof\sthe\ssqlite3GetBoolean()\sinterface\sfor\smore\srobust\sprocessing\nof\sthe\sreadonly_shm\squery\sparameter\sinside\sof\sunixShmMap().
D 2011-06-01T20:13:36.269
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 11dcc00a8d0e5202def00e81732784fb0cc4fe1d
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -163,7 +163,7 @@ F src/os.c 22ac61d06e72a0dac900400147333b07b13d8e1d
F src/os.h 9dbed8c2b9c1f2f2ebabc09e49829d4777c26bf9
F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
F src/os_unix.c a59c0718021934157f235468788c793cbc0d53de
F src/os_unix.c fd4e9588ff0ce09720721ce739ab2682202875ae
F src/os_win.c 218b899469e570d46eb8147c2383075f7c026230
F src/pager.c 120550e7ef01dafaa2cbb4a0528c0d87c8f12b41
F src/pager.h 3f8c783de1d4706b40b1ac15b64f5f896bcc78d1
@ -939,7 +939,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 0b63b71357a65e26ecd3f3bb34a5f14feee322f4
R 20a045d8e6470f5f17b67b2f15ff8859
P d6b4709de4d1f8af001f58938247f00a652a616e
R fdd310892b7cea51b352170f4a152593
U drh
Z f7b3b70c555e3fb5f3360ed8e60c2877
Z cc8ff93f2b92f997226013b652879169

View File

@ -1 +1 @@
d6b4709de4d1f8af001f58938247f00a652a616e
1f930d7e04cd4a5ff3d91a0e9f1b62114f1cebd2

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;