OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 array unset ::tbls | 43 array unset ::tbls |
44 uplevel [list execsql $sql] | 44 uplevel [list execsql $sql] |
45 uplevel [list do_test $tn {lsort [array names ::tbls]} $tbllist] | 45 uplevel [list do_test $tn {lsort [array names ::tbls]} $tbllist] |
46 } | 46 } |
47 | 47 |
48 do_tblsread_test 1.2 { UPDATE par SET b=? WHERE a=? } {par s1} | 48 do_tblsread_test 1.2 { UPDATE par SET b=? WHERE a=? } {par s1} |
49 do_tblsread_test 1.3 { UPDATE par SET a=? WHERE b=? } {c1 c2 par} | 49 do_tblsread_test 1.3 { UPDATE par SET a=? WHERE b=? } {c1 c2 par} |
50 do_tblsread_test 1.4 { UPDATE par SET c=? WHERE b=? } {c3 par} | 50 do_tblsread_test 1.4 { UPDATE par SET c=? WHERE b=? } {c3 par} |
51 do_tblsread_test 1.5 { UPDATE par SET a=?,b=?,c=? WHERE b=? } {c1 c2 c3 par s1} | 51 do_tblsread_test 1.5 { UPDATE par SET a=?,b=?,c=? WHERE b=? } {c1 c2 c3 par s1} |
52 | 52 |
| 53 ifcapable incrblob { |
| 54 do_execsql_test 2.0 { |
| 55 CREATE TABLE pX(x PRIMARY KEY); |
| 56 CREATE TABLE cX(a INTEGER PRIMARY KEY, b REFERENCES pX); |
| 57 } |
| 58 |
| 59 do_catchsql_test 2.1 { |
| 60 INSERT INTO cX VALUES(11, zeroblob(40)); |
| 61 } {1 {FOREIGN KEY constraint failed}} |
| 62 |
| 63 do_test 2.2 { |
| 64 set stmt [sqlite3_prepare_v2 db "INSERT INTO cX VALUES(11, ?)" -1] |
| 65 sqlite3_bind_zeroblob $stmt 1 45 |
| 66 sqlite3_step $stmt |
| 67 sqlite3_finalize $stmt |
| 68 } {SQLITE_CONSTRAINT} |
| 69 } |
53 | 70 |
54 finish_test | 71 finish_test |
OLD | NEW |