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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 # 2016 October 21
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 #
12 # This test file focuses on interactions between RBU and the feature
13 # enabled by SQLITE_DIRECT_OVERFLOW_READ - Direct Overflow Read.
14 #
15
16 if {![info exists testdir]} {
17 set testdir [file join [file dirname [info script]] .. .. test]
18 }
19 source $testdir/tester.tcl
20 set ::testprefix rbudor
21
22 set bigA [string repeat a 5000]
23 set bigB [string repeat b 5000]
24 do_execsql_test 1.0 {
25 PRAGMA page_size = 1024;
26 CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
27 INSERT INTO t1 VALUES(1, $bigA);
28 } {}
29
30 do_test 1.1 {
31 forcedelete rbu.db
32 sqlite3 rbu rbu.db
33 rbu eval {
34 CREATE TABLE data_t1(a, b, rbu_control);
35 INSERT INTO data_t1 VALUES(2, $bigB, 0);
36 }
37 rbu close
38 } {}
39
40 do_test 1.2 {
41 sqlite3rbu rbu test.db rbu.db
42 while {[rbu state]!="checkpoint"} {
43 rbu step
44 }
45 rbu step
46 db eval { SELECT * FROM t1 }
47 } [list 1 $bigA 2 $bigB]
48
49 do_test 1.3 {
50 while {[rbu step]=="SQLITE_OK"} {}
51 rbu close
52 } {SQLITE_DONE}
53
54 do_execsql_test 1.4 {
55 SELECT * FROM t1
56 } [list 1 $bigA 2 $bigB]
57
58 finish_test
59
OLDNEW
« 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