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

Unified Diff: third_party/sqlite/src/test/update.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/unordered.test ('k') | third_party/sqlite/src/test/uri.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/update.test
diff --git a/third_party/sqlite/src/test/update.test b/third_party/sqlite/src/test/update.test
index a6fef7d9affce51293f6c70c505fc4e412d6ae28..d7baf6e702a3160d77374eefa7fdde9654db15b9 100644
--- a/third_party/sqlite/src/test/update.test
+++ b/third_party/sqlite/src/test/update.test
@@ -452,7 +452,7 @@ do_test update-10.3 {
UPDATE t1 SET a=1, e=10 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test update-10.4 {
catchsql {
SELECT * FROM t1;
@@ -469,7 +469,7 @@ do_test update-10.6 {
UPDATE t1 SET b=2, e=12 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t1.b}}
do_test update-10.7 {
catchsql {
SELECT * FROM t1;
@@ -486,7 +486,7 @@ do_test update-10.9 {
UPDATE t1 SET c=3, d=4, e=14 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {columns c, d are not unique}}
+} {1 {UNIQUE constraint failed: t1.c, t1.d}}
do_test update-10.10 {
catchsql {
SELECT * FROM t1;
@@ -604,5 +604,19 @@ do_test update-14.4 {
} ;# ifcapable {trigger}
+# Ticket [https://www.sqlite.org/src/tktview/43107840f1c02] on 2014-10-29
+# An assertion fault on UPDATE
+#
+do_execsql_test update-15.1 {
+ CREATE TABLE t15(a INTEGER PRIMARY KEY, b);
+ INSERT INTO t15(a,b) VALUES(10,'abc'),(20,'def'),(30,'ghi');
+ ALTER TABLE t15 ADD COLUMN c;
+ CREATE INDEX t15c ON t15(c);
+ INSERT INTO t15(a,b)
+ VALUES(5,'zyx'),(15,'wvu'),(25,'tsr'),(35,'qpo');
+ UPDATE t15 SET c=printf("y%d",a) WHERE c IS NULL;
+ SELECT a,b,c,'|' FROM t15 ORDER BY a;
+} {5 zyx y5 | 10 abc y10 | 15 wvu y15 | 20 def y20 | 25 tsr y25 | 30 ghi y30 | 35 qpo y35 |}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/unordered.test ('k') | third_party/sqlite/src/test/uri.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698