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 # $Id: vtab_err.test,v 1.8 2007/09/03 16:12:10 drh Exp $
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
24 unset -nocomplain echo_module_begin_fail
25 do_ioerr_test vtab_err-1 -tclprep {
26 register_echo_module [sqlite3_connection_pointer db]
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');
34 DELETE FROM e WHERE a = 'a';
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;
44 puts "Skipping vtab_err-2 tests: not compiled with -DSQLITE_MEMDEBUG..."
48 source $testdir/malloc_common.tcl
51 do_malloc_test vtab_err-2 -tclprep {
52 register_echo_module [sqlite3_connection_pointer db]
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');
60 DELETE FROM e WHERE a = 'a';
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;
69 sqlite3_memdebug_fail -1