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

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

Issue 9144001: The complete work-in-progress SQLite recover virtual table. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sigh, forgot to specify baseline. Created 8 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/recover.test ('k') | third_party/sqlite/src/test/recover2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/recover1.test
diff --git a/third_party/sqlite/src/test/recover1.test b/third_party/sqlite/src/test/recover1.test
index e38531b62e32668fdd45bc9fc22aacbf94d3ca64..76d386970a895399a8f6932ac957710b13b9465c 100644
--- a/third_party/sqlite/src/test/recover1.test
+++ b/third_party/sqlite/src/test/recover1.test
@@ -279,4 +279,30 @@ do_test recover-types-6.1 {
execsql {SELECT rowid, id, rowtype, value, TYPEOF(value) FROM types2_recover}
} {1 1 NULL {} null 2 2 INTEGER 17 integer 3 3 FLOAT 3.1415927 real 4 4 TEXT {This is text} text 5 5 BLOB {This is a blob} blob}
+# Inserting an integral value into a FLOAT can use more compact INTEGER
+# storage.
+do_test recover-types-7.0 {
+ db eval {
+ DROP TABLE IF EXISTS floats;
+ CREATE TABLE floats (value);
+ INSERT INTO floats VALUES (CAST (0 AS FLOAT));
+ INSERT INTO floats VALUES (CAST (1 AS FLOAT));
+ INSERT INTO floats VALUES (CAST (2 AS FLOAT));
+ INSERT INTO floats VALUES (1.0);
+ INSERT INTO floats VALUES (2.3);
+
+ DROP TABLE IF EXISTS floats_new;
+ CREATE TABLE floats_new (value);
+ INSERT INTO floats_new SELECT value FROM floats;
+
+ DROP TABLE IF EXISTS floats_recover;
+ CREATE VIRTUAL TABLE temp.floats_recover USING recover(
+ floats,
+ value FLOAT
+ );
+ }
+ execsql {SELECT rowid, value, TYPEOF(value) FROM floats_new}
+ execsql {SELECT rowid, value, TYPEOF(value) FROM floats_recover}
+} {1 0.0 real 2 1.0 real 3 2.0 real 4 1.0 real 5 2.3 real}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/recover.test ('k') | third_party/sqlite/src/test/recover2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698