mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-22 00:15:20 +01:00
testing/sqlite3: Disable SELECT tests that require views
This commit is contained in:
@@ -38,22 +38,23 @@ ifcapable tempdb {
|
||||
|
||||
# Nested views do not handle * properly. Ticket #826.
|
||||
#
|
||||
ifcapable view {
|
||||
do_test select7-2.1 {
|
||||
execsql {
|
||||
CREATE TABLE x(id integer primary key, a TEXT NULL);
|
||||
INSERT INTO x (a) VALUES ('first');
|
||||
CREATE TABLE tempx(id integer primary key, a TEXT NULL);
|
||||
INSERT INTO tempx (a) VALUES ('t-first');
|
||||
CREATE VIEW tv1 AS SELECT x.id, tx.id FROM x JOIN tempx tx ON tx.id=x.id;
|
||||
CREATE VIEW tv1b AS SELECT x.id, tx.id FROM x JOIN tempx tx on tx.id=x.id;
|
||||
CREATE VIEW tv2 AS SELECT * FROM tv1 UNION SELECT * FROM tv1b;
|
||||
SELECT * FROM tv2;
|
||||
}
|
||||
} {1 1}
|
||||
} ;# ifcapable view
|
||||
|
||||
} ;# ifcapable compound
|
||||
# TODO: Views are not supported
|
||||
#ifcapable view {
|
||||
#do_test select7-2.1 {
|
||||
# execsql {
|
||||
# CREATE TABLE x(id integer primary key, a TEXT NULL);
|
||||
# INSERT INTO x (a) VALUES ('first');
|
||||
# CREATE TABLE tempx(id integer primary key, a TEXT NULL);
|
||||
# INSERT INTO tempx (a) VALUES ('t-first');
|
||||
# CREATE VIEW tv1 AS SELECT x.id, tx.id FROM x JOIN tempx tx ON tx.id=x.id;
|
||||
# CREATE VIEW tv1b AS SELECT x.id, tx.id FROM x JOIN tempx tx on tx.id=x.id;
|
||||
# CREATE VIEW tv2 AS SELECT * FROM tv1 UNION SELECT * FROM tv1b;
|
||||
# SELECT * FROM tv2;
|
||||
# }
|
||||
#} {1 1}
|
||||
#} ;# ifcapable view
|
||||
#
|
||||
#} ;# ifcapable compound
|
||||
|
||||
# Do not allow GROUP BY without an aggregate. Ticket #1039.
|
||||
#
|
||||
@@ -241,10 +242,11 @@ do_catchsql_test 8.1 {
|
||||
) 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}}
|
||||
# TODO: Views are not supported
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user