diff options
author | dan miller | 2007-10-20 02:49:29 +0000 |
---|---|---|
committer | dan miller | 2007-10-20 02:49:29 +0000 |
commit | e36d23a85ebff914d74bb541558c2b6082b78edb (patch) | |
tree | 54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test | |
parent | * Fixed an issue whereby avatar chat distances were being calculated against ... (diff) | |
download | opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2 opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz |
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test b/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test new file mode 100644 index 0000000..04ba1ec --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_shared.test | |||
@@ -0,0 +1,62 @@ | |||
1 | # 2007 April 16 | ||
2 | # | ||
3 | # The author disclaims copyright to this source code. In place of | ||
4 | # a legal notice, here is a blessing: | ||
5 | # | ||
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. | ||
9 | # | ||
10 | #*********************************************************************** | ||
11 | # This file tests interactions between the virtual table and | ||
12 | # shared-schema functionality. | ||
13 | # | ||
14 | # $Id: vtab_shared.test,v 1.1 2007/04/16 15:49:42 danielk1977 Exp $ | ||
15 | |||
16 | set testdir [file dirname $argv0] | ||
17 | source $testdir/tester.tcl | ||
18 | |||
19 | ifcapable !vtab||!shared_cache { | ||
20 | finish_test | ||
21 | return | ||
22 | } | ||
23 | |||
24 | db close | ||
25 | sqlite3_enable_shared_cache 1 | ||
26 | sqlite3 db test.db | ||
27 | |||
28 | do_test vtab_shared-1.0 { | ||
29 | register_echo_module [sqlite3_connection_pointer db] | ||
30 | catchsql { | ||
31 | CREATE TABLE t0(a, b, c); | ||
32 | CREATE VIRTUAL TABLE t1 USING echo(t0); | ||
33 | } | ||
34 | } {1 {Cannot use virtual tables in shared-cache mode}} | ||
35 | |||
36 | db close | ||
37 | sqlite3_enable_shared_cache 0 | ||
38 | sqlite3 db test.db | ||
39 | |||
40 | do_test vtab_shared-1.1 { | ||
41 | register_echo_module [sqlite3_connection_pointer db] | ||
42 | catchsql { | ||
43 | CREATE VIRTUAL TABLE t1 USING echo(t0); | ||
44 | } | ||
45 | } {0 {}} | ||
46 | |||
47 | db close | ||
48 | sqlite3_enable_shared_cache 1 | ||
49 | sqlite3 db test.db | ||
50 | |||
51 | do_test vtab_shared-1.2 { | ||
52 | register_echo_module [sqlite3_connection_pointer db] | ||
53 | catchsql { | ||
54 | SELECT * FROM t1; | ||
55 | } | ||
56 | } [list 1 \ | ||
57 | {malformed database schema - Cannot use virtual tables in shared-cache mode}] | ||
58 | |||
59 | db close | ||
60 | sqlite3_enable_shared_cache 0 | ||
61 | finish_test | ||
62 | |||