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

Unified Diff: third_party/sqlite/src/ext/rbu/rbudor.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/ext/rbu/rbudiff.test ('k') | third_party/sqlite/src/ext/rbu/rbufault3.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/rbu/rbudor.test
diff --git a/third_party/sqlite/src/ext/rbu/rbudor.test b/third_party/sqlite/src/ext/rbu/rbudor.test
new file mode 100644
index 0000000000000000000000000000000000000000..dcee7ac381eb02dad4cdb9d397ff3baa5e54c7fe
--- /dev/null
+++ b/third_party/sqlite/src/ext/rbu/rbudor.test
@@ -0,0 +1,59 @@
+# 2016 October 21
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+#
+# This test file focuses on interactions between RBU and the feature
+# enabled by SQLITE_DIRECT_OVERFLOW_READ - Direct Overflow Read.
+#
+
+if {![info exists testdir]} {
+ set testdir [file join [file dirname [info script]] .. .. test]
+}
+source $testdir/tester.tcl
+set ::testprefix rbudor
+
+set bigA [string repeat a 5000]
+set bigB [string repeat b 5000]
+do_execsql_test 1.0 {
+ PRAGMA page_size = 1024;
+ CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
+ INSERT INTO t1 VALUES(1, $bigA);
+} {}
+
+do_test 1.1 {
+ forcedelete rbu.db
+ sqlite3 rbu rbu.db
+ rbu eval {
+ CREATE TABLE data_t1(a, b, rbu_control);
+ INSERT INTO data_t1 VALUES(2, $bigB, 0);
+ }
+ rbu close
+} {}
+
+do_test 1.2 {
+ sqlite3rbu rbu test.db rbu.db
+ while {[rbu state]!="checkpoint"} {
+ rbu step
+ }
+ rbu step
+ db eval { SELECT * FROM t1 }
+} [list 1 $bigA 2 $bigB]
+
+do_test 1.3 {
+ while {[rbu step]=="SQLITE_OK"} {}
+ rbu close
+} {SQLITE_DONE}
+
+do_execsql_test 1.4 {
+ SELECT * FROM t1
+} [list 1 $bigA 2 $bigB]
+
+finish_test
+
« no previous file with comments | « third_party/sqlite/src/ext/rbu/rbudiff.test ('k') | third_party/sqlite/src/ext/rbu/rbufault3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698