mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-24 09:53:10 +03:00
Preparing for the 2.4.0 release. (CVS 426)
FossilOrigin-Name: 9f5b241cb2fc89f66d3762b4b4978b8e114caf53
This commit is contained in:
20
src/test1.c
20
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"
|
||||
@@ -324,6 +324,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.
|
||||
*/
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user