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 if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test]
18 source $testdir/tester.tcl
22 CREATE TABLE t1(x, y PRIMARY KEY, z);
23 INSERT INTO t1 VALUES(NULL, 1, 'one');
24 INSERT INTO t1 VALUES(NULL, 2, 'two');
25 INSERT INTO t1 VALUES(NULL, 3, 'three');
26 CREATE INDEX i1z ON t1(z, x);
33 CREATE TABLE data_t1(x, y, z, rbu_control);
34 INSERT INTO data_t1 VALUES('a', 1, '_i' , 'x.d');
35 INSERT INTO data_t1 VALUES('b', 2, 2 , '..x');
36 INSERT INTO data_t1 VALUES('_iii', 3, '-III' , 'd.d');
42 sqlite3rbu rbu test.db rbu.db
46 list [catch {rbu close} msg] $msg
47 } {1 {SQLITE_ERROR - no such function: rbu_delta}}
49 proc rbu_delta {orig new} {
50 return "${orig}${new}"
55 sqlite3rbu rbu test.db rbu.db
58 if {$rc != "SQLITE_OK"} break
64 do_execsql_test 1.3.2 {