Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: third_party/sqlite/src/test/e_delete.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/e_createtable.test ('k') | third_party/sqlite/src/test/e_expr.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2010 September 21 1 # 2010 September 21
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 INSERT INTO %T% VALUES(5, 'five'); 63 INSERT INTO %T% VALUES(5, 'five');
64 }] 64 }]
65 } 65 }
66 } 66 }
67 } {} 67 } {}
68 do_delete_tests e_delete-1.1 { 68 do_delete_tests e_delete-1.1 {
69 1 "DELETE FROM t1 ; SELECT * FROM t1" {} 69 1 "DELETE FROM t1 ; SELECT * FROM t1" {}
70 2 "DELETE FROM main.t2 ; SELECT * FROM t2" {} 70 2 "DELETE FROM main.t2 ; SELECT * FROM t2" {}
71 } 71 }
72 72
73 # EVIDENCE-OF: R-30203-16177 If a WHERE clause is supplied, then only 73 # EVIDENCE-OF: R-26300-50198 If a WHERE clause is supplied, then only
74 # those rows for which the result of evaluating the WHERE clause as a 74 # those rows for which the WHERE clause boolean expression is true are
75 # boolean expression is true are deleted. 75 # deleted.
76 #
77 # EVIDENCE-OF: R-23360-48280 Rows for which the expression is false or
78 # NULL are retained.
76 # 79 #
77 do_delete_tests e_delete-1.2 { 80 do_delete_tests e_delete-1.2 {
78 1 "DELETE FROM t3 WHERE 1 ; SELECT x FROM t3" {} 81 1 "DELETE FROM t3 WHERE 1 ; SELECT x FROM t3" {}
79 2 "DELETE FROM main.t4 WHERE 0 ; SELECT x FROM t4" {1 2 3 4 5} 82 2 "DELETE FROM main.t4 WHERE 0 ; SELECT x FROM t4" {1 2 3 4 5}
80 3 "DELETE FROM t4 WHERE 0.0 ; SELECT x FROM t4" {1 2 3 4 5} 83 3 "DELETE FROM t4 WHERE 0.0 ; SELECT x FROM t4" {1 2 3 4 5}
81 4 "DELETE FROM t4 WHERE NULL ; SELECT x FROM t4" {1 2 3 4 5} 84 4 "DELETE FROM t4 WHERE NULL ; SELECT x FROM t4" {1 2 3 4 5}
82 5 "DELETE FROM t4 WHERE y!='two'; SELECT x FROM t4" {2} 85 5 "DELETE FROM t4 WHERE y!='two'; SELECT x FROM t4" {2}
83 6 "DELETE FROM t4 WHERE y='two' ; SELECT x FROM t4" {} 86 6 "DELETE FROM t4 WHERE y='two' ; SELECT x FROM t4" {}
84 7 "DELETE FROM t5 WHERE x=(SELECT max(x) FROM t5);SELECT x FROM t5" {1 2 3 4} 87 7 "DELETE FROM t5 WHERE x=(SELECT max(x) FROM t5);SELECT x FROM t5" {1 2 3 4}
85 8 "DELETE FROM t5 WHERE (SELECT max(x) FROM t4) ;SELECT x FROM t5" {1 2 3 4} 88 8 "DELETE FROM t5 WHERE (SELECT max(x) FROM t4) ;SELECT x FROM t5" {1 2 3 4}
(...skipping 24 matching lines...) Expand all
110 CREATE TABLE aux.t9(a, b); INSERT INTO aux.t9 VALUES(1, 2); 113 CREATE TABLE aux.t9(a, b); INSERT INTO aux.t9 VALUES(1, 2);
111 CREATE TABLE aux2.t9(a, b); INSERT INTO aux2.t9 VALUES(3, 4); 114 CREATE TABLE aux2.t9(a, b); INSERT INTO aux2.t9 VALUES(3, 4);
112 115
113 CREATE TABLE aux2.t10(a, b); INSERT INTO aux2.t10 VALUES(1, 2); 116 CREATE TABLE aux2.t10(a, b); INSERT INTO aux2.t10 VALUES(1, 2);
114 } {} 117 } {}
115 118
116 119
117 # EVIDENCE-OF: R-09681-58560 The table-name specified as part of a 120 # EVIDENCE-OF: R-09681-58560 The table-name specified as part of a
118 # DELETE statement within a trigger body must be unqualified. 121 # DELETE statement within a trigger body must be unqualified.
119 # 122 #
120 # EVIDENCE-OF: R-36771-43788 In other words, the database-name. prefix 123 # EVIDENCE-OF: R-12275-20298 In other words, the schema-name. prefix on
121 # on the table name is not allowed within triggers. 124 # the table name is not allowed within triggers.
122 # 125 #
123 do_delete_tests e_delete-2.1 -error { 126 do_delete_tests e_delete-2.1 -error {
124 qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers 127 qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers
125 } { 128 } {
126 1 { 129 1 {
127 CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN 130 CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
128 DELETE FROM main.t2; 131 DELETE FROM main.t2;
129 END; 132 END;
130 } {} 133 } {}
131 134
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } { 468 } {
466 1 "DELETE FROM t1 ORDER BY a DESC LIMIT 2" {4 5} 469 1 "DELETE FROM t1 ORDER BY a DESC LIMIT 2" {4 5}
467 2 "DELETE FROM t1 ORDER BY a DESC LIMIT -1" {1 2 3 4 5} 470 2 "DELETE FROM t1 ORDER BY a DESC LIMIT -1" {1 2 3 4 5}
468 3 "DELETE FROM t1 ORDER BY a ASC LIMIT 2" {1 2} 471 3 "DELETE FROM t1 ORDER BY a ASC LIMIT 2" {1 2}
469 4 "DELETE FROM t1 ORDER BY a ASC LIMIT -1" {1 2 3 4 5} 472 4 "DELETE FROM t1 ORDER BY a ASC LIMIT -1" {1 2 3 4 5}
470 } 473 }
471 474
472 } 475 }
473 476
474 finish_test 477 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/e_createtable.test ('k') | third_party/sqlite/src/test/e_expr.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698