mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add speed3.test file. For testing performance issues related to overflow pages. (CVS 4020)
FossilOrigin-Name: 684f765df3e8a4836f254717d175a4a7b5e7d15f
This commit is contained in:
13
src/test3.c
13
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.74 2007/05/02 01:34:32 drh Exp $
|
||||
** $Id: test3.c,v 1.75 2007/05/17 14:45:13 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "pager.h"
|
||||
@@ -1425,10 +1425,11 @@ static int btree_from_db(
|
||||
Tcl_CmdInfo info;
|
||||
sqlite3 *db;
|
||||
Btree *pBt;
|
||||
int iDb = 0;
|
||||
|
||||
if( argc!=2 ){
|
||||
if( argc!=2 && argc!=3 ){
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
|
||||
" DB-HANDLE\"", 0);
|
||||
" DB-HANDLE ?N?\"", 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -1436,10 +1437,14 @@ static int btree_from_db(
|
||||
Tcl_AppendResult(interp, "No such db-handle: \"", argv[1], "\"", 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if( argc==3 ){
|
||||
iDb = atoi(argv[2]);
|
||||
}
|
||||
|
||||
db = *((sqlite3 **)info.objClientData);
|
||||
assert( db );
|
||||
|
||||
pBt = db->aDb[0].pBt;
|
||||
pBt = db->aDb[iDb].pBt;
|
||||
sqlite3_snprintf(sizeof(zBuf), zBuf, "%p", pBt);
|
||||
Tcl_SetResult(interp, zBuf, TCL_VOLATILE);
|
||||
return TCL_OK;
|
||||
|
Reference in New Issue
Block a user