Index: third_party/sqlite/src/test/select7.test |
diff --git a/third_party/sqlite/src/test/select7.test b/third_party/sqlite/src/test/select7.test |
index 6816b9fcb9924842d5d3ce1d57f4f88b91c47a48..9ed53577481547672e4d77d89e98de23f7e3a1b2 100644 |
--- a/third_party/sqlite/src/test/select7.test |
+++ b/third_party/sqlite/src/test/select7.test |
@@ -15,6 +15,7 @@ |
set testdir [file dirname $argv0] |
source $testdir/tester.tcl |
+set testprefix select7 |
ifcapable compound { |
@@ -201,4 +202,23 @@ do_test select7-7.7 { |
} |
} {text 123} |
+do_execsql_test 8.0 { |
+ CREATE TABLE t01(x, y); |
+ CREATE TABLE t02(x, y); |
+} |
+ |
+do_catchsql_test 8.1 { |
+ SELECT * FROM ( |
+ SELECT * FROM t01 UNION SELECT x FROM t02 |
+ ) WHERE y=1 |
+} {1 {SELECTs to the left and right of UNION do not have the same number of result columns}} |
+ |
+do_catchsql_test 8.2 { |
+ CREATE VIEW v0 as SELECT x, y FROM t01 UNION SELECT x FROM t02; |
+ EXPLAIN QUERY PLAN SELECT * FROM v0 WHERE x='0' OR y; |
+} {1 {SELECTs to the left and right of UNION do not have the same number of result columns}} |
+ |
+ |
finish_test |
+ |
+ |