-C VACUUM\sreturns\sSQLITE_INTERRUPT\swhen\sinterrupted.\s\sTicket\s#593.\s(CVS\s1228)
-D 2004-02-12T13:02:56
+C Always\sreload\sthe\sschema\safter\sa\srollback.\s\sTicket\s#594.\s(CVS\s1229)
+D 2004-02-12T15:31:21
F Makefile.in cfd75c46b335881999333a9e4b982fa8491f200b
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/auth.c c59ad0dab501888f8b1fccc25e2f5965d2265116
F src/btree.c c325d46f0aa815d73358bf2e044dab23f645c214
F src/btree.h 41cb3ff6ebc3f6da2d0a074e39ff8c7a2287469f
-F src/btree_rb.c ed844f9181d08efa4eaca2c157accc27434e345f
+F src/btree_rb.c 32b2cb4285c0fbd53b89de021637b63d52257e54
F src/build.c 05ee0d69c7379ef3e20121b2197bfb8865003371
F src/copy.c 9e47975ea96751c658bcf1a0c4f0bb7c6ee61e73
F src/date.c c9d2bfd40b1c95f8f97d53a5eba981d7167c7b61
F src/hash.c 9b56ef3b291e25168f630d5643a4264ec011c70e
F src/hash.h 3247573ab95b9dd90bcca0307a75d9a16da1ccc7
F src/insert.c 01f66866f35c986eab4a57373ca689a3255ef2df
-F src/main.c 6ec57b0f146572033c70493417d251365a7b4fbe
+F src/main.c 79e303dc172579549f9921b4bfe94e0a8cb96722
F src/md5.c fe4f9c9c6f71dfc26af8da63e4d04489b1430565
F src/os.c f5fc4954725b2fcd852979f2746085fe8ca27710
F src/os.h 250a3789be609adfee5c5aa20137ce8683276f24
F src/pragma.c 89d62c31c6f0a43376fe8d20549b87a6d30c467a
F src/printf.c 84e4ea4ba49cbbf930e95e82295127ad5843ae1f
F src/random.c 775913e0b7fbd6295d21f12a7bd35b46387c44b2
-F src/select.c a0211d1a6a94f6c3e611096e77f2d689a641495e
+F src/select.c a3a203f9b68c899ac69dbc5fa11cd649fd8acd06
F src/shell.c c1c7242ede2af46044378d36d2c533e98fd59fb8
F src/sqlite.h.in 1798588cab21ebf9fac3aad7fc1539b396c1f91d
F src/sqliteInt.h f03de87717569619884830b1833eca2b257fc675
F src/vdbe.c f665f4c1dcee0665f26b88b9e7ede74c4ab9edd5
F src/vdbe.h 3957844e46fea71fd030e78f6a3bd2f7e320fb43
F src/vdbeInt.h 8a3baf749115cba81a810b7a52208aef055eda7b
-F src/vdbeaux.c c55d87d6658487e87ef09ca80c1aa2f314024fed
+F src/vdbeaux.c 7c83db889c336596f48defebdec4270ce3990847
F src/where.c 1302d728bd338c237e6a8282e4e3eadbbdf11e45
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
-F test/attach.test c26848402e7ac829e043e1fa5e0eb87032e5d81d
-F test/attach2.test b1baa766fe5bf82d9a58dbbcf3d4549274190f7d
+F test/attach.test 09ff5eec8e7103909beae14dbb1d97c01d64bfa4
+F test/attach2.test ce61e6185b3cd891cc0e9a4c868fcc65eb92fc55
F test/auth.test 5c4d95cdaf539c0c236e20ce1f71a93e7dde9185
F test/bigfile.test ea904b853ce2d703b16c5ce90e2b54951bc1ae81
F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578
F test/index.test 9295deefbdb6dedbe01be8905f0c448fe5bd4079
F test/insert.test a17b7f7017097afb2727aa5b67ceeb7ab0a120a1
F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
-F test/interrupt.test 09926d4d851864c99390545bd498348a1bf509e9
+F test/interrupt.test 5d4308fc33405abf305d52ddaa571a207768a911
F test/intpkey.test 9320af48415c594afd4e15f8ef0daa272e05502e
F test/ioerr.test 5dbaf09f96b56ee01cf3edd762b96eb4ad2c9ca4
F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 300c5543dc83c6b7eacb0c81ed06f95004c0f6d8
-R 6e5176bc612d6cf5beab95037a0e3778
+P 2fe9f5101cb0f743532912ece3d37f6c873e7025
+R 6c2fc2ff1652d69a19fddf002bab9e52
U drh
-Z d702251833e256e19bf4070671ed3290
+Z cb56b1ce256967725fed5e041788204c
-2fe9f5101cb0f743532912ece3d37f6c873e7025
\ No newline at end of file
+12c7a83f8e4055c4590983ef212648c781ebd963
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree_rb.c,v 1.22 2004/02/11 02:18:06 drh Exp $
+** $Id: btree_rb.c,v 1.23 2004/02/12 15:31:21 drh Exp $
**
** This file implements an in-core database using Red-Black balanced
** binary trees.
pCur = *ppCur = sqliteMalloc(sizeof(RbtCursor));
if( sqlite_malloc_failed ) return SQLITE_NOMEM;
pCur->pTree = sqliteHashFind(&tree->tblHash, 0, iTable);
+ assert( pCur->pTree );
pCur->pRbtree = tree;
pCur->iTree = iTable;
pCur->pOps = &sqliteRbtreeCursorOps;
pCur->wrFlag = wrFlag;
pCur->pShared = pCur->pTree->pCursors;
pCur->pTree->pCursors = pCur;
-
assert( (*ppCur)->pTree );
return SQLITE_OK;
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.147 2004/02/10 02:27:04 drh Exp $
+** $Id: main.c,v 1.148 2004/02/12 15:31:21 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
if( DbHasProperty(db, i, DB_SchemaLoaded) ) continue;
assert( i!=1 ); /* Should have been initialized together with 0 */
rc = sqliteInitOne(db, i, pzErrMsg);
+ if( rc ){
+ sqliteResetInternalSchema(db, i);
+ }
}
if( rc==SQLITE_OK ){
db->flags |= SQLITE_Initialized;
sqliteSetString(pzErrMsg,
"unable to upgrade database to the version 2.6 format",
zErr ? ": " : 0, zErr, (char*)0);
- sqliteStrRealloc(pzErrMsg);
}
sqlite_freemem(zErr);
}
db->aDb[i].inTrans = 0;
}
}
- sqliteRollbackInternalChanges(db);
+ sqliteResetInternalSchema(db, 0);
+ /* sqliteRollbackInternalChanges(db); */
}
/*
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.151 2004/02/09 14:37:50 drh Exp $
+** $Id: select.c,v 1.152 2004/02/12 15:31:21 drh Exp $
*/
#include "sqliteInt.h"
}
}
sqliteVdbeAddOp(v, OP_ColumnName, i + pEList->nExpr, 0);
- sqliteVdbeChangeP3(v, -1, zType, P3_STATIC);
+ sqliteVdbeChangeP3(v, -1, zType, 0);
}
}
}
Cleanup(p);
if( p->rc!=SQLITE_OK ){
+ int saved_flags;
switch( p->errorAction ){
case OE_Abort: {
if( !p->undoTransOnError ){
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
-# $Id: attach.test,v 1.11 2003/07/18 01:25:35 drh Exp $
+# $Id: attach.test,v 1.12 2004/02/12 15:31:22 drh Exp $
#
set testdir [file dirname $argv0]
catchsql {UPDATE t2 SET x=x+1 WHERE x=50}
} {1 {database is locked}}
do_test attach-3.14 {
- # the "database is locked" error on the previous test should have
- # caused a rollback.
+ # Unable to reinitialize the schema tables because the aux database
+ # is still locked.
+ catchsql {SELECT * FROM t1}
+} {1 {database is locked}}
+do_test attach-3.15 {
+ execsql COMMIT db2
execsql {SELECT * FROM t1}
} {1 2 3 4}
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
-# $Id: attach2.test,v 1.4 2004/01/20 11:54:03 drh Exp $
+# $Id: attach2.test,v 1.5 2004/02/12 15:31:22 drh Exp $
#
do_test attach2-2.11 {
# when the write failed in the previous test, the transaction should
# have rolled back.
+ db2 eval ROLLBACK
execsql {
SELECT * FROM t1
}
#
do_test attach2-3.1 {
db close
- db2 eval ROLLBACK
set DB [sqlite db test.db]
set rc [catch {sqlite_compile $DB "ATTACH 'test2.db' AS t2" TAIL} VM]
if {$rc} {lappend rc $VM}
# This file implements regression tests for SQLite library. The
# focus of this script is the sqlite_interrupt() API.
#
-# $Id: interrupt.test,v 1.1 2004/02/12 13:02:57 drh Exp $
+# $Id: interrupt.test,v 1.2 2004/02/12 15:31:22 drh Exp $
set testdir [file dirname $argv0]
} 1
integrity_check interrupt-2.5
+# Ticket #594. If an interrupt occurs in the middle of a transaction
+# and that transaction is later rolled back, the internal schema tables do
+# not reset.
+#
+for {set i 1} {$i<50} {incr i 5} {
+ do_test interrupt-3.$i.1 {
+ execsql {
+ BEGIN;
+ CREATE TEMP TABLE t2(x,y);
+ SELECT name FROM sqlite_temp_master;
+ }
+ } {t2}
+ do_test interrupt-3.$i.2 {
+ set ::sqlite_interrupt_count $::i
+ catchsql {
+ INSERT INTO t2 SELECT * FROM t1;
+ }
+ } {1 interrupted}
+ do_test interrupt-3.$i.3 {
+ execsql {
+ SELECT name FROM sqlite_temp_master;
+ }
+ } {t2}
+ do_test interrupt-3.$i.4 {
+ catchsql {
+ ROLLBACK
+ }
+ } {0 {}}
+ do_test interrupt-3.$i.5 {
+ catchsql {SELECT name FROM sqlite_temp_master};
+ execsql {
+ SELECT name FROM sqlite_temp_master;
+ }
+ } {}
+}
finish_test