| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 execsql {DELETE FROM table1 WHERE f1=2} | 61 execsql {DELETE FROM table1 WHERE f1=2} |
| 62 } {1} | 62 } {1} |
| 63 do_test delete-3.1.6.2 { | 63 do_test delete-3.1.6.2 { |
| 64 db changes | 64 db changes |
| 65 } 1 | 65 } 1 |
| 66 do_test delete-3.1.7 { | 66 do_test delete-3.1.7 { |
| 67 execsql {SELECT * FROM table1 ORDER BY f1} | 67 execsql {SELECT * FROM table1 ORDER BY f1} |
| 68 } {1 2 4 16} | 68 } {1 2 4 16} |
| 69 integrity_check delete-3.2 | 69 integrity_check delete-3.2 |
| 70 | 70 |
| 71 | |
| 72 # Semantic errors in the WHERE clause | 71 # Semantic errors in the WHERE clause |
| 73 # | 72 # |
| 74 do_test delete-4.1 { | 73 do_test delete-4.1 { |
| 75 execsql {CREATE TABLE table2(f1 int, f2 int)} | 74 execsql {CREATE TABLE table2(f1 int, f2 int)} |
| 76 set v [catch {execsql {DELETE FROM table2 WHERE f3=5}} msg] | 75 set v [catch {execsql {DELETE FROM table2 WHERE f3=5}} msg] |
| 77 lappend v $msg | 76 lappend v $msg |
| 78 } {1 {no such column: f3}} | 77 } {1 {no such column: f3}} |
| 79 | 78 |
| 80 do_test delete-4.2 { | 79 do_test delete-4.2 { |
| 81 set v [catch {execsql {DELETE FROM table2 WHERE xyzzy(f1+4)}} msg] | 80 set v [catch {execsql {DELETE FROM table2 WHERE xyzzy(f1+4)}} msg] |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 set res [list] | 384 set res [list] |
| 386 db eval { SELECT t5.rowid AS r, c, d FROM t5, t6 ORDER BY a } { | 385 db eval { SELECT t5.rowid AS r, c, d FROM t5, t6 ORDER BY a } { |
| 387 if {$r==2} { db eval { DELETE FROM t5 WHERE rowid = 3 } } | 386 if {$r==2} { db eval { DELETE FROM t5 WHERE rowid = 3 } } |
| 388 lappend res $r $c $d | 387 lappend res $r $c $d |
| 389 } | 388 } |
| 390 set res | 389 set res |
| 391 } {1 a b 1 c d 2 a b 2 c d} | 390 } {1 a b 1 c d 2 a b 2 c d} |
| 392 | 391 |
| 393 | 392 |
| 394 finish_test | 393 finish_test |
| OLD | NEW |