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

Unified Diff: third_party/sqlite/src/test/tkt1567.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/tkt-fc7bd6358f.test ('k') | third_party/sqlite/src/test/tkt1667.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt1567.test
diff --git a/third_party/sqlite/src/test/tkt1567.test b/third_party/sqlite/src/test/tkt1567.test
index 6c4548a31404cecbc1a1ad93787d8813f4e15513..cb1a6be5062fd963f2a82e4bde4bd36c8a46a53f 100644
--- a/third_party/sqlite/src/test/tkt1567.test
+++ b/third_party/sqlite/src/test/tkt1567.test
@@ -40,7 +40,7 @@ do_test tkt1567-1.4 {
catchsql {
UPDATE t1 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
}
-} {1 {column a is not unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test tkt1567-1.5 {
execsql {
COMMIT;
@@ -48,4 +48,35 @@ do_test tkt1567-1.5 {
} {}
integrity_check tkt1567-1.6
+do_test tkt1567-2.1 {
+ execsql {
+ CREATE TABLE t2(a TEXT PRIMARY KEY, rowid INT) WITHOUT rowid;
+ }
+ set bigstr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+ for {set i 0} {$i<100} {incr i} {
+ set x [format %5d [expr $i*2]]
+ set sql "INSERT INTO t2 VALUES('$x-$bigstr', $i+1)"
+ execsql $sql
+ }
+} {}
+integrity_check tkt1567-2.2
+
+do_test tkt1567-2.3 {
+ execsql {
+ BEGIN;
+ UPDATE t2 SET a = a||'x' WHERE rowid%2==0;
+ }
+} {}
+do_test tkt1567-2.4 {
+ catchsql {
+ UPDATE t2 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
+ }
+} {1 {UNIQUE constraint failed: t2.a}}
+do_test tkt1567-2.5 {
+ execsql {
+ COMMIT;
+ }
+} {}
+integrity_check tkt1567-2.6
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt-fc7bd6358f.test ('k') | third_party/sqlite/src/test/tkt1667.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698