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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/collate4.test ('k') | third_party/sqlite/src/test/corrupt.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/conflict.test
diff --git a/third_party/sqlite/src/test/conflict.test b/third_party/sqlite/src/test/conflict.test
index 44390d20f2d53d7d65289941b647092cca7e6d11..17c7263f1ef2cf9a1aab3112b4926d675173c0e6 100644
--- a/third_party/sqlite/src/test/conflict.test
+++ b/third_party/sqlite/src/test/conflict.test
@@ -307,7 +307,7 @@ foreach {i conf1 cmd t0 t1 t2 t3 t4} {
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
} {
if {$t0} {set t1 {column a is not unique}}
- if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
+ if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
set t3 0
} else {
set t3 [expr {$t3+$t4}]
@@ -789,4 +789,26 @@ do_test conflict-12.4 {
} {2 one}
+# Ticket [c38baa3d969eab7946dc50ba9d9b4f0057a19437]
+# REPLACE works like ABORT on a CHECK constraint.
+#
+do_test conflict-13.1 {
+ execsql {
+ CREATE TABLE t13(a CHECK(a!=2));
+ BEGIN;
+ REPLACE INTO t13 VALUES(1);
+ }
+ catchsql {
+ REPLACE INTO t13 VALUES(2);
+ }
+} {1 {constraint failed}}
+do_test conflict-13.2 {
+ execsql {
+ REPLACE INTO t13 VALUES(3);
+ COMMIT;
+ SELECT * FROM t13;
+ }
+} {1 3}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/collate4.test ('k') | third_party/sqlite/src/test/corrupt.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698