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

Unified Diff: third_party/sqlite/src/test/join2.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/io.test ('k') | third_party/sqlite/src/test/join5.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/join2.test
diff --git a/third_party/sqlite/src/test/join2.test b/third_party/sqlite/src/test/join2.test
index 0f558c5a3df6dc027c3c0c54a06d6927cd98528f..9372e770c33c439d974c20d0235df6de2a1d6738 100644
--- a/third_party/sqlite/src/test/join2.test
+++ b/third_party/sqlite/src/test/join2.test
@@ -12,10 +12,10 @@
#
# This file implements tests for joins, including outer joins.
#
-# $Id: join2.test,v 1.2 2005/01/21 03:12:16 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix join2
do_test join2-1.1 {
execsql {
@@ -72,4 +72,24 @@ ifcapable subquery {
} {1 11 111 1111 2 22 {} {} 3 33 {} {}}
}
+#-------------------------------------------------------------------------
+# Check that ticket [25e335f802ddc] has been resolved. It should be an
+# error for the ON clause of a LEFT JOIN to refer to a table to its right.
+#
+do_execsql_test 2.0 {
+ CREATE TABLE aa(a);
+ CREATE TABLE bb(b);
+ CREATE TABLE cc(c);
+ INSERT INTO aa VALUES('one');
+ INSERT INTO bb VALUES('one');
+ INSERT INTO cc VALUES('one');
+}
+
+do_catchsql_test 2.1 {
+ SELECT * FROM aa LEFT JOIN cc ON (a=b) JOIN bb ON (b=c);
+} {1 {ON clause references tables to its right}}
+do_catchsql_test 2.2 {
+ SELECT * FROM aa JOIN cc ON (a=b) JOIN bb ON (b=c);
+} {0 {one one one}}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/io.test ('k') | third_party/sqlite/src/test/join5.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698