summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/src/test/in.test
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/sqlite/src/test/in.test')
-rw-r--r--third_party/sqlite/src/test/in.test37
1 files changed, 33 insertions, 4 deletions
diff --git a/third_party/sqlite/src/test/in.test b/third_party/sqlite/src/test/in.test
index 8fbfbed..2c38a0f 100644
--- a/third_party/sqlite/src/test/in.test
+++ b/third_party/sqlite/src/test/in.test
@@ -404,33 +404,62 @@ do_test in-12.5 {
do_test in-12.6 {
catchsql {
SELECT * FROM t2 WHERE a IN (
- SELECT a FROM t3 UNION ALL SELECT a, b FROM t2
+ SELECT a, b FROM t3 UNION ALL SELECT a FROM t2
);
}
} {1 {SELECTs to the left and right of UNION ALL do not have the same number of result columns}}
do_test in-12.7 {
catchsql {
SELECT * FROM t2 WHERE a IN (
- SELECT a FROM t3 UNION SELECT a, b FROM t2
+ SELECT a, b FROM t3 UNION SELECT a FROM t2
);
}
} {1 {SELECTs to the left and right of UNION do not have the same number of result columns}}
do_test in-12.8 {
catchsql {
SELECT * FROM t2 WHERE a IN (
- SELECT a FROM t3 EXCEPT SELECT a, b FROM t2
+ SELECT a, b FROM t3 EXCEPT SELECT a FROM t2
);
}
} {1 {SELECTs to the left and right of EXCEPT do not have the same number of result columns}}
do_test in-12.9 {
catchsql {
SELECT * FROM t2 WHERE a IN (
- SELECT a FROM t3 INTERSECT SELECT a, b FROM t2
+ SELECT a, b FROM t3 INTERSECT SELECT a FROM t2
);
}
} {1 {SELECTs to the left and right of INTERSECT do not have the same number of result columns}}
}
+do_test in-12.10 {
+ catchsql {
+ SELECT * FROM t2 WHERE a IN (
+ SELECT a FROM t3 UNION ALL SELECT a, b FROM t2
+ );
+ }
+} {1 {only a single result allowed for a SELECT that is part of an expression}}
+do_test in-12.11 {
+ catchsql {
+ SELECT * FROM t2 WHERE a IN (
+ SELECT a FROM t3 UNION SELECT a, b FROM t2
+ );
+ }
+} {1 {only a single result allowed for a SELECT that is part of an expression}}
+do_test in-12.12 {
+ catchsql {
+ SELECT * FROM t2 WHERE a IN (
+ SELECT a FROM t3 EXCEPT SELECT a, b FROM t2
+ );
+ }
+} {1 {only a single result allowed for a SELECT that is part of an expression}}
+do_test in-12.13 {
+ catchsql {
+ SELECT * FROM t2 WHERE a IN (
+ SELECT a FROM t3 INTERSECT SELECT a, b FROM t2
+ );
+ }
+} {1 {only a single result allowed for a SELECT that is part of an expression}}
+
#------------------------------------------------------------------------
# The following tests check that NULL is handled correctly when it