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

Unified Diff: third_party/sqlite/src/test/intpkey.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/interrupt2.test ('k') | third_party/sqlite/src/test/io.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/intpkey.test
diff --git a/third_party/sqlite/src/test/intpkey.test b/third_party/sqlite/src/test/intpkey.test
index 41858e5d4616a3706b09df04f27fd6edac8bf521..a56cab4c6927f7adb2fb93819186c316e0b31917 100644
--- a/third_party/sqlite/src/test/intpkey.test
+++ b/third_party/sqlite/src/test/intpkey.test
@@ -296,7 +296,7 @@ do_test intpkey-3.8 {
count {
SELECT * FROM t1 WHERE c=='world' AND a>7;
}
-} {11 hello world 4}
+} {11 hello world 3}
do_test intpkey-3.9 {
count {
SELECT * FROM t1 WHERE 7<a;
@@ -604,5 +604,42 @@ do_test intpkey-15.7 {
}
} {}
+# 2016-04-18 ticket https://www.sqlite.org/src/tktview/7d7525cb01b68712495d3a
+# Be sure to escape quoted typenames.
+#
+do_execsql_test intpkey-16.0 {
+ CREATE TABLE t16a(id "INTEGER" PRIMARY KEY AUTOINCREMENT, b [TEXT], c `INT`);
+} {}
+do_execsql_test intpkey-16.1 {
+ PRAGMA table_info=t16a;
+} {0 id INTEGER 0 {} 1 1 b TEXT 0 {} 0 2 c INT 0 {} 0}
+
+# 2016-05-06 ticket https://www.sqlite.org/src/tktview/16c9801ceba4923939085
+# When the schema contains an index on the IPK and no other index
+# and a WHERE clause on a delete uses an OR where both sides referencing
+# the IPK, then it is possible that the OP_Delete will fail because there
+# deferred seek of the OP_Seek is not resolved prior to reaching the OP_Delete.
+#
+do_execsql_test intpkey-17.0 {
+ CREATE TABLE t17(x INTEGER PRIMARY KEY, y TEXT);
+ INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
+ CREATE INDEX t17x ON t17(x);
+ DELETE FROM t17 WHERE x=99 OR x<130;
+ SELECT * FROM t17;
+} {248 giraffe}
+do_execsql_test intpkey-17.1 {
+ DROP INDEX t17x;
+ DELETE FROM t17;
+ INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
+ CREATE UNIQUE INDEX t17x ON t17(abs(x));
+ DELETE FROM t17 WHERE abs(x) IS NULL OR abs(x)<130;
+ SELECT * FROM t17;
+} {248 giraffe}
+do_execsql_test intpkey-17.2 {
+ DELETE FROM t17;
+ INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
+ UPDATE t17 SET y='ostrich' WHERE abs(x)=248;
+ SELECT * FROM t17 ORDER BY +x;
+} {123 elephant 248 ostrich}
finish_test
« no previous file with comments | « third_party/sqlite/src/test/interrupt2.test ('k') | third_party/sqlite/src/test/io.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698