3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
14 source [file join [file dirname [info script]] rbu_common.tcl]
15 if_no_rbu_support { finish_test ; return }
16 set ::testprefix rburename
20 CREATE TABLE t1(a, b);
21 INSERT INTO t1 VALUES(1, 2);
22 INSERT INTO t1 VALUES(3, 4);
23 INSERT INTO t1 VALUES(5, 6);
26 forcedelete test.db-vacuum
28 proc my_rename {old new} {
29 lappend ::my_rename_calls [list [file tail $old] [file tail $new]]
34 sqlite3rbu_vacuum rbu test.db
35 rbu rename_handler my_rename
36 while {[rbu step]=="SQLITE_OK"} {}
42 } {{test.db-oal test.db-wal}}
44 proc my_rename {old new} {
45 error "something went wrong"
49 sqlite3rbu_vacuum rbu test.db
50 rbu rename_handler my_rename
51 while {[rbu step]=="SQLITE_OK"} {}
52 list [catch { rbu close } msg] $msg