-C Support\sfor\sa\sfuture\sALTER\sTABLE\scommand\sto\sadd\scolumns\swith\sdefault\svalues.\s(CVS\s2367)
-D 2005-03-09T12:26:51
+C Fix\sa\sfile\scorruption\sbug\sin\sCREATE\sINDEX\sin\sauto-vacuum\sdatabases.\s(CVS\s2368)
+D 2005-03-09T13:09:44
F Makefile.in 76443a83549d1539105e12d13bd0054a05ab2214
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
F src/alter.c 6dab3d91aa4bf5c24e874145a2a547070c8c1883
F src/attach.c f78f76bc6a8e5e487ca53636e21ccba2484a9a61
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
-F src/btree.c 2a9c2c8a9f5a2762f0c770bc9c3f69c689d79d81
+F src/btree.c 448cd6280f18ef5723a177c4073319b1c65c86ad
F src/btree.h 2e2cc923224649337d7217df0dd32b06673ca180
F src/build.c a8792b2f866c1ccc32f4977f4ff61d787d60ddfb
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
F src/os_win.c bddeae1c3299be0fbe47077dd4e98b786a067f71
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c 835028769569971c7dbd63d11d3517392f1cdae0
+F src/pager.c b728c90bfa33994006a067a32971cabd0a852916
F src/pager.h 70d496f372163abb6340f474288c4bb9ea962cf7
F src/parse.y 0b6135268a7a29db35335d5b71b5a8791e02f91e
F src/pragma.c 4b20dbc0f4b97f412dc511853d3d0c2e0d4adedc
F test/attach3.test c05c70b933afbde0901dab9da3e66ee842c09f38
F test/auth.test b24d12de3a6ba49237216429f8dc672a8a52b342
F test/autoinc.test d619da7d5cb9a3d63e6a7925259fc173f7e2080e
-F test/autovacuum.test 8ba29face873300394f9446ded0e4a142d24e7e4
+F test/autovacuum.test cf2719b17659f7a011202ad05905654cedf26023
F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31
F test/autovacuum_ioerr.test 9cf27275ca47b72e188a47c53b61b6d583a01d24
F test/autovacuum_ioerr2.test 2f8a3fb31f833fd0ca86ad4ad98913c73e807572
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P 9b96078763949a2723482328e7b90c939ba8d2d8
-R addb8e4a99b565c64d053b41daed1503
+P 9d5abc1ddf6da37563c12d5a0401b89bb4e51c59
+R 7ebd6c17f19c475f5965e55f2c022589
U danielk1977
-Z 96056e2906d91fc33a19b0bf81dd2822
+Z 9f3ce05c00f0a22bc7d46eacd8760d1e
-9d5abc1ddf6da37563c12d5a0401b89bb4e51c59
\ No newline at end of file
+64c4c717d35c8fce9b4be073196c507f6d471188
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.249 2005/02/26 17:31:27 drh Exp $
+** $Id: btree.c,v 1.250 2005/03/09 13:09:44 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
}
assert( eType!=PTRMAP_ROOTPAGE );
assert( eType!=PTRMAP_FREEPAGE );
+ rc = sqlite3pager_write(pRoot->aData);
+ if( rc!=SQLITE_OK ){
+ releasePage(pRoot);
+ return rc;
+ }
rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove);
releasePage(pRoot);
if( rc!=SQLITE_OK ){
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.190 2005/02/15 03:38:06 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.191 2005/03/09 13:09:45 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
** meta-data associated with page pData (i.e. data stored in the nExtra bytes
** allocated along with the page) is the responsibility of the caller.
**
-** A transaction must be active when this routine is called, however it is
-** illegal to call this routine if a statment transaction is active.
+** A transaction must be active when this routine is called. It used to be
+** required that a statement transaction was not active, but this restriction
+** has been removed (CREATE INDEX needs to move a page when a statement
+** transaction is active).
*/
int sqlite3pager_movepage(Pager *pPager, void *pData, Pgno pgno){
PgHdr *pPg = DATA_TO_PGHDR(pData);
int h;
Pgno needSyncPgno = 0;
- assert( !pPager->stmtInUse );
assert( pPg->nRef>0 );
TRACE5("MOVE %d page %d (needSync=%d) moves to %d\n",
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
-# $Id: autovacuum.test,v 1.16 2005/01/24 10:26:00 danielk1977 Exp $
+# $Id: autovacuum.test,v 1.17 2005/03/09 13:09:45 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
file_pages
} [expr $AUTOVACUUM?1:2]
+#-----------------------------------------------------------------------
+# Test that if a statement transaction around a CREATE INDEX statement is
+# rolled back no corruption occurs.
+#
+do_test autovacuum-4.1 {
+ execsql {
+ CREATE TABLE av1(a, b);
+ BEGIN;
+ }
+ for {set i 0} {$i<100} {incr i} {
+ execsql "INSERT INTO av1 VALUES($i, '[string repeat X 200]');"
+ }
+ execsql "INSERT INTO av1 VALUES(99, '[string repeat X 200]');"
+ execsql {
+ SELECT sum(a) FROM av1;
+ }
+} {5049.0}
+do_test autovacuum-4.2 {
+ catchsql {
+ CREATE UNIQUE INDEX av1_i ON av1(a);
+ }
+} {1 {indexed columns are not unique}}
+do_test autovacuum-4.3 {
+ execsql {
+ SELECT sum(a) FROM av1;
+ }
+} {5049.0}
+do_test autovacuum-4.4 {
+ execsql {
+ COMMIT;
+ }
+} {}
+
finish_test