-C Fix\scompiler\swarnings.\s(CVS\s6117)
-D 2009-01-06T14:19:37
+C Fix\sa\smemory\sleak\sin\stest_journal.c\s(test\scode).\sAlso\sremove\sfunction\spager_truncate_cache(),\sa\swrapper\saround\ssqlite3PCacheTruncate(),\sfrom\spager.c.\s(CVS\s6118)
+D 2009-01-06T14:34:35
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c e6eacc7ec735ded605fefcbaf250058baa8feb12
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
-F src/pager.c 9c9bc48765cb8d6c4445d3628bed52a0e0af762c
+F src/pager.c e93008f9326701087239c0300547e66d18ddb63c
F src/pager.h 0793c5e4faed6c278037eb22b2434b318687d615
F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
F src/test_devsym.c 9f4bc2551e267ce7aeda195f3897d0f30c5228f4
F src/test_func.c a55c4d5479ff2eb5c0a22d4d88e9528ab59c953b
F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
-F src/test_journal.c 036ad7ab47ba262a812189ca16fe3e9033bdbdb3
+F src/test_journal.c a70ac20fd599427114fc6a6a7d39b494a25a256d
F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9
F src/test_malloc.c 5127337c9fb4c851a7f604c0170e0e5ca1fbfe33
F src/test_md5.c 28209a4e2068711b5443c33104fe41f21d160071
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 8c62ea4fded2251e9daf16f2a050f94359299d76
-R d34da009576dbfa85fca59c19029124d
-U drh
-Z 0264d4c499d8f99603da773992f1f3bf
+P da770a8dff183b28aca287cafb9c8b82b98ea968
+R 2172b16d676a799e44e84c464b6413bf
+U danielk1977
+Z a44d18eb329206a7ca5cf0468ff0c42d
-da770a8dff183b28aca287cafb9c8b82b98ea968
\ No newline at end of file
+a64f3db0b39af53c8d8f80c242baa8aa4b5bd04e
\ No newline at end of file
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.530 2009/01/06 13:40:08 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.531 2009/01/06 14:34:35 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
** current.
**
** There are a couple of different ways this can happen. All are quite
- ** obscure. When not running in synchronous mode, this can only happen
+ ** obscure. When running in synchronous mode, this can only happen
** if the page is on the free-list at the start of the transaction, then
** populated, then moved using sqlite3PagerMovepage().
**
}
-static void pager_truncate_cache(Pager *pPager);
-
/*
** Truncate the main file of the given pager to the number of pages
** indicated. Also truncate the cached representation of the file.
}
if( rc==SQLITE_OK ){
pPager->dbSize = nPage;
- pager_truncate_cache(pPager);
+ sqlite3PcacheTruncate(pPager->pPCache, nPage);
}
return rc;
}
*/
static int syncJournal(Pager*);
-/*
-** This routine is used to truncate the cache when a database
-** is truncated. Drop from the cache all pages whose pgno is
-** larger than pPager->dbSize and is unreferenced.
-**
-** Referenced pages larger than pPager->dbSize are zeroed.
-**
-** Actually, at the point this routine is called, it would be
-** an error to have a referenced page. But rather than delete
-** that page and guarantee a subsequent segfault, it seems better
-** to zero it and hope that we error out sanely.
-*/
-static void pager_truncate_cache(Pager *pPager){
- sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
-}
-
/*
** Try to obtain a lock on a file. Invoke the busy callback if the lock
** is currently not available. Repeat until the busy callback returns
** b) the page was not a free-list leaf page when the transaction was
** first opened.
**
-** $Id: test_journal.c,v 1.4 2009/01/05 17:15:00 danielk1977 Exp $
+** $Id: test_journal.c,v 1.5 2009/01/06 14:34:35 danielk1977 Exp $
*/
#if SQLITE_TEST /* This file is used for testing only */
jt_file **pp;
jt_file *p = (jt_file *)pFile;
+ closeTransaction(p);
if( p->zName ){
for(pp=&g.pList; *pp!=p; pp=&(*pp)->pNext);
*pp = p->pNext;