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 #***********************************************************************
12 # Test the rbu_delta() feature.
15 source [file join [file dirname [info script]] rbu_common.tcl]
16 if_no_rbu_support { finish_test ; return }
20 CREATE TABLE t1(x, y PRIMARY KEY, z);
21 INSERT INTO t1 VALUES(NULL, 1, 'one');
22 INSERT INTO t1 VALUES(NULL, 2, 'two');
23 INSERT INTO t1 VALUES(NULL, 3, 'three');
24 CREATE INDEX i1z ON t1(z, x);
31 CREATE TABLE data_t1(x, y, z, rbu_control);
32 INSERT INTO data_t1 VALUES('a', 1, '_i' , 'x.d');
33 INSERT INTO data_t1 VALUES('b', 2, 2 , '..x');
34 INSERT INTO data_t1 VALUES('_iii', 3, '-III' , 'd.d');
40 sqlite3rbu rbu test.db rbu.db
44 list [catch {rbu close} msg] $msg
45 } {1 {SQLITE_ERROR - no such function: rbu_delta}}
47 proc rbu_delta {orig new} {
48 return "${orig}${new}"
53 sqlite3rbu rbu test.db rbu.db
56 if {$rc != "SQLITE_OK"} break
62 do_execsql_test 1.3.2 {