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

Add a test to whereI.test that uses a multi-column PK.

FossilOrigin-Name: aa183e60929bdbbcea3c436dd8cc674fc44ad09a
This commit is contained in:
dan
2014-05-27 11:42:23 +00:00
parent 1529908001
commit c2070c7d96
3 changed files with 27 additions and 9 deletions

View File

@ -69,6 +69,24 @@ do_execsql_test 2.3 {
SELECT a FROM t2 WHERE b='a' OR c='z'
} {i}
#----------------------------------------------------------------------
# On a table with a multi-column PK.
#
do_execsql_test 3.0 {
CREATE TABLE t3(a, b, c, d, PRIMARY KEY(c, b)) WITHOUT ROWID;
INSERT INTO t3 VALUES('f', 1, 1, 'o');
INSERT INTO t3 VALUES('o', 2, 1, 't');
INSERT INTO t3 VALUES('t', 1, 2, 't');
INSERT INTO t3 VALUES('t', 2, 2, 'f');
CREATE INDEX t3i1 ON t3(d);
CREATE INDEX t3i2 ON t3(a);
SELECT c||'.'||b FROM t3 WHERE a='t' OR d='t'
} {
2.1 2.2 1.2
}
finish_test