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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/whereD.test ('k') | third_party/sqlite/src/test/whereJ.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/whereG.test
diff --git a/third_party/sqlite/src/test/whereG.test b/third_party/sqlite/src/test/whereG.test
index c2c54db4553be23a1b6a94bed7e4144decf841aa..110ed5dbd46ca5af130934a028067a365ad80133 100644
--- a/third_party/sqlite/src/test/whereG.test
+++ b/third_party/sqlite/src/test/whereG.test
@@ -230,4 +230,41 @@ do_eqp_test 5.3.3 {
SELECT * FROM t1 WHERE likely(a=?)
} {0 0 0 {SCAN TABLE t1}}
+# 2015-06-18
+# Ticket [https://www.sqlite.org/see/tktview/472f0742a1868fb58862bc588ed70]
+#
+do_execsql_test 6.0 {
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1(i int, x, y, z);
+ INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3), (4,4,4,4);
+ DROP TABLE IF EXISTS t2;
+ CREATE TABLE t2(i int, bool char);
+ INSERT INTO t2 VALUES(1,'T'), (2,'F');
+ SELECT count(*) FROM t1 LEFT JOIN t2 ON t1.i=t2.i AND bool='T';
+ SELECT count(*) FROM t1 LEFT JOIN t2 ON likely(t1.i=t2.i) AND bool='T';
+} {4 4}
+
+# 2015-06-20
+# Crash discovered by AFL
+#
+do_execsql_test 7.0 {
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1(a, b, PRIMARY KEY(a,b));
+ INSERT INTO t1 VALUES(9,1),(1,2);
+ DROP TABLE IF EXISTS t2;
+ CREATE TABLE t2(x, y, PRIMARY KEY(x,y));
+ INSERT INTO t2 VALUES(3,3),(4,4);
+ SELECT likely(a), x FROM t1, t2 ORDER BY 1, 2;
+} {1 3 1 4 9 3 9 4}
+do_execsql_test 7.1 {
+ SELECT unlikely(a), x FROM t1, t2 ORDER BY 1, 2;
+} {1 3 1 4 9 3 9 4}
+do_execsql_test 7.2 {
+ SELECT likelihood(a,0.5), x FROM t1, t2 ORDER BY 1, 2;
+} {1 3 1 4 9 3 9 4}
+do_execsql_test 7.3 {
+ SELECT coalesce(a,a), x FROM t1, t2 ORDER BY 1, 2;
+} {1 3 1 4 9 3 9 4}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/whereD.test ('k') | third_party/sqlite/src/test/whereJ.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698