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

Unified Diff: third_party/sqlite/src/ext/fts5/test/fts5rowid.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
Index: third_party/sqlite/src/ext/fts5/test/fts5rowid.test
diff --git a/third_party/sqlite/src/ext/fts5/test/fts5rowid.test b/third_party/sqlite/src/ext/fts5/test/fts5rowid.test
index 621934c0f2cf08aac38e5ce852ca1d0a0556c415..19590cdf0d819c9cf1208d38c58df09a433192a1 100644
--- a/third_party/sqlite/src/ext/fts5/test/fts5rowid.test
+++ b/third_party/sqlite/src/ext/fts5/test/fts5rowid.test
@@ -63,6 +63,7 @@ do_execsql_test 2.2 {
SELECT rnddoc(6), rnddoc(6) FROM r
)
INSERT INTO x1 SELECT * FROM r LIMIT 10000;
+ DELETE FROM x1 WHERE (rowid%2);
}
set res [db one {SELECT count(*) FROM x1_data}]
@@ -71,8 +72,7 @@ do_execsql_test 2.3 {
} $res
do_execsql_test 2.4 {
UPDATE x1_data SET block = X'';
- -- SELECT count(fts5_decode(rowid, block)) FROM x1_data;
- SELECT count(*) FROM x1_data;
+ SELECT count(fts5_decode(rowid, block)) FROM x1_data;
} $res
do_execsql_test 2.5 {
@@ -184,5 +184,36 @@ do_execsql_test 5.2 {
SELECT count(fts5_decode(rowid, block)) FROM x4_data;
} $res
+#-------------------------------------------------------------------------
+#
+
+do_execsql_test 6.0 {
+ CREATE VIRTUAL TABLE x5 USING fts5(x, detail=none);
+ INSERT INTO x5(x5, rank) VALUES('pgsz', 32);
+ INSERT INTO x5 VALUES('a b c d e f');
+ INSERT INTO x5 VALUES('a b c d e f');
+ INSERT INTO x5 VALUES('a b c d e f');
+ BEGIN;
+ WITH s(i) AS (
+ SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100
+ ) INSERT INTO x5 SELECT 'a b c d e f' FROM s;
+ COMMIT;
+ SELECT count(fts5_decode_none(rowid, block)) FROM x5_data;
+} {32}
+
+do_execsql_test 6.1 {
+ DELETE FROM x5 WHERE rowid <= 2;
+ SELECT count(fts5_decode_none(rowid, block)) FROM x5_data;
+} {34}
+
+do_execsql_test 6.2 {
+ UPDATE x5 SET x='a b c d e f' WHERE rowid=3;
+ SELECT count(fts5_decode_none(rowid, block)) FROM x5_data;
+} {36}
+
+#db eval {SELECT rowid, fts5_decode_none(rowid, block) aS r FROM x5_data} {puts $r}
+
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/ext/fts5/test/fts5rank.test ('k') | third_party/sqlite/src/ext/fts5/test/fts5simple.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698