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

Increase the hard upper bound on the number of pcache pages in test_pcache

when the test harness is compiled for in-memory temp tables.  Some of the
test cases need to extra memory to avoid unplanned out of memory errors. (CVS 6494)

FossilOrigin-Name: 7f2d6a0bd510801e011eb075f494194d9ebf568b
This commit is contained in:
drh
2009-04-11 11:38:53 +00:00
parent 1c50179332
commit 1a0cc28e84
3 changed files with 21 additions and 11 deletions

View File

@@ -21,7 +21,7 @@
** This pagecache implementation is designed for simplicity
** not speed.
**
** $Id: test_pcache.c,v 1.2 2009/01/07 03:59:47 drh Exp $
** $Id: test_pcache.c,v 1.3 2009/04/11 11:38:54 drh Exp $
*/
#include "sqlite3.h"
#include <string.h>
@@ -75,9 +75,19 @@ static void testpcacheShutdown(void *pArg){
}
/*
** Number of pages in a cache
** Number of pages in a cache.
**
** The number of pages is a hard upper bound in this test module.
** If more pages are requested, sqlite3PcacheFetch() returns NULL.
**
** If testing with in-memory temp tables, provide a larger pcache.
** Some of the test cases need this.
*/
#define TESTPCACHE_NPAGE 217
#if defined(SQLITE_TEMP_STORE) && SQLITE_TEMP_STORE>=2
# define TESTPCACHE_NPAGE 499
#else
# define TESTPCACHE_NPAGE 217
#endif
#define TESTPCACHE_RESERVE 17
/*