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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/ioerr5.test ('k') | third_party/sqlite/src/test/join6.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/join.test
diff --git a/third_party/sqlite/src/test/join.test b/third_party/sqlite/src/test/join.test
index 7fecbe876e5f574992578767a7779931cf8f9784..88ac04f950a0ab88ed40e4f5ec5c816126c62e95 100644
--- a/third_party/sqlite/src/test/join.test
+++ b/third_party/sqlite/src/test/join.test
@@ -576,4 +576,69 @@ ifcapable subquery {
} ;# ifcapable subquery
+#-------------------------------------------------------------------------
+# The following tests are to ensure that bug b73fb0bd64 is fixed.
+#
+do_test join-11.1 {
+ drop_all_tables
+ execsql {
+ CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
+ CREATE TABLE t2(a INTEGER PRIMARY KEY, b TEXT);
+ INSERT INTO t1 VALUES(1,'abc');
+ INSERT INTO t1 VALUES(2,'def');
+ INSERT INTO t2 VALUES(1,'abc');
+ INSERT INTO t2 VALUES(2,'def');
+ SELECT * FROM t1 NATURAL JOIN t2;
+ }
+} {1 abc 2 def}
+
+do_test join-11.2 {
+ execsql { SELECT a FROM t1 JOIN t1 USING (a)}
+} {1 2}
+do_test join-11.3 {
+ execsql { SELECT a FROM t1 JOIN t1 AS t2 USING (a)}
+} {1 2}
+do_test join-11.3 {
+ execsql { SELECT * FROM t1 NATURAL JOIN t1 AS t2}
+} {1 abc 2 def}
+do_test join-11.4 {
+ execsql { SELECT * FROM t1 NATURAL JOIN t1 }
+} {1 abc 2 def}
+
+do_test join-11.5 {
+ drop_all_tables
+ execsql {
+ CREATE TABLE t1(a COLLATE nocase, b);
+ CREATE TABLE t2(a, b);
+ INSERT INTO t1 VALUES('ONE', 1);
+ INSERT INTO t1 VALUES('two', 2);
+ INSERT INTO t2 VALUES('one', 1);
+ INSERT INTO t2 VALUES('two', 2);
+ }
+} {}
+do_test join-11.6 {
+ execsql { SELECT * FROM t1 NATURAL JOIN t2 }
+} {ONE 1 two 2}
+do_test join-11.7 {
+ execsql { SELECT * FROM t2 NATURAL JOIN t1 }
+} {two 2}
+
+do_test join-11.8 {
+ drop_all_tables
+ execsql {
+ CREATE TABLE t1(a, b TEXT);
+ CREATE TABLE t2(b INTEGER, a);
+ INSERT INTO t1 VALUES('one', '1.0');
+ INSERT INTO t1 VALUES('two', '2');
+ INSERT INTO t2 VALUES(1, 'one');
+ INSERT INTO t2 VALUES(2, 'two');
+ }
+} {}
+do_test join-11.9 {
+ execsql { SELECT * FROM t1 NATURAL JOIN t2 }
+} {one 1.0 two 2}
+do_test join-11.10 {
+ execsql { SELECT * FROM t2 NATURAL JOIN t1 }
+} {1 one 2 two}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/ioerr5.test ('k') | third_party/sqlite/src/test/join6.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698