diff options
Diffstat (limited to 'src/test1.c')
-rw-r--r-- | src/test1.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/test1.c b/src/test1.c index 0ca93fe06..217d1f9d9 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.6 2002/01/16 21:00:27 drh Exp $ +** $Id: test1.c,v 1.7 2002/03/11 02:06:13 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -325,6 +325,23 @@ static int sqlite_malloc_stat( #endif /* +** Usage: sqlite_abort +** +** Shutdown the process immediately. This is not a clean shutdown. +** This command is used to test the recoverability of a database in +** the event of a program crash. +*/ +static int sqlite_abort( + void *NotUsed, + Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ + int argc, /* Number of arguments */ + char **argv /* Text of each argument */ +){ + assert( interp==0 ); /* This will always fail */ + return TCL_OK; +} + +/* ** Register commands with the TCL interpreter. */ int Sqlitetest1_Init(Tcl_Interp *interp){ @@ -344,5 +361,6 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ Tcl_CreateCommand(interp, "sqlite_malloc_fail", sqlite_malloc_fail, 0, 0); Tcl_CreateCommand(interp, "sqlite_malloc_stat", sqlite_malloc_stat, 0, 0); #endif + Tcl_CreateCommand(interp, "sqlite_abort", sqlite_abort, 0, 0); return TCL_OK; } |