aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-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_err.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test71
1 files changed, 71 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test b/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test
new file mode 100644
index 0000000..068386e
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/vtab_err.test
@@ -0,0 +1,71 @@
1# 2006 June 10
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#
12# $Id: vtab_err.test,v 1.8 2007/09/03 16:12:10 drh Exp $
13
14set testdir [file dirname $argv0]
15source $testdir/tester.tcl
16
17ifcapable !vtab {
18 finish_test
19 return
20}
21
22
23
24unset -nocomplain echo_module_begin_fail
25do_ioerr_test vtab_err-1 -tclprep {
26 register_echo_module [sqlite3_connection_pointer db]
27} -sqlbody {
28 BEGIN;
29 CREATE TABLE r(a PRIMARY KEY, b, c);
30 CREATE VIRTUAL TABLE e USING echo(r);
31 INSERT INTO e VALUES(1, 2, 3);
32 INSERT INTO e VALUES('a', 'b', 'c');
33 UPDATE e SET c = 10;
34 DELETE FROM e WHERE a = 'a';
35 COMMIT;
36 BEGIN;
37 CREATE TABLE r2(a, b, c);
38 INSERT INTO r2 SELECT * FROM e;
39 INSERT INTO e SELECT a||'x', b, c FROM r2;
40 COMMIT;
41}
42
43ifcapable !memdebug {
44 puts "Skipping vtab_err-2 tests: not compiled with -DSQLITE_MEMDEBUG..."
45 finish_test
46 return
47}
48source $testdir/malloc_common.tcl
49
50
51do_malloc_test vtab_err-2 -tclprep {
52 register_echo_module [sqlite3_connection_pointer db]
53} -sqlbody {
54 BEGIN;
55 CREATE TABLE r(a PRIMARY KEY, b, c);
56 CREATE VIRTUAL TABLE e USING echo(r);
57 INSERT INTO e VALUES(1, 2, 3);
58 INSERT INTO e VALUES('a', 'b', 'c');
59 UPDATE e SET c = 10;
60 DELETE FROM e WHERE a = 'a';
61 COMMIT;
62 BEGIN;
63 CREATE TABLE r2(a, b, c);
64 INSERT INTO r2 SELECT * FROM e;
65 INSERT INTO e SELECT a||'x', b, c FROM r2;
66 COMMIT;
67}
68
69sqlite3_memdebug_fail -1
70
71finish_test