1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-06-23 22:01:42 +03:00

Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330)

FossilOrigin-Name: 6fcb3bffe26ae1c21c72ce9019f1db1c118094a4
This commit is contained in:
danielk1977
2008-06-30 18:12:28 +00:00
parent 63703a42f1
commit daf79acb68
4 changed files with 55 additions and 42 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing VIEW statements.
#
# $Id: view.test,v 1.35 2008/01/25 15:04:50 drh Exp $
# $Id: view.test,v 1.36 2008/06/30 18:12:28 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -514,5 +514,23 @@ do_test view-17.2 {
}
} {1 {no such view: main.nosuchview}}
do_test view-18.1 {
execsql {
DROP VIEW t1;
DROP TABLE t1;
CREATE TABLE t1(a, b, c);
INSERT INTO t1 VALUES(1, 2, 3);
INSERT INTO t1 VALUES(4, 5, 6);
CREATE VIEW vv1 AS SELECT * FROM t1;
CREATE VIEW vv2 AS SELECT * FROM vv1;
CREATE VIEW vv3 AS SELECT * FROM vv2;
CREATE VIEW vv4 AS SELECT * FROM vv3;
CREATE VIEW vv5 AS SELECT * FROM vv4;
SELECT * FROM vv5;
}
} {1 2 3 4 5 6}
finish_test