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

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

Issue 1671773003: [sqlite] Fix bug in how recover virtual table handles empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/test/recover.test
diff --git a/third_party/sqlite/src/test/recover.test b/third_party/sqlite/src/test/recover.test
index b5aa1829f2c76816256e30a0f1bb275d85c925ee..bfb788814866622acf523704fc027b06060d0160 100644
--- a/third_party/sqlite/src/test/recover.test
+++ b/third_party/sqlite/src/test/recover.test
@@ -110,6 +110,23 @@ do_test recover-leaf-1.0 {
execsql {SELECT t, n FROM leaf_recover ORDER BY rowid}
} {{Leaf-node-generating line 0} 0 {Leaf-node-generating line 1} 1 {Leaf-node-generating line 2} 2 {Leaf-node-generating line 3} 3 {Leaf-node-generating line 4} 4 {Leaf-node-generating line 5} 5 {Leaf-node-generating line 6} 6 {Leaf-node-generating line 7} 7 {Leaf-node-generating line 8} 8 {Leaf-node-generating line 9} 9}
+# Empty table gives empty results.
+do_test recover-leaf-2.0 {
+ db close
+ sqlite3 db test.db
+ generate "empty" "Leaf-node-generating line " 0
+
+ db eval {
+ DROP TABLE IF EXISTS temp.leaf_recover;
+ CREATE VIRTUAL TABLE temp.leaf_recover USING recover(
+ empty,
+ t TEXT,
+ n INTEGER
+ );
+ }
+ execsql {SELECT t, n FROM leaf_recover ORDER BY rowid}
+} {}
+
# Single level of interior node.
do_test recover-interior-1.0 {
db close
« third_party/sqlite/src/src/recover.c ('K') | « third_party/sqlite/src/src/recover.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698