mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Add "backup" and "restore" methods to the TCL interfaces and test cases
to exercise those methods. (CVS 6260) FossilOrigin-Name: e420a3cedc7ee086a77cd719f6b9fb85415eb5f3
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements some common TCL routines used for regression
|
||||
# testing the SQLite library
|
||||
#
|
||||
# $Id: tester.tcl,v 1.137 2009/02/03 16:51:25 danielk1977 Exp $
|
||||
# $Id: tester.tcl,v 1.138 2009/02/04 22:46:47 drh Exp $
|
||||
|
||||
#
|
||||
# What for user input before continuing. This gives an opportunity
|
||||
@ -869,6 +869,24 @@ proc allcksum {{db db}} {
|
||||
return [md5 $txt]
|
||||
}
|
||||
|
||||
# Generate a checksum based on the contents of a single database with
|
||||
# a database connection. The name of the database is $dbname.
|
||||
# Examples of $dbname are "temp" or "main".
|
||||
#
|
||||
proc dbcksum {db dbname} {
|
||||
if {$dbname=="temp"} {
|
||||
set master sqlite_temp_master
|
||||
} else {
|
||||
set master $dbname.sqlite_master
|
||||
}
|
||||
set alltab [$db eval "SELECT name FROM $master WHERE type='table'"]
|
||||
set txt [$db eval "SELECT * FROM $master"]\n
|
||||
foreach tab $alltab {
|
||||
append txt [$db eval "SELECT * FROM $dbname.$tab"]\n
|
||||
}
|
||||
return [md5 $txt]
|
||||
}
|
||||
|
||||
proc memdebug_log_sql {{filename mallocs.sql}} {
|
||||
|
||||
set data [sqlite3_memdebug_log dump]
|
||||
|
Reference in New Issue
Block a user