-C Fix\sa\smemory\sleak\sin\sDETACH\swhen\susing\sthe\scodec.\s(CVS\s1317)
-D 2004-05-07T01:46:01
+C Improvements\sto\stesting\sof\ssqlite_interrupt.\s\sMore\schecking\sfor\sinterrupt\ninside\sof\sVACUUM.\s(CVS\s1344)
+D 2004-05-10T20:27:41
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/trigger.c a9927b57c865b6f3df3fb5e40c9824d722660ded
F src/update.c bd391079138e67d09c9af34528ca4137c29242d1
F src/util.c 122bc174f6c8c2eb6a9127d9f13c4c74f83b85e4
-F src/vacuum.c a4e8464c9f6d60659c5343e9d62c742463227820
-F src/vdbe.c f006200348ef3feded56bef8714e052da74a885a
+F src/vacuum.c d34374a2d6d5b3d36419a7b87e0a15d2bf31fdd3
+F src/vdbe.c 0853ab9983b7adbba8c012bb8b152d8453bf8a97
F src/vdbe.h ac987945e4dd6f987bca534c6005899f089fc270
F src/vdbeInt.h b40ff02ce39fd076e6ff3369e19c1bbfe1986682
F src/vdbeaux.c e2cdd1ab63604a390612c73e26bdd2ef910e9438
F test/index.test 9295deefbdb6dedbe01be8905f0c448fe5bd4079
F test/insert.test a17b7f7017097afb2727aa5b67ceeb7ab0a120a1
F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
-F test/interrupt.test 9142ce4448605127640eda5e283952f75f67ed91
+F test/interrupt.test 0d50985f1aa6c39fe2cca4cf4a272c79ff1648e8
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 c90ed20dc4f95eb06a5259578597593f5968bfb7
-R d8249d1567d218e36b49e8c43150a27b
+P c4bd99b79c66217140781309ed06e1ff3ef4a206
+R c633b9f2c50e2f0204a65c82493f0a7e
U drh
-Z 024ab278400ed22150e07d78741f9bbc
+Z bb900cf181dd7b4856d93e8f07ef13c0
-c4bd99b79c66217140781309ed06e1ff3ef4a206
\ No newline at end of file
+d596f513c3acfe0d297dc3f5c66f4b0ea2d12a34
\ No newline at end of file
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
-** $Id: vacuum.c,v 1.13 2004/03/10 18:57:32 drh Exp $
+** $Id: vacuum.c,v 1.13.2.1 2004/05/10 20:27:41 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
(char*)0);
return SQLITE_ERROR;
}
+ if( db->flags & SQLITE_Interrupt ){
+ return SQLITE_INTERRUPT;
+ }
memset(&sVac, 0, sizeof(sVac));
/* Get the full pathname of the database file and create two
zErrMsg, (char*)0);
}
sqlite_exec(db, "ROLLBACK", 0, 0, 0);
+ if( (dbNew && (dbNew->flags & SQLITE_Interrupt))
+ || (db->flags & SQLITE_Interrupt) ){
+ rc = SQLITE_INTERRUPT;
+ }
if( dbNew ) sqlite_close(dbNew);
sqliteOsDelete(zTemp);
sqliteFree(zTemp);
sqliteFree(sVac.s1.z);
sqliteFree(sVac.s2.z);
if( zErrMsg ) sqlite_freemem(zErrMsg);
- if( rc==SQLITE_ABORT ) sVac.rc = SQLITE_ERROR;
+ if( rc==SQLITE_ABORT && sVac.rc==SQLITE_OK ) sVac.rc = SQLITE_ERROR;
return sVac.rc;
#endif
}
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.268.2.1 2004/04/29 16:16:30 drh Exp $
+** $Id: vdbe.c,v 1.268.2.2 2004/05/10 20:27:41 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
/*
** When this global variable is positive, it gets decremented once before
** each instruction in the VDBE. When reaches zero, the SQLITE_Interrupt
-** of the db.flags field is set in order to simulate and interrupt.
+** of the db.flags field is set in order to simulate an interrupt.
**
** This facility is used for testing purposes only. It does not function
** in an ordinary build.
/* If we reach this point, it means that execution is finished.
*/
vdbe_halt:
+ CHECK_FOR_INTERRUPT
if( rc ){
p->rc = rc;
rc = SQLITE_ERROR;
# This file implements regression tests for SQLite library. The
# focus of this script is the sqlite_interrupt() API.
#
-# $Id: interrupt.test,v 1.4 2004/02/18 16:57:23 drh Exp $
+# $Id: interrupt.test,v 1.4.2.1 2004/05/10 20:27:42 drh Exp $
set testdir [file dirname $argv0]
# and checks to make sure SQLITE_INTERRUPT is returned. Eventually,
# the routine completes successfully.
#
-proc interrupt_test {testid sql result {initcnt 0}} {
+proc interrupt_test {testid sql result {initcnt 0} {maxcnt 1000000}} {
set orig_sum [cksum]
set i $initcnt
- while 1 {
+ global sqlite_interrupt_count
+ while {$i<$maxcnt} {
incr i
- set ::sqlite_interrupt_count $i
+ set sqlite_interrupt_count $i
do_test $testid.$i.1 [format {
set ::r [catchsql %s]
set ::code [db errorcode]
do_test $testid.$i.2 {
cksum
} $orig_sum
- } else {
+ } elseif {$sqlite_interrupt_count>0} {
do_test $testid.$i.99 {
set ::r
} [list 0 $result]
break
}
}
- set ::sqlite_interrupt_count 0
+ set sqlite_interrupt_count 0
}
do_test interrupt-1.1 {
SELECT name FROM sqlite_master;
}
} {t1}
-interrupt_test interrupt-1.2 {DROP TABLE t1} {}
+interrupt_test interrupt-1.2 {DROP TABLE t1} {} 1 14
do_test interrupt-1.3 {
execsql {
SELECT name FROM sqlite_master;
} {1 interrupted}
}
+
finish_test