OLD | NEW |
1 # 2008 October 27 | 1 # 2008 October 27 |
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 12 matching lines...) Expand all Loading... |
23 if {[catch {db auth {}} msg]} { | 23 if {[catch {db auth {}} msg]} { |
24 finish_test | 24 finish_test |
25 return | 25 return |
26 } | 26 } |
27 | 27 |
28 # Disable the statement cache for these tests. | 28 # Disable the statement cache for these tests. |
29 # | 29 # |
30 db cache size 0 | 30 db cache size 0 |
31 | 31 |
32 db authorizer ::auth | 32 db authorizer ::auth |
33 proc auth {code arg1 arg2 arg3 arg4} { | 33 proc auth {code arg1 arg2 arg3 arg4 args} { |
34 if {$code=="SQLITE_DELETE"} { | 34 if {$code=="SQLITE_DELETE"} { |
35 return $::authcode | 35 return $::authcode |
36 } | 36 } |
37 return SQLITE_OK | 37 return SQLITE_OK |
38 } | 38 } |
39 | 39 |
40 #-------------------------------------------------------------------------- | 40 #-------------------------------------------------------------------------- |
41 # The following tests - auth3-1.* - test that return values of SQLITE_DENY, | 41 # The following tests - auth3-1.* - test that return values of SQLITE_DENY, |
42 # SQLITE_IGNORE, SQLITE_OK and <invalid> are correctly handled when returned | 42 # SQLITE_IGNORE, SQLITE_OK and <invalid> are correctly handled when returned |
43 # by an SQLITE_DELETE authorization callback triggered by a | 43 # by an SQLITE_DELETE authorization callback triggered by a |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 INSERT INTO t1 VALUES(4, 5, 6); | 102 INSERT INTO t1 VALUES(4, 5, 6); |
103 } | 103 } |
104 set sqlite_search_count 0 | 104 set sqlite_search_count 0 |
105 execsql { | 105 execsql { |
106 DELETE FROM t1; | 106 DELETE FROM t1; |
107 } | 107 } |
108 set sqlite_search_count | 108 set sqlite_search_count |
109 } {1} | 109 } {1} |
110 | 110 |
111 finish_test | 111 finish_test |
OLD | NEW |