2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A** The author disclaims copyright to this source code. In place of 2N/A** a legal notice, here is a blessing: 2N/A** May you do good and not evil. 2N/A** May you find forgiveness for yourself and forgive others. 2N/A** May you share freely, never taking more than you give. 2N/A************************************************************************* 2N/A** Code for testing the btree.c module in SQLite. This code 2N/A** is not included in the SQLite library. It is used for automated 2N/A** testing of the SQLite library. 2N/A** $Id: test3.c,v 1.23 2003/04/13 18:26:52 paul Exp $ 2N/A** Interpret an SQLite error number 2N/A default:
zName =
"SQLITE_Unknown";
break;
2N/A** Usage: btree_open FILENAME 2N/A** Open a new database 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_close ID 2N/A** Close the given database. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_begin_transaction ID 2N/A** Start a new transaction 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_rollback ID 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_commit ID 2N/A** Commit all changes 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_create_table ID 2N/A** Create a new table in the database 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_drop_table ID TABLENUM 2N/A** Delete an entire table from the database 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID TABLENUM\"", 0);
2N/A** Usage: btree_clear_table ID TABLENUM 2N/A** Remove all entries from the given table but keep the table around. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID TABLENUM\"", 0);
2N/A** Usage: btree_get_meta ID 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_update_meta ID METADATA... 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID METADATA...\" (METADATA is ",
zBuf,
" integers)", 0);
2N/A** Usage: btree_page_dump ID PAGENUM 2N/A** Print a disassembly of a page on standard output 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_tree_dump ID PAGENUM 2N/A** Print a disassembly of a page and all its child pages on standard output 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_pager_stats ID 2N/A** Returns pager statistics 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A "ref",
"page",
"max",
"size",
"state",
"err",
2N/A "hit",
"miss",
"ovfl",
2N/A** Usage: btree_pager_ref_dump ID 2N/A** Print out all outstanding pages. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_integrity_check ID ROOT ... 2N/A** Look through every page of the given BTree file to verify correct 2N/A** formatting and linkage. Return a line of text for each problem found. 2N/A** Return an empty string if everything worked. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID ROOT ...\"", 0);
2N/A** Usage: btree_cursor ID TABLENUM WRITEABLE 2N/A** Create a new cursor. Return the ID for the cursor. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID TABLENUM WRITEABLE\"", 0);
2N/A** Usage: btree_close_cursor ID 2N/A** Close a cursor opened using btree_cursor. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_move_to ID KEY 2N/A** Move the cursor to the entry with the given key. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_delete ID 2N/A** Delete the entry that the cursor is pointing to 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_insert ID KEY DATA 2N/A** Create a new entry with the given key and data. If an entry already 2N/A** exists with the same key the old entry is overwritten. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A " ID KEY DATA\"", 0);
2N/A** Usage: btree_next ID 2N/A** Move the cursor to the next entry in the table. Return 0 on success 2N/A** or 1 if the cursor was already on the last entry in the table or if 2N/A** the table is empty. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_prev ID 2N/A** Move the cursor to the previous entry in the table. Return 0 on 2N/A** success and 1 if the cursor was already on the first entry in 2N/A** the table or if the table was empty. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_first ID 2N/A** Move the cursor to the first entry in the table. Return 0 if the 2N/A** cursor was left point to something and 1 if the table is empty. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_last ID 2N/A** Move the cursor to the last entry in the table. Return 0 if the 2N/A** cursor was left point to something and 1 if the table is empty. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_key ID 2N/A** Return the key for the entry at which the cursor is pointing. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_data ID 2N/A** Return the data for the entry at which the cursor is pointing. 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_payload_size ID 2N/A** Return the number of bytes of payload 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Usage: btree_cursor_dump ID 2N/A** Return eight integers containing information about the entry the 2N/A** cursor is pointing to: 2N/A** aResult[0] = The page number 2N/A** aResult[1] = The entry number 2N/A** aResult[2] = Total number of entries on this page 2N/A** aResult[3] = Size of this entry 2N/A** aResult[4] = Number of free bytes on this page 2N/A** aResult[5] = Number of free blocks on the page 2N/A** aResult[6] = Page number of the left child of this entry 2N/A** aResult[7] = Page number of the right child for the whole page 2N/A int argc,
/* Number of arguments */ 2N/A const char **
argv /* Text of each argument */ 2N/A** Register commands with the TCL interpreter.