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 set ::testprefix rburename
19 CREATE TABLE t1(a, b);
20 INSERT INTO t1 VALUES(1, 2);
21 INSERT INTO t1 VALUES(3, 4);
22 INSERT INTO t1 VALUES(5, 6);
25 forcedelete test.db-vacuum
27 proc my_rename {old new} {
28 lappend ::my_rename_calls [list [file tail $old] [file tail $new]]
33 sqlite3rbu_vacuum rbu test.db
34 rbu rename_handler my_rename
35 while {[rbu step]=="SQLITE_OK"} {}
41 } {{test.db-oal test.db-wal}}
43 proc my_rename {old new} {
44 error "something went wrong"
48 sqlite3rbu_vacuum rbu test.db
49 rbu rename_handler my_rename
50 while {[rbu step]=="SQLITE_OK"} {}
51 list [catch { rbu close } msg] $msg