| Index: third_party/sqlite/src/test/unique.test
|
| diff --git a/third_party/sqlite/src/test/unique.test b/third_party/sqlite/src/test/unique.test
|
| index 56c49eed45518f284c260789b7c1ead5082064b3..04581c231bc420594cd4f2bcbad09c976bbe8c3c 100644
|
| --- a/third_party/sqlite/src/test/unique.test
|
| +++ b/third_party/sqlite/src/test/unique.test
|
| @@ -47,7 +47,8 @@ do_test unique-1.3 {
|
| catchsql {
|
| INSERT INTO t1(a,b,c) VALUES(1,3,4)
|
| }
|
| -} {1 {column a is not unique}}
|
| +} {1 {UNIQUE constraint failed: t1.a}}
|
| +verify_ex_errcode unique-1.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
| do_test unique-1.4 {
|
| execsql {
|
| SELECT * FROM t1 ORDER BY a;
|
| @@ -57,7 +58,8 @@ do_test unique-1.5 {
|
| catchsql {
|
| INSERT INTO t1(a,b,c) VALUES(3,2,4)
|
| }
|
| -} {1 {column b is not unique}}
|
| +} {1 {UNIQUE constraint failed: t1.b}}
|
| +verify_ex_errcode unique-1.5b SQLITE_CONSTRAINT_UNIQUE
|
| do_test unique-1.6 {
|
| execsql {
|
| SELECT * FROM t1 ORDER BY a;
|
| @@ -98,7 +100,8 @@ do_test unique-2.3 {
|
| catchsql {
|
| INSERT INTO t2 VALUES(1,5);
|
| }
|
| -} {1 {column a is not unique}}
|
| +} {1 {UNIQUE constraint failed: t2.a}}
|
| +verify_ex_errcode unique-2.3b SQLITE_CONSTRAINT_UNIQUE
|
| do_test unique-2.4 {
|
| catchsql {
|
| SELECT * FROM t2 ORDER BY a
|
| @@ -124,7 +127,8 @@ do_test unique-2.8 {
|
| catchsql {
|
| CREATE UNIQUE INDEX i2 ON t2(a);
|
| }
|
| -} {1 {indexed columns are not unique}}
|
| +} {1 {UNIQUE constraint failed: t2.a}}
|
| +verify_ex_errcode unique-2.8b SQLITE_CONSTRAINT_UNIQUE
|
| do_test unique-2.9 {
|
| catchsql {
|
| CREATE INDEX i2 ON t2(a);
|
| @@ -162,7 +166,8 @@ do_test unique-3.4 {
|
| INSERT INTO t3(a,b,c,d) VALUES(1,4,3,5);
|
| SELECT * FROM t3 ORDER BY a,b,c,d;
|
| }
|
| -} {1 {columns a, c, d are not unique}}
|
| +} {1 {UNIQUE constraint failed: t3.a, t3.c, t3.d}}
|
| +verify_ex_errcode unique-3.4b SQLITE_CONSTRAINT_UNIQUE
|
| integrity_check unique-3.5
|
|
|
| # Make sure NULLs are distinct as far as the UNIQUE tests are
|
| @@ -216,7 +221,8 @@ do_test unique-4.9 {
|
| } {0 {}}
|
| do_test unique-4.10 {
|
| catchsql {CREATE UNIQUE INDEX i4c ON t4(b)}
|
| -} {1 {indexed columns are not unique}}
|
| +} {1 {UNIQUE constraint failed: t4.b}}
|
| +verify_ex_errcode unique-4.10b SQLITE_CONSTRAINT_UNIQUE
|
| integrity_check unique-4.99
|
|
|
| # Test the error message generation logic. In particular, make sure we
|
| @@ -248,6 +254,8 @@ do_test unique-5.2 {
|
| catchsql {
|
| INSERT INTO t5 VALUES(1,2,3,4,5,6);
|
| }
|
| -} {1 {columns first_column_with_long_name, second_column_with_long_name, third_column_with_long_name, fourth_column_with_long_name, fifth_column_with_long_name, sixth_column_with_long_name are not unique}}
|
| +} {1 {UNIQUE constraint failed: t5.first_column_with_long_name, t5.second_column_with_long_name, t5.third_column_with_long_name, t5.fourth_column_with_long_name, t5.fifth_column_with_long_name, t5.sixth_column_with_long_name}}
|
| +verify_ex_errcode unique-5.2b SQLITE_CONSTRAINT_UNIQUE
|
| +
|
|
|
| finish_test
|
|
|