mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Simplify the pcache module by only recycling clean pages from 'other' caches. This commit causes errors in test files ioerr5.test and malloc5.test because they test recycling dirty pages from other caches. (CVS 5615)
FossilOrigin-Name: 9e511e161bcb077450d31fca5dd20c2557f103b3
This commit is contained in:
23
src/test2.c
23
src/test2.c
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test2.c,v 1.60 2008/08/20 14:49:25 danielk1977 Exp $
|
||||
** $Id: test2.c,v 1.61 2008/08/26 18:05:48 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@@ -382,26 +382,6 @@ static int page_lookup(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Usage: pcache_global_max NPAGE
|
||||
*/
|
||||
static int pcache_global_max(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
const char **argv /* Text of each argument */
|
||||
){
|
||||
int nPage;
|
||||
if( argc!=2 ){
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
|
||||
" NPAGE\"", 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if( Tcl_GetInt(interp, argv[1], &nPage) ) return TCL_ERROR;
|
||||
sqlite3PcacheGlobalMax(nPage);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Usage: pager_truncate ID PGNO
|
||||
*/
|
||||
@@ -650,7 +630,6 @@ int Sqlitetest2_Init(Tcl_Interp *interp){
|
||||
{ "page_write", (Tcl_CmdProc*)page_write },
|
||||
{ "page_number", (Tcl_CmdProc*)page_number },
|
||||
{ "pager_truncate", (Tcl_CmdProc*)pager_truncate },
|
||||
{ "pcache_global_max", (Tcl_CmdProc*)pcache_global_max },
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
{ "fake_big_file", (Tcl_CmdProc*)fake_big_file },
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user