summaryrefslogtreecommitdiff
path: root/test/select4.test
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:35 -0400
committerHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:35 -0400
commit569c6676a6ddb0ff73821d7693b5e18ddef809b9 (patch)
tree833538da7bba39105daff45e265aef386a200acd /test/select4.test
parent08119c361d1181b3e8f1abb429236e488a664753 (diff)
Imported Upstream version 3.2.0upstream
Diffstat (limited to 'test/select4.test')
-rw-r--r--test/select4.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/select4.test b/test/select4.test
index e205b37..8fc200d 100644
--- a/test/select4.test
+++ b/test/select4.test
@@ -824,4 +824,40 @@ do_test select4-13.1 {
}
} {1 2}
+# 2014-02-18: Make sure compound SELECTs work with VALUES clauses
+#
+do_execsql_test select4-14.1 {
+ CREATE TABLE t14(a,b,c);
+ INSERT INTO t14 VALUES(1,2,3),(4,5,6);
+ SELECT * FROM t14 INTERSECT VALUES(3,2,1),(2,3,1),(1,2,3),(2,1,3);
+} {1 2 3}
+do_execsql_test select4-14.2 {
+ SELECT * FROM t14 INTERSECT VALUES(1,2,3);
+} {1 2 3}
+do_execsql_test select4-14.3 {
+ SELECT * FROM t14
+ UNION VALUES(3,2,1),(2,3,1),(1,2,3),(7,8,9),(4,5,6)
+ UNION SELECT * FROM t14 ORDER BY 1, 2, 3
+} {1 2 3 2 3 1 3 2 1 4 5 6 7 8 9}
+do_execsql_test select4-14.4 {
+ SELECT * FROM t14
+ UNION VALUES(3,2,1)
+ UNION SELECT * FROM t14 ORDER BY 1, 2, 3
+} {1 2 3 3 2 1 4 5 6}
+do_execsql_test select4-14.5 {
+ SELECT * FROM t14 EXCEPT VALUES(3,2,1),(2,3,1),(1,2,3),(2,1,3);
+} {4 5 6}
+do_execsql_test select4-14.6 {
+ SELECT * FROM t14 EXCEPT VALUES(1,2,3)
+} {4 5 6}
+do_execsql_test select4-14.7 {
+ SELECT * FROM t14 EXCEPT VALUES(1,2,3) EXCEPT VALUES(4,5,6)
+} {}
+do_execsql_test select4-14.8 {
+ SELECT * FROM t14 EXCEPT VALUES('a','b','c') EXCEPT VALUES(4,5,6)
+} {1 2 3}
+do_execsql_test select4-14.9 {
+ SELECT * FROM t14 UNION ALL VALUES(3,2,1),(2,3,1),(1,2,3),(2,1,3);
+} {1 2 3 4 5 6 3 2 1 2 3 1 1 2 3 2 1 3}
+
finish_test