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

Unified Diff: third_party/sqlite/src/test/join5.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/join2.test ('k') | third_party/sqlite/src/test/journal2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/join5.test
diff --git a/third_party/sqlite/src/test/join5.test b/third_party/sqlite/src/test/join5.test
index 543cd4d27f1d79dc7f719a56d7e9287cbd0d5172..352ffd40a6373b526bb5a376b4bd9c09ba9e792b 100644
--- a/third_party/sqlite/src/test/join5.test
+++ b/third_party/sqlite/src/test/join5.test
@@ -13,10 +13,10 @@
# This file implements tests for left outer joins containing ON
# clauses that restrict the scope of the left term of the join.
#
-# $Id: join5.test,v 1.2 2007/06/08 00:20:48 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix join5
do_test join5-1.1 {
@@ -184,4 +184,32 @@ do_execsql_test join6-4.2 {
LEFT JOIN (SELECT 1) ON fruit='banana';
} {apple {} banana 1}
+#-------------------------------------------------------------------------
+do_execsql_test 5.0 {
+ CREATE TABLE y1(x, y, z);
+ INSERT INTO y1 VALUES(0, 0, 1);
+ CREATE TABLE y2(a);
+}
+
+do_execsql_test 5.1 {
+ SELECT count(z) FROM y1 LEFT JOIN y2 ON x GROUP BY y;
+} 1
+
+do_execsql_test 5.2 {
+ SELECT count(z) FROM ( SELECT * FROM y1 ) LEFT JOIN y2 ON x GROUP BY y;
+} 1
+
+do_execsql_test 5.3 {
+ CREATE VIEW v1 AS SELECT x, y, z FROM y1;
+ SELECT count(z) FROM v1 LEFT JOIN y2 ON x GROUP BY y;
+} 1
+
+do_execsql_test 5.4 {
+ SELECT count(z) FROM ( SELECT * FROM y1 ) LEFT JOIN y2 ON x
+} 1
+
+do_execsql_test 5.5 {
+ SELECT * FROM ( SELECT * FROM y1 ) LEFT JOIN y2 ON x
+} {0 0 1 {}}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/join2.test ('k') | third_party/sqlite/src/test/journal2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698