OLD | NEW |
1 # 2008 July 11 | 1 # 2008 July 11 |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 CREATE TABLE t2(x,y); | 51 CREATE TABLE t2(x,y); |
52 INSERT INTO t2 SELECT x, x+1 FROM t1 WHERE x<5; | 52 INSERT INTO t2 SELECT x, x+1 FROM t1 WHERE x<5; |
53 SELECT x, test_eval('DELETE FROM t2 WHERE x='||x), y FROM t2; | 53 SELECT x, test_eval('DELETE FROM t2 WHERE x='||x), y FROM t2; |
54 } | 54 } |
55 } {1 {} {} 2 {} {} 3 {} {} 4 {} {}} | 55 } {1 {} {} 2 {} {} 3 {} {} 4 {} {}} |
56 do_test eval-2.2 { | 56 do_test eval-2.2 { |
57 execsql { | 57 execsql { |
58 SELECT * FROM t2 | 58 SELECT * FROM t2 |
59 } | 59 } |
60 } {} | 60 } {} |
| 61 do_test eval-2.3 { |
| 62 execsql { |
| 63 INSERT INTO t2 SELECT x, x+1 FROM t1 WHERE x<5; |
| 64 SELECT x, test_eval('DELETE FROM t2 WHERE x='||x), y FROM t2 |
| 65 ORDER BY rowid DESC; |
| 66 } |
| 67 } {4 {} {} 3 {} {} 2 {} {} 1 {} {}} |
| 68 do_test eval-2.4 { |
| 69 execsql { |
| 70 SELECT * FROM t2 |
| 71 } |
| 72 } {} |
61 | 73 |
62 # Modify a row while it is being read. | 74 # Modify a row while it is being read. |
63 # | 75 # |
64 do_test eval-3.1 { | 76 do_test eval-3.1 { |
65 execsql { | 77 execsql { |
66 INSERT INTO t2 SELECT x, x+1 FROM t1 WHERE x<5; | 78 INSERT INTO t2 SELECT x, x+1 FROM t1 WHERE x<5; |
67 SELECT x, test_eval('UPDATE t2 SET y=y+100 WHERE x='||x), y FROM t2; | 79 SELECT x, test_eval('UPDATE t2 SET y=y+100 WHERE x='||x), y FROM t2; |
68 } | 80 } |
69 } {1 {} 102 2 {} 103 3 {} 104 4 {} 105} | 81 } {1 {} 102 2 {} 103 3 {} 104 4 {} 105} |
70 | 82 |
71 do_test eval-4.1 { | 83 do_test eval-4.1 { |
72 execsql { SELECT test_eval('SELECT "abcdefghij"') } | 84 execsql { SELECT test_eval('SELECT "abcdefghij"') } |
73 } {abcdefghij} | 85 } {abcdefghij} |
74 | 86 |
75 finish_test | 87 finish_test |
OLD | NEW |