Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1484)

Unified Diff: third_party/sqlite/src/test/selectC.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/selectA.test ('k') | third_party/sqlite/src/test/session.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/selectC.test
diff --git a/third_party/sqlite/src/test/selectC.test b/third_party/sqlite/src/test/selectC.test
index dedac41fc474dd816bf798a114fbdbcd4cc159c3..4d7996300745a89bd6d91de6dedc9300a59f2626 100644
--- a/third_party/sqlite/src/test/selectC.test
+++ b/third_party/sqlite/src/test/selectC.test
@@ -14,6 +14,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix selectC
# Ticket #
do_test selectC-1.1 {
@@ -233,4 +234,37 @@ do_execsql_test selectC-4.3 {
select a, udf() from (select distinct a, b from t_distinct_bug)
} {1 1 1 2 1 3}
+#-------------------------------------------------------------------------
+# Test that the problem in ticket #190c2507 has been fixed.
+#
+do_execsql_test 5.0 {
+ CREATE TABLE x1(a);
+ CREATE TABLE x2(b);
+ CREATE TABLE x3(c);
+ CREATE VIEW vvv AS SELECT b FROM x2 ORDER BY 1;
+
+ INSERT INTO x1 VALUES('a'), ('b');
+ INSERT INTO x2 VALUES(22), (23), (25), (24), (21);
+ INSERT INTO x3 VALUES(302), (303), (301);
+}
+
+do_execsql_test 5.1 {
+ CREATE TABLE x4 AS SELECT b FROM vvv UNION ALL SELECT c from x3;
+ SELECT * FROM x4;
+} {21 22 23 24 25 302 303 301}
+
+do_execsql_test 5.2 {
+ SELECT * FROM x1, x4
+} {
+ a 21 a 22 a 23 a 24 a 25 a 302 a 303 a 301
+ b 21 b 22 b 23 b 24 b 25 b 302 b 303 b 301
+}
+
+do_execsql_test 5.3 {
+ SELECT * FROM x1, (SELECT b FROM vvv UNION ALL SELECT c from x3);
+} {
+ a 21 a 22 a 23 a 24 a 25 a 302 a 303 a 301
+ b 21 b 22 b 23 b 24 b 25 b 302 b 303 b 301
+}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/selectA.test ('k') | third_party/sqlite/src/test/session.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698