1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Further simplifications to pager.c in support of structural coverage testing. (CVS 6929)

FossilOrigin-Name: 866216c0b6ba23b66483046fb402ddbe4f9a7b14
This commit is contained in:
drh
2009-07-24 19:01:19 +00:00
parent 595a523a10
commit 4775ecd06a
6 changed files with 54 additions and 47 deletions

View File

@@ -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.73 2009/07/21 19:25:24 danielk1977 Exp $
** $Id: test2.c,v 1.74 2009/07/24 19:01:20 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -56,6 +56,13 @@ static char *errorName(int rc){
*/
static int test_pagesize = 1024;
/*
** Dummy page reinitializer
*/
static void pager_test_reiniter(DbPage *pNotUsed){
return;
}
/*
** Usage: pager_open FILENAME N-PAGE
**
@@ -79,7 +86,8 @@ static int pager_open(
}
if( Tcl_GetInt(interp, argv[2], &nPage) ) return TCL_ERROR;
rc = sqlite3PagerOpen(sqlite3_vfs_find(0), &pPager, argv[1], 0, 0,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MAIN_DB);
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MAIN_DB,
pager_test_reiniter);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, errorName(rc), 0);
return TCL_ERROR;