1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Standardize the error messages generated by constraint failures to a format

of "$TYPE constraint failed: $DETAIL".  This involves many changes to the
expected output of test cases.

FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
This commit is contained in:
drh
2013-11-05 13:33:55 +00:00
parent 00012df46d
commit f9c8ce3ced
58 changed files with 669 additions and 596 deletions

View File

@ -105,37 +105,37 @@ set FkeySimpleSchema {
set FkeySimpleTests {
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {foreign key constraint failed}}
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
1.2 "INSERT INTO t1 VALUES(1, 2)" {0 {}}
1.3 "INSERT INTO t2 VALUES(1, 3)" {0 {}}
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {foreign key constraint failed}}
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
1.5 "INSERT INTO t2 VALUES(NULL, 4)" {0 {}}
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
1.11 "DELETE FROM t1 WHERE a=1" {1 {foreign key constraint failed}}
1.12 "UPDATE t1 SET a = 2" {1 {foreign key constraint failed}}
1.11 "DELETE FROM t1 WHERE a=1" {1 {FOREIGN KEY constraint failed}}
1.12 "UPDATE t1 SET a = 2" {1 {FOREIGN KEY constraint failed}}
1.13 "UPDATE t1 SET a = 1" {0 {}}
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {foreign key constraint failed}}
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
2.2 "INSERT INTO t3 VALUES(1, 2)" {0 {}}
2.3 "INSERT INTO t4 VALUES(1, 3)" {0 {}}
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {foreign key constraint failed}}
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
4.2 "INSERT INTO t7 VALUES(2, 1)" {0 {}}
4.3 "INSERT INTO t8 VALUES(1, 3)" {0 {}}
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {foreign key constraint failed}}
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
4.5 "INSERT INTO t8 VALUES(NULL, 4)" {0 {}}
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
4.10 "UPDATE t8 SET c=NULL WHERE d=4" {0 {}}
4.11 "DELETE FROM t7 WHERE b=1" {1 {foreign key constraint failed}}
4.12 "UPDATE t7 SET b = 2" {1 {foreign key constraint failed}}
4.11 "DELETE FROM t7 WHERE b=1" {1 {FOREIGN KEY constraint failed}}
4.12 "UPDATE t7 SET b = 2" {1 {FOREIGN KEY constraint failed}}
4.13 "UPDATE t7 SET b = 1" {0 {}}
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {foreign key constraint failed}}
4.15 "UPDATE t7 SET b = 5" {1 {foreign key constraint failed}}
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {FOREIGN KEY constraint failed}}
4.15 "UPDATE t7 SET b = 5" {1 {FOREIGN KEY constraint failed}}
4.17 "UPDATE t7 SET a = 10" {0 {}}
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
@ -215,7 +215,7 @@ do_test without_rowid3-1.5.1 {
} {35.0 text}
do_test without_rowid3-1.5.2 {
catchsql { DELETE FROM i }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
# Same test using a regular primary key with integer affinity.
drop_all_tables
@ -231,7 +231,7 @@ do_test without_rowid3-1.6.1 {
} {35.0 text 35 integer}
do_test without_rowid3-1.6.2 {
catchsql { DELETE FROM i }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
# Use a collation sequence on the parent key.
drop_all_tables
@ -243,7 +243,7 @@ do_test without_rowid3-1.7.1 {
INSERT INTO j VALUES('sqlite');
}
catchsql { DELETE FROM i }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
# Use the parent key collation even if it is default and the child key
# has an explicit value.
@ -255,7 +255,7 @@ do_test without_rowid3-1.7.2 {
INSERT INTO i VALUES('SQLite');
}
catchsql { INSERT INTO j VALUES('sqlite') }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-1.7.3 {
execsql {
INSERT INTO i VALUES('sqlite');
@ -263,7 +263,7 @@ do_test without_rowid3-1.7.3 {
DELETE FROM i WHERE i = 'SQLite';
}
catchsql { DELETE FROM i WHERE i = 'sqlite' }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
# This section (test cases without_rowid3-2.*) contains tests to check that the
@ -271,7 +271,7 @@ do_test without_rowid3-1.7.3 {
#
proc without_rowid3-2-test {tn nocommit sql {res {}}} {
if {$res eq "FKV"} {
set expected {1 {foreign key constraint failed}}
set expected {1 {FOREIGN KEY constraint failed}}
} else {
set expected [list 0 $res]
}
@ -279,7 +279,7 @@ proc without_rowid3-2-test {tn nocommit sql {res {}}} {
if {$nocommit} {
do_test without_rowid3-2.${tn}c {
catchsql COMMIT
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
}
}
@ -375,7 +375,7 @@ without_rowid3-2-test 65 1 "INSERT INTO leaf VALUES('b', 2)"
without_rowid3-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
do_test without_rowid3-2-test-67 {
catchsql "INSERT INTO node SELECT parent, 3 FROM leaf"
} {1 {PRIMARY KEY must be unique}}
} {1 {UNIQUE constraint failed: node.nodeid}}
without_rowid3-2-test 68 0 "COMMIT" FKV
without_rowid3-2-test 69 1 "INSERT INTO node VALUES(1, NULL)"
without_rowid3-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
@ -417,14 +417,14 @@ do_test without_rowid3-3.1.2 {
} {}
do_test without_rowid3-3.1.3 {
catchsql { UPDATE ab SET a = 5 }
} {1 {constraint failed}}
} {1 {CHECK constraint failed: ef}}
do_test without_rowid3-3.1.4 {
execsql { SELECT * FROM ab }
} {1 b}
do_test without_rowid3-3.1.4 {
execsql BEGIN;
catchsql { UPDATE ab SET a = 5 }
} {1 {constraint failed}}
} {1 {CHECK constraint failed: ef}}
do_test without_rowid3-3.1.5 {
execsql COMMIT;
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
@ -433,7 +433,7 @@ do_test without_rowid3-3.1.5 {
do_test without_rowid3-3.2.1 {
execsql BEGIN;
catchsql { DELETE FROM ab }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-3.2.2 {
execsql COMMIT
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
@ -544,7 +544,7 @@ do_test without_rowid3-7.1 {
} {}
do_test without_rowid3-7.2 {
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.3 {
execsql {
INSERT INTO t1 VALUES(1, 2);
@ -557,16 +557,16 @@ do_test without_rowid3-7.4 {
} {}
do_test without_rowid3-7.5 {
catchsql { UPDATE t2 SET c = 3 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.6 {
catchsql { DELETE FROM t1 WHERE a = 2 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.7 {
execsql { DELETE FROM t1 WHERE a = 1 }
} {}
do_test without_rowid3-7.8 {
catchsql { UPDATE t1 SET a = 3 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
# Test that it is not possible to enable/disable FK support while a
@ -631,7 +631,7 @@ do_test without_rowid3-9.1.4 {
} {2 two}
do_test without_rowid3-9.1.5 {
catchsql { DELETE FROM t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-9.2.1 {
execsql {
@ -766,13 +766,13 @@ do_test without_rowid3-12.1.3 {
} {}
do_test without_rowid3-12.1.4 {
catchsql "UPDATE t1 SET b = 'five' WHERE b = 'two'"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.1.5 {
execsql "DELETE FROM t1 WHERE b = 'two'"
} {}
do_test without_rowid3-12.1.6 {
catchsql "COMMIT"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.1.7 {
execsql {
INSERT INTO t1 VALUES(2, 'two');
@ -814,7 +814,7 @@ do_test without_rowid3-12.2.3 {
INSERT INTO t2 VALUES('b');
}
catchsql { DELETE FROM t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.2.4 {
execsql {
SELECT * FROM t1;
@ -852,14 +852,14 @@ do_test without_rowid3-12.3.2 {
} {no possibly}
do_test without_rowid3-12.3.3 {
catchsql { INSERT INTO down(c39, c38) VALUES('yes', 'no') }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.3.4 {
execsql {
INSERT INTO up(c34, c35) VALUES('yes', 'no');
INSERT INTO down(c39, c38) VALUES('yes', 'no');
}
catchsql { DELETE FROM up WHERE c34 = 'yes' }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.3.5 {
execsql {
DELETE FROM up WHERE c34 = 'possibly';
@ -886,7 +886,7 @@ foreach {tn stmt} {
} {
do_test without_rowid3-13.1.$tn.1 {
catchsql $stmt
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-13.1.$tn.2 {
execsql {
SELECT * FROM pp;
@ -896,7 +896,7 @@ foreach {tn stmt} {
do_test without_rowid3-13.1.$tn.3 {
execsql BEGIN;
catchsql $stmt
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-13.1.$tn.4 {
execsql {
COMMIT;
@ -989,13 +989,13 @@ ifcapable altertable {
]
do_test without_rowid3-14.2.2.3 {
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2.2.4 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2.2.5 {
catchsql { UPDATE t4 SET b = 5 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
@ -1073,13 +1073,13 @@ ifcapable altertable {
]
do_test without_rowid3-14.2tmp.2.3 {
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2tmp.2.4 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2tmp.2.5 {
catchsql { UPDATE t4 SET b = 5 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2tmp.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
@ -1158,13 +1158,13 @@ ifcapable altertable {
]
do_test without_rowid3-14.2aux.2.3 {
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2aux.2.4 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2aux.2.5 {
catchsql { UPDATE t4 SET b = 5 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-14.2aux.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
@ -1190,7 +1190,7 @@ do_test without_rowid3-2.14.3.2 {
} {}
do_test without_rowid3-2.14.3.3 {
catchsql { DROP TABLE t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-2.14.3.4 {
execsql {
DELETE FROM t2;
@ -1209,7 +1209,7 @@ do_test without_rowid3-2.14.3.5 {
} {}
do_test without_rowid3-2.14.3.6 {
catchsql { DROP TABLE t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-2.14.3.7 {
execsql {
DROP TABLE t2;
@ -1369,15 +1369,15 @@ foreach {tn zSchema} {
do_test without_rowid3-16.1.$tn.3 {
catchsql { UPDATE self SET b = 15 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.1.$tn.4 {
catchsql { UPDATE self SET a = 15 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.1.$tn.5 {
catchsql { UPDATE self SET a = 15, b = 16 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.1.$tn.6 {
catchsql { UPDATE self SET a = 17, b = 17 }
@ -1388,7 +1388,7 @@ foreach {tn zSchema} {
} {}
do_test without_rowid3-16.1.$tn.8 {
catchsql { INSERT INTO self VALUES(20, 21) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
}
# Additional tests cases using multi-column self-referential
@ -1422,13 +1422,13 @@ do_test without_rowid3-16.4.1.4 {
catchsql {
UPDATE t1 SET c=11, e=22 WHERE a=1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.4.1.5 {
catchsql {
UPDATE t1 SET d=11, f=22 WHERE a=1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_execsql_test without_rowid3-16.4.1.6 {
DELETE FROM t1 WHERE a=1;
@ -1462,13 +1462,13 @@ do_test without_rowid3-16.4.2.4 {
catchsql {
UPDATE t1 SET c=11, e=22 WHERE a=1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.4.2.5 {
catchsql {
UPDATE t1 SET d=11, f=22 WHERE a=1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_execsql_test without_rowid3-16.4.2.6 {
DELETE FROM t1 WHERE a=1;
@ -1530,7 +1530,7 @@ do_test without_rowid3-17.1.6 {
INSERT INTO one VALUES(0, 0, 0);
UPDATE two SET e=e+1, f=f+1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-17.1.7 {
execsql { SELECT * FROM one }
} {1 2 3 2 3 4 3 4 5 0 0 0}
@ -1686,7 +1686,7 @@ ifcapable auth {
}
do_test without_rowid3-18.8 {
catchsql { INSERT INTO short VALUES(1, 3, 2) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-18.9 {
execsql { INSERT INTO short VALUES(1, 3, NULL) }
} {}
@ -1695,7 +1695,7 @@ ifcapable auth {
} {1 3 2 1 3 {}}
do_test without_rowid3-18.11 {
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
db auth {}
unset authargs
@ -1747,7 +1747,7 @@ foreach {tn insert} {
} {
do_test without_rowid3-20.2.$tn.1 {
catchsql "$insert INTO cc VALUES(1, 2)"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.2.$tn.2 {
execsql { SELECT * FROM cc }
} {}
@ -1758,7 +1758,7 @@ foreach {tn insert} {
INSERT INTO cc VALUES(1, 2);
}
catchsql "$insert INTO cc VALUES(3, 4)"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.2.$tn.4 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2}
@ -1783,13 +1783,13 @@ foreach {tn update} {
} {}
do_test without_rowid3-20.3.$tn.2 {
catchsql "$update pp SET a = 1"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.3 {
execsql { SELECT * FROM pp }
} {2 two}
do_test without_rowid3-20.3.$tn.4 {
catchsql "$update cc SET d = 1"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.5 {
execsql { SELECT * FROM cc }
} {1 2}
@ -1799,7 +1799,7 @@ foreach {tn update} {
INSERT INTO pp VALUES(3, 'three');
}
catchsql "$update pp SET a = 1 WHERE a = 2"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.7 {
execsql { COMMIT ; SELECT * FROM pp }
} {2 two 3 three}
@ -1809,7 +1809,7 @@ foreach {tn update} {
INSERT INTO cc VALUES(2, 2);
}
catchsql "$update cc SET d = 1 WHERE c = 1"
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.9 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2 2 2}
@ -1835,7 +1835,7 @@ do_test without_rowid3-genfkey.1.1 {
} {}
do_test without_rowid3-genfkey.1.2 {
catchsql { INSERT INTO t2 VALUES(1, 2) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.3 {
execsql {
INSERT INTO t1 VALUES(1, 2, 3);
@ -1847,7 +1847,7 @@ do_test without_rowid3-genfkey.1.4 {
} {}
do_test without_rowid3-genfkey.1.5 {
catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.6 {
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
} {}
@ -1856,13 +1856,13 @@ do_test without_rowid3-genfkey.1.7 {
} {}
do_test without_rowid3-genfkey.1.8 {
catchsql { UPDATE t1 SET a = 10 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.9 {
catchsql { UPDATE t1 SET a = NULL }
} {1 {t1.a may not be NULL}}
} {1 {NOT NULL constraint failed: t1.a}}
do_test without_rowid3-genfkey.1.10 {
catchsql { DELETE FROM t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.11 {
execsql { UPDATE t2 SET e = NULL }
} {}
@ -1882,7 +1882,7 @@ do_test without_rowid3-genfkey.1.13 {
} {}
do_test without_rowid3-genfkey.1.14 {
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.15 {
execsql {
INSERT INTO t1 VALUES(1, 1, 4);
@ -1891,16 +1891,16 @@ do_test without_rowid3-genfkey.1.15 {
} {}
do_test without_rowid3-genfkey.1.16 {
catchsql { DELETE FROM t1 }
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.17 {
catchsql { UPDATE t1 SET b = 10}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.18 {
execsql { UPDATE t1 SET a = 10}
} {}
do_test without_rowid3-genfkey.1.19 {
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
drop_all_tables
do_test without_rowid3-genfkey.2.1 {
@ -2013,7 +2013,7 @@ do_test without_rowid3-dd08e5.1.2 {
catchsql {
DELETE FROM tdd08;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-dd08e5.1.3 {
execsql {
SELECT * FROM tdd08;
@ -2023,17 +2023,17 @@ do_test without_rowid3-dd08e5.1.4 {
catchsql {
INSERT INTO tdd08_b VALUES(400,500,300);
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-dd08e5.1.5 {
catchsql {
UPDATE tdd08_b SET x=x+1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-dd08e5.1.6 {
catchsql {
UPDATE tdd08 SET a=a+1;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
@ -2054,12 +2054,12 @@ do_test without_rowid3-ce7c13.1.2 {
catchsql {
UPDATE tce71 set b = 201 where a = 100;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-ce7c13.1.3 {
catchsql {
UPDATE tce71 set a = 101 where a = 100;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-ce7c13.1.4 {
execsql {
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b)) WITHOUT rowid;
@ -2074,11 +2074,11 @@ do_test without_rowid3-ce7c13.1.5 {
catchsql {
UPDATE tce73 set b = 201 where a = 100;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-ce7c13.1.6 {
catchsql {
UPDATE tce73 set a = 101 where a = 100;
}
} {1 {foreign key constraint failed}}
} {1 {FOREIGN KEY constraint failed}}
finish_test