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

Unified Diff: third_party/sqlite/sqlite-src-3080704/test/without_rowid2.test

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3080704/test/without_rowid2.test
diff --git a/third_party/sqlite/src/test/fkey1.test b/third_party/sqlite/sqlite-src-3080704/test/without_rowid2.test
similarity index 75%
copy from third_party/sqlite/src/test/fkey1.test
copy to third_party/sqlite/sqlite-src-3080704/test/without_rowid2.test
index e7c00d16d4b38a9fbbc22f39f4c18ac735864c68..5ba1a23bef775b027681df0dbfb5af6de221d8ad 100644
--- a/third_party/sqlite/src/test/fkey1.test
+++ b/third_party/sqlite/sqlite-src-3080704/test/without_rowid2.test
@@ -1,4 +1,4 @@
-# 2001 September 15
+# 2013-11-02
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
@@ -8,9 +8,10 @@
# May you share freely, never taking more than you give.
#
#***********************************************************************
-# This file implements regression tests for SQLite library.
#
-# This file implements tests for foreign keys.
+# This file implements regression tests for SQLite library. The
+# focus of this file is testing WITHOUT ROWID tables, and especially
+# FOREIGN KEY constraints.
#
set testdir [file dirname $argv0]
@@ -23,39 +24,39 @@ ifcapable {!foreignkey} {
# Create a table and some data to work with.
#
-do_test fkey1-1.0 {
+do_test without_rowid2-1.0 {
execsql {
CREATE TABLE t1(
- a INTEGER PRIMARY KEY,
- b INTEGER
+ a INT PRIMARY KEY,
+ b INT
REFERENCES t1 ON DELETE CASCADE
REFERENCES t2,
c TEXT,
FOREIGN KEY (b,c) REFERENCES t2(x,y) ON UPDATE CASCADE
- );
+ ) WITHOUT rowid;
}
} {}
-do_test fkey1-1.1 {
+do_test without_rowid2-1.1 {
execsql {
CREATE TABLE t2(
- x INTEGER PRIMARY KEY,
+ x INT PRIMARY KEY,
y TEXT
- );
+ ) WITHOUT rowid;
}
} {}
-do_test fkey1-1.2 {
+do_test without_rowid2-1.2 {
execsql {
CREATE TABLE t3(
- a INTEGER REFERENCES t2,
- b INTEGER REFERENCES t1,
+ a INT REFERENCES t2,
+ b INT REFERENCES t1,
FOREIGN KEY (a,b) REFERENCES t2(x,y)
);
}
} {}
-do_test fkey1-2.1 {
+do_test without_rowid2-2.1 {
execsql {
- CREATE TABLE t4(a integer primary key);
+ CREATE TABLE t4(a int primary key) WITHOUT rowid;
CREATE TABLE t5(x references t4);
CREATE TABLE t6(x references t4);
CREATE TABLE t7(x references t4);
@@ -71,9 +72,9 @@ do_test fkey1-2.1 {
}
} {}
-do_test fkey1-3.1 {
+do_test without_rowid2-3.1 {
execsql {
- CREATE TABLE t5(a PRIMARY KEY, b, c);
+ CREATE TABLE t5(a PRIMARY KEY, b, c) WITHOUT rowid;
CREATE TABLE t6(
d REFERENCES t5,
e REFERENCES t5(c)
@@ -84,7 +85,7 @@ do_test fkey1-3.1 {
{0 0 t5 e c {NO ACTION} {NO ACTION} NONE} \
{1 0 t5 d {} {NO ACTION} {NO ACTION} NONE} \
]
-do_test fkey1-3.2 {
+do_test without_rowid2-3.2 {
execsql {
CREATE TABLE t7(d, e, f,
FOREIGN KEY (d, e) REFERENCES t5(a, b)
@@ -95,7 +96,7 @@ do_test fkey1-3.2 {
{0 0 t5 d a {NO ACTION} {NO ACTION} NONE} \
{0 1 t5 e b {NO ACTION} {NO ACTION} NONE} \
]
-do_test fkey1-3.3 {
+do_test without_rowid2-3.3 {
execsql {
CREATE TABLE t8(d, e, f,
FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET NULL
@@ -106,7 +107,7 @@ do_test fkey1-3.3 {
{0 0 t5 d {} {SET NULL} CASCADE NONE} \
{0 1 t5 e {} {SET NULL} CASCADE NONE} \
]
-do_test fkey1-3.4 {
+do_test without_rowid2-3.4 {
execsql {
CREATE TABLE t9(d, e, f,
FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET DEFAULT
@@ -117,5 +118,8 @@ do_test fkey1-3.4 {
{0 0 t5 d {} {SET DEFAULT} CASCADE NONE} \
{0 1 t5 e {} {SET DEFAULT} CASCADE NONE} \
]
+do_test without_rowid2-3.5 {
+ sqlite3_db_status db DBSTATUS_DEFERRED_FKS 0
+} {0 0 0}
finish_test

Powered by Google App Engine
This is Rietveld 408576698