mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
The noReadlock property on a pager object implies the readOnly property.
Use this fact to simplify the logic in sqlite3PagerSharedLock(). (CVS 6944) FossilOrigin-Name: 886e665f6cf780464b280c286b03c9fb5c1a6b2a
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Remove\sobsolete\sassert\sand\stestcase\smacros\srelated\sto\sticket\s#2565\s(CVS\s6943)
|
C The\snoReadlock\sproperty\son\sa\spager\sobject\simplies\sthe\sreadOnly\sproperty.\nUse\sthis\sfact\sto\ssimplify\sthe\slogic\sin\ssqlite3PagerSharedLock().\s(CVS\s6944)
|
||||||
D 2009-07-25T19:31:32
|
D 2009-07-25T22:13:35
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -147,7 +147,7 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
|
|||||||
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
||||||
F src/os_unix.c cdb2a08b9ce4aa13b3f7b91d4dd60fb48be9f56a
|
F src/os_unix.c cdb2a08b9ce4aa13b3f7b91d4dd60fb48be9f56a
|
||||||
F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
|
F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
|
||||||
F src/pager.c a9ce18aaeff8d0db8e3a1ce201403d24a88b5615
|
F src/pager.c 36a14ae25416f07a81b0ca391d1b877b6da2e8cf
|
||||||
F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f
|
F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f
|
||||||
F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5
|
F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5
|
||||||
F src/pcache.c c92ffd4f3e1279b3766854c6d18b5bf4aac0d1fa
|
F src/pcache.c c92ffd4f3e1279b3766854c6d18b5bf4aac0d1fa
|
||||||
@@ -738,7 +738,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||||
P 04211e6af9cdd3e7f19b458c72b722f8f8584245
|
P f0024b3189245d608a0cb57fa7e472c6daa1406f
|
||||||
R 8adb748dfc821dbb88e17d8c87bfe5b8
|
R 25fcba4dba5a24b6461a64df15761046
|
||||||
U drh
|
U drh
|
||||||
Z f21756b73703ef7299f117f5f2222357
|
Z 68027e399a7581e7ca33dd0037ba76d1
|
||||||
|
@@ -1 +1 @@
|
|||||||
f0024b3189245d608a0cb57fa7e472c6daa1406f
|
886e665f6cf780464b280c286b03c9fb5c1a6b2a
|
@@ -18,7 +18,7 @@
|
|||||||
** file simultaneously, or one process from reading the database while
|
** file simultaneously, or one process from reading the database while
|
||||||
** another is writing.
|
** another is writing.
|
||||||
**
|
**
|
||||||
** @(#) $Id: pager.c,v 1.626 2009/07/25 19:31:32 drh Exp $
|
** @(#) $Id: pager.c,v 1.627 2009/07/25 22:13:35 drh Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef SQLITE_OMIT_DISKIO
|
#ifndef SQLITE_OMIT_DISKIO
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
@@ -3567,14 +3567,15 @@ int sqlite3PagerSharedLock(Pager *pPager){
|
|||||||
int isHotJournal = 0;
|
int isHotJournal = 0;
|
||||||
assert( !MEMDB );
|
assert( !MEMDB );
|
||||||
assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
|
assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
|
||||||
if( !pPager->noReadlock ){
|
if( pPager->noReadlock ){
|
||||||
|
assert( pPager->readOnly );
|
||||||
|
pPager->state = PAGER_SHARED;
|
||||||
|
}else{
|
||||||
rc = pager_wait_on_lock(pPager, SHARED_LOCK);
|
rc = pager_wait_on_lock(pPager, SHARED_LOCK);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
assert( pPager->state==PAGER_UNLOCK );
|
assert( pPager->state==PAGER_UNLOCK );
|
||||||
return pager_error(pPager, rc);
|
return pager_error(pPager, rc);
|
||||||
}
|
}
|
||||||
}else if( pPager->state==PAGER_UNLOCK ){
|
|
||||||
pPager->state = PAGER_SHARED;
|
|
||||||
}
|
}
|
||||||
assert( pPager->state>=SHARED_LOCK );
|
assert( pPager->state>=SHARED_LOCK );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user