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 #***********************************************************************
11 # This file implements regression tests for SQLite library.
13 # The focus of this file making sure the register cache logic works
14 # correctly with virtual tables. Ticket [16fbf14cb2].
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
25 register_tclvar_module [sqlite3_connection_pointer db]
27 unset -nocomplain vtabE
30 unset -nocomplain vtabE1
33 unset -nocomplain vtabE2
39 CREATE VIRTUAL TABLE t1 USING tclvar;
40 CREATE VIRTUAL TABLE t2 USING tclvar;
41 CREATE TABLE t3(a INTEGER PRIMARY KEY, b);
42 SELECT t1.name, t1.arrayname, t1.value,
43 t2.name, t2.arrayname, t2.value,
44 abs(t3.b + abs(t2.value + abs(t1.value)))
45 FROM t1 LEFT JOIN t2 ON t2.name = t1.arrayname
46 LEFT JOIN t3 ON t3.a=t2.value
47 WHERE t1.name = 'vtabE'
48 ORDER BY t1.value, t2.value;
50 } {vtabE vtabE1 11 vtabE1 w x {} vtabE vtabE1 11 vtabE1 y z {} vtabE vtabE2 22 vtabE2 a b {} vtabE vtabE2 22 vtabE2 c d {}}