mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Reduce the number of calls to the subjRequiresPage() routine inside of pager.
FossilOrigin-Name: e50ff39a93a51b5a5be4f0e82a76104b81c9e2a4
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Create\sand\suse\sa\snew\spager\sinterface\ssqlite3PagerUnrefNotNull()\sthat\sworks\njust\slike\ssqlite3PagerUnref()\sbut\sguarantees\sthat\sits\sargument\sis\snot\sa\nNULL\spointer.
|
C Reduce\sthe\snumber\sof\scalls\sto\sthe\ssubjRequiresPage()\sroutine\sinside\sof\spager.
|
||||||
D 2013-12-13T19:35:21.600
|
D 2013-12-13T19:48:04.970
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
|
F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -207,7 +207,7 @@ F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
|
|||||||
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
||||||
F src/os_unix.c 60a7b3b23e6fcf83a50d1e320b280b551724e11f
|
F src/os_unix.c 60a7b3b23e6fcf83a50d1e320b280b551724e11f
|
||||||
F src/os_win.c 16eac0961603182ffc10c02b39fe830126538e07
|
F src/os_win.c 16eac0961603182ffc10c02b39fe830126538e07
|
||||||
F src/pager.c 4757194b2f1ffd65a5fc45a3df4d38acc41fb7b3
|
F src/pager.c 3436cc9cce915e3fbcf9ae26a877816c2e6158f1
|
||||||
F src/pager.h ffd5607f7b3e4590b415b007a4382f693334d428
|
F src/pager.h ffd5607f7b3e4590b415b007a4382f693334d428
|
||||||
F src/parse.y acee1a9958539e21263362b194594c5255ad2fca
|
F src/parse.y acee1a9958539e21263362b194594c5255ad2fca
|
||||||
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
|
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
|
||||||
@@ -1146,7 +1146,7 @@ F tool/vdbe-compress.tcl 0cf56e9263a152b84da86e75a5c0cdcdb7a47891
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||||
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
||||||
P a845779cd31aec3204a6a9c776bd9c9f7d47dd24
|
P e00f37e2333cac5b53e17cf764ab56c4fcd5f617
|
||||||
R 0519b15291565e2dff816e0cb01e063b
|
R f4a7260efd0973fe242850b07fa047a9
|
||||||
U drh
|
U drh
|
||||||
Z 0b683c4f7d4e0f307681d123364409c6
|
Z 2c603ffc4b31451da49fbf26e09993c0
|
||||||
|
@@ -1 +1 @@
|
|||||||
e00f37e2333cac5b53e17cf764ab56c4fcd5f617
|
e50ff39a93a51b5a5be4f0e82a76104b81c9e2a4
|
15
src/pager.c
15
src/pager.c
@@ -1024,15 +1024,12 @@ static char *print_pager_state(Pager *p){
|
|||||||
static int subjRequiresPage(PgHdr *pPg){
|
static int subjRequiresPage(PgHdr *pPg){
|
||||||
Pager *pPager = pPg->pPager;
|
Pager *pPager = pPg->pPager;
|
||||||
PagerSavepoint *p;
|
PagerSavepoint *p;
|
||||||
Pgno pgno;
|
Pgno pgno = pPg->pgno;
|
||||||
int i;
|
int i;
|
||||||
if( pPager->nSavepoint ){
|
for(i=0; i<pPager->nSavepoint; i++){
|
||||||
pgno = pPg->pgno;
|
p = &pPager->aSavepoint[i];
|
||||||
for(i=0; i<pPager->nSavepoint; i++){
|
if( p->nOrig>=pgno && 0==sqlite3BitvecTest(p->pInSavepoint, pgno) ){
|
||||||
p = &pPager->aSavepoint[i];
|
return 1;
|
||||||
if( p->nOrig>=pgno && 0==sqlite3BitvecTest(p->pInSavepoint, pgno) ){
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -5677,7 +5674,7 @@ static int pager_write(PgHdr *pPg){
|
|||||||
** to the journal then we can return right away.
|
** to the journal then we can return right away.
|
||||||
*/
|
*/
|
||||||
sqlite3PcacheMakeDirty(pPg);
|
sqlite3PcacheMakeDirty(pPg);
|
||||||
if( pageInJournal(pPg) && !subjRequiresPage(pPg) ){
|
if( pageInJournal(pPg) && (pPager->nSavepoint==0 || !subjRequiresPage(pPg)) ){
|
||||||
assert( !pagerUseWal(pPager) );
|
assert( !pagerUseWal(pPager) );
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user