mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Parser bug fix: Make sure the table constraints allowed by prior releases
can still be parsed, even if they are technically not allowed by the syntax diagram. FossilOrigin-Name: e536ac041815b118c461ceee798f9b7283269f58
This commit is contained in:
@ -45,6 +45,23 @@ do_test schema5-1.3 {
|
||||
do_test schema5-1.4 {
|
||||
catchsql {INSERT INTO t1 VALUES(10,11,12);}
|
||||
} {1 {constraint two failed}}
|
||||
do_test schema5-1.5 {
|
||||
db eval {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a,b,c,
|
||||
UNIQUE(a) CONSTRAINT one,
|
||||
PRIMARY KEY(b,c) CONSTRAINT two
|
||||
);
|
||||
INSERT INTO t1 VALUES(1,2,3);
|
||||
}
|
||||
} {}
|
||||
do_test schema5-1.6 {
|
||||
catchsql {INSERT INTO t1 VALUES(1,3,4)}
|
||||
} {1 {column a is not unique}}
|
||||
do_test schema5-1.7 {
|
||||
catchsql {INSERT INTO t1 VALUES(10,2,3)}
|
||||
} {1 {columns b, c are not unique}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user