-C Change\sthe\scollation\ssequence\sinterface\sto\sallow\scollation\ssequences\sthat\nuse\sUTF-16\sin\snon-native\sbyte\sorder\sto\sbe\sregistered.\s(CVS\s1559)
-D 2004-06-10T02:16:02
+C When\sin\sPAGER_RESERVED\sstate,\sdon't\swrite\sto\sthe\smain\sfile\swhen\srolling\nback\sa\sstatement\stransaction.\s(CVS\s1560)
+D 2004-06-10T04:32:17
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/os_unix.h 1cd6133cf66dea704b8646b70b2dfdcbdd9b3738
F src/os_win.c 6b8f9fcc683bb888e07fc485372803baa68faadb
F src/os_win.h 004eec47b1780fcaf07420ddc2072294b698d48c
-F src/pager.c 88a7160c749435c03a4154996cd851196c0a87c2
+F src/pager.c 778379c031daa20d134a934d5753c19b606c10db
F src/pager.h ca8f293e1d623a7c628a1c5e0c6cf43d5bbb80bf
F src/parse.y 097438674976355a10cf177bd97326c548820b86
F src/pragma.c 6ab13748a415bf8e8f2dd79e5f713fbe72dfd3f4
F src/vdbe.h 46f74444a213129bc4b5ce40124dd8ed613b0cde
F src/vdbeInt.h d41605853332bdbd600d7ecd60e1f54bbaea174e
F src/vdbeapi.c 4ac95766b0515538037a7aec172ed26142f97cf9
-F src/vdbeaux.c 6f5b26a6b4d9c9f0f99a9f75dce9460e5a90542e
+F src/vdbeaux.c 73764dadcdbf79aa2d948f863eae07b18589e663
F src/vdbemem.c 5b2fab8b5a830e5204413b808c4a2d8335189f21
F src/where.c 32578882a245f8ac3303c5cea4664cd51fc73891
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
F test/trans.test 4a26c6fa3639202c334521954c17d8abe8a1c8e8
F test/trigger1.test 99b7cd9a568ac60aa04bbc3b9db9575ffa97709a
F test/trigger2.test 0767ab30cb5a2c8402c8524f3d566b410b6f5263
-F test/trigger3.test 895301736db4f0f111815f43502d9bdb150cc722
+F test/trigger3.test 70931be83fa3f563f7a5ca9e88b86f476af73948
F test/trigger4.test 542afce45774e8f8e1130b96b8675f414d6e4bd8
F test/types.test 6c49e574970866558365a025b44c9fd8a162ef0d
F test/types2.test 5d725fcb68dbd032c6d4950d568d75fa33872687
F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 28c3cc088018833f507535b8d227232776cff204
-R f9fbe975e7140b57b35e8b9f5b97fbe5
+P b8aaa3a29e0ddef357ab1b3b0b9f87ed390f2f36
+R ad810f31dbb79cebb57b3882d1073a25
U danielk1977
-Z 419742ffbc029c96384373534fdaa6dc
+Z 5213c6eb04cd03f6a07cc2df587564de
-b8aaa3a29e0ddef357ab1b3b0b9f87ed390f2f36
\ No newline at end of file
+adb2bd61436927d37b23bae857089d62e12397af
\ No newline at end of file
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.120 2004/06/10 02:16:02 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.121 2004/06/10 04:32:17 danielk1977 Exp $
*/
#include "os.h" /* Must be first to enable large file support */
#include "sqliteInt.h"
}
}
- /* Playback the page. Update the in-memory copy of the page
- ** at the same time, if there is one.
+ assert( pPager->state==PAGER_RESERVED || pPager->state==PAGER_EXCLUSIVE );
+
+ /* If the pager is in RESERVED state, then there must be a copy of this
+ ** page in the pager cache. In this case just update the pager cache,
+ ** not the database file.
+ **
+ ** If in EXCLUSIVE state, then we update the pager cache if it exists
+ ** and the main file. The page is then marked not dirty.
*/
pPg = pager_lookup(pPager, pgno);
+ assert( pPager->state==PAGER_EXCLUSIVE || pPg );
TRACE2("PLAYBACK page %d\n", pgno);
- sqlite3OsSeek(&pPager->fd, (pgno-1)*(off_t)SQLITE_PAGE_SIZE);
- rc = sqlite3OsWrite(&pPager->fd, aData, SQLITE_PAGE_SIZE);
+ if( pPager->state==PAGER_EXCLUSIVE ){
+ sqlite3OsSeek(&pPager->fd, (pgno-1)*(off_t)SQLITE_PAGE_SIZE);
+ rc = sqlite3OsWrite(&pPager->fd, aData, SQLITE_PAGE_SIZE);
+ }
if( pPg ){
/* No page should ever be rolled back that is in use, except for page
** 1 which is held in use in order to keep the lock on the database
db->autoCommit = 1;
}
}
+ p->autoCommitOn = 0;
/* If xFunc is not NULL, then it is one of sqlite3BtreeRollback,
** sqlite3BtreeRollbackStmt or sqlite3BtreeCommitStmt. Call it once on
set testdir [file dirname $argv0]
source $testdir/tester.tcl
-set sqlite_os_trace 1
-execsql {
- PRAGMA vdbe_listing=on;
- PRAGMA sql_trace=on;
- PRAGMA vdbe_trace=on;
-}
# Test that we can cause ROLLBACK, FAIL and ABORT correctly
# catchsql { DROP TABLE tbl; }
do_test trigger3-1.3 {
execsql {SELECT * FROM tbl}
} {}
-exit
# FAIL
do_test trigger3-2.1 {