OLD | NEW |
1 # 2009 October 16 | 1 # 2009 October 16 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 20 matching lines...) Expand all Loading... |
31 CREATE TEMP TABLE t3(w, z); | 31 CREATE TEMP TABLE t3(w, z); |
32 } | 32 } |
33 } {} | 33 } {} |
34 | 34 |
35 proc force_rollback {} { | 35 proc force_rollback {} { |
36 catch {db eval {INSERT OR ROLLBACK INTO t1 VALUES(1)}} | 36 catch {db eval {INSERT OR ROLLBACK INTO t1 VALUES(1)}} |
37 } | 37 } |
38 db function force_rollback force_rollback | 38 db function force_rollback force_rollback |
39 | 39 |
40 do_test tkt-f7772-1.2 { | 40 do_test tkt-f7772-1.2 { |
41 breakpoint | |
42 catchsql { | 41 catchsql { |
43 BEGIN IMMEDIATE; | 42 BEGIN IMMEDIATE; |
44 CREATE TABLE xyzzy(abc); | 43 CREATE TABLE xyzzy(abc); |
45 SELECT x, force_rollback(), EXISTS(SELECT 1 FROM t3 WHERE w=x) FROM t2; | 44 SELECT x, force_rollback(), EXISTS(SELECT 1 FROM t3 WHERE w=x) FROM t2; |
46 } | 45 } |
47 } {1 {abort due to ROLLBACK}} | 46 } {1 {abort due to ROLLBACK}} |
48 do_test tkt-f7772-1.3 { | 47 do_test tkt-f7772-1.3 { |
49 sqlite3_get_autocommit db | 48 sqlite3_get_autocommit db |
50 } {1} | 49 } {1} |
51 | 50 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 do_test tkt-f7772-3.2 { | 96 do_test tkt-f7772-3.2 { |
98 execsql { | 97 execsql { |
99 SELECT ins() AS x FROM t2 UNION ALL SELECT ins() AS x FROM t1 | 98 SELECT ins() AS x FROM t2 UNION ALL SELECT ins() AS x FROM t1 |
100 } | 99 } |
101 } {{} {} {} {}} | 100 } {{} {} {} {}} |
102 do_test tkt-f7772-3.3 { | 101 do_test tkt-f7772-3.3 { |
103 execsql { SELECT * FROM t3 } | 102 execsql { SELECT * FROM t3 } |
104 } {hello hello hello hello} | 103 } {hello hello hello hello} |
105 | 104 |
106 finish_test | 105 finish_test |
OLD | NEW |