diff options
author | drh <drh@noemail.net> | 2001-09-23 02:35:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2001-09-23 02:35:53 +0000 |
commit | ecdc7530dda7a793c96df4010313792de4a6390c (patch) | |
tree | eaef12ba2ead1e93fd05f62f34ba7cb0f0cf39cc /src/test3.c | |
parent | beae319476c5d81e8f399010dc7dc5a2336f0606 (diff) | |
download | sqlite-ecdc7530dda7a793c96df4010313792de4a6390c.tar.gz sqlite-ecdc7530dda7a793c96df4010313792de4a6390c.zip |
Fixes to the locking and rollback behavior. (CVS 261)
FossilOrigin-Name: 337b3d3b2a903328d9744c111979909a284b8348
Diffstat (limited to 'src/test3.c')
-rw-r--r-- | src/test3.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test3.c b/src/test3.c index 9dd084105..978631159 100644 --- a/src/test3.c +++ b/src/test3.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test3.c,v 1.11 2001/09/16 00:13:27 drh Exp $ +** $Id: test3.c,v 1.12 2001/09/23 02:35:53 drh Exp $ */ #include "sqliteInt.h" #include "pager.h" @@ -499,7 +499,7 @@ static int btree_sanity_check( } /* -** Usage: btree_cursor ID TABLENUM +** Usage: btree_cursor ID TABLENUM WRITEABLE ** ** Create a new cursor. Return the ID for the cursor. */ @@ -513,16 +513,18 @@ static int btree_cursor( int iTable; BtCursor *pCur; int rc; + int wrFlag; char zBuf[30]; - if( argc!=3 ){ + if( argc!=4 ){ Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], - " ID TABLENUM\"", 0); + " ID TABLENUM WRITEABLE\"", 0); return TCL_ERROR; } if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR; if( Tcl_GetInt(interp, argv[2], &iTable) ) return TCL_ERROR; - rc = sqliteBtreeCursor(pBt, iTable, &pCur); + if( Tcl_GetBoolean(interp, argv[3], &wrFlag) ) return TCL_ERROR; + rc = sqliteBtreeCursor(pBt, iTable, wrFlag, &pCur); if( rc ){ Tcl_AppendResult(interp, errorName(rc), 0); return TCL_ERROR; |