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

Side by Side Diff: third_party/sqlite/src/test/multiplex4.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/mmap1.test ('k') | third_party/sqlite/src/test/mutex1.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2014-09-25 1 # 2014-09-25
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } {mx4test.001 mx4test.db} 52 } {mx4test.001 mx4test.db}
53 53
54 do_test multiplex4-1.1 { 54 do_test multiplex4-1.1 {
55 db eval { 55 db eval {
56 DELETE FROM t1; 56 DELETE FROM t1;
57 VACUUM; 57 VACUUM;
58 } 58 }
59 multiplex_file_list mx4test 59 multiplex_file_list mx4test
60 } {mx4test.db} 60 } {mx4test.db}
61 61
62 # NB: The PRAGMA multiplex_truncate command is implemented using the
63 # SQLITE_FCNTL_PRAGMA file-control...
64 #
65 # EVIDENCE-OF: R-12238-55120 Whenever a PRAGMA statement is parsed, an
66 # SQLITE_FCNTL_PRAGMA file control is sent to the open sqlite3_file
67 # object corresponding to the database file to which the pragma
68 # statement refers.
69 #
62 do_test multiplex4-1.2 { 70 do_test multiplex4-1.2 {
63 db eval {PRAGMA multiplex_truncate} 71 db eval {PRAGMA multiplex_truncate}
64 } {on} 72 } {on}
65 do_test multiplex4-1.3 { 73 do_test multiplex4-1.3 {
66 db eval {PRAGMA multiplex_truncate=off} 74 db eval {PRAGMA multiplex_truncate=off}
67 } {off} 75 } {off}
68 do_test multiplex4-1.4 { 76 do_test multiplex4-1.4 {
69 db eval {PRAGMA multiplex_truncate} 77 db eval {PRAGMA multiplex_truncate}
70 } {off} 78 } {off}
71 do_test multiplex4-1.5 { 79 do_test multiplex4-1.5 {
72 db eval {PRAGMA multiplex_truncate=on} 80 db eval {PRAGMA multiplex_truncate=on}
73 } {on} 81 } {on}
74 do_test multiplex4-1.6 { 82 do_test multiplex4-1.6 {
75 db eval {PRAGMA multiplex_truncate} 83 db eval {PRAGMA multiplex_truncate}
76 } {on} 84 } {on}
77 do_test multiplex4-1.7 { 85 do_test multiplex4-1.7 {
78 db eval {PRAGMA multiplex_truncate=0} 86 db eval {PRAGMA multiplex_truncate=0}
79 } {off} 87 } {off}
80 do_test multiplex4-1.8 { 88 do_test multiplex4-1.8 {
81 db eval {PRAGMA multiplex_truncate=1} 89 db eval {PRAGMA multiplex_truncate=1}
82 } {on} 90 } {on}
83 do_test multiplex4-1.9 { 91 do_test multiplex4-1.9 {
84 db eval {PRAGMA multiplex_truncate=0} 92 db eval {PRAGMA multiplex_truncate=0}
85 } {off} 93 } {off}
86 94
95 # EVIDENCE-OF: R-26188-08449 If the SQLITE_FCNTL_PRAGMA file control
96 # returns SQLITE_OK, then the parser assumes that the VFS has handled
97 # the PRAGMA itself and the parser generates a no-op prepared statement
98 # if result string is NULL, or that returns a copy of the result string
99 # if the string is non-NULL.
100 #
101 do_test multiplex4-1.9-explain {
102 db eval {EXPLAIN PRAGMA multiplex_truncate=0;}
103 } {/String8 \d \d \d off/}
104
87 do_test multiplex4-1.10 { 105 do_test multiplex4-1.10 {
88 db eval { 106 db eval {
89 INSERT INTO t1(x) VALUES(randomblob(250000)); 107 INSERT INTO t1(x) VALUES(randomblob(250000));
90 } 108 }
91 multiplex_file_list mx4test 109 multiplex_file_list mx4test
92 } {mx4test.001 mx4test.db} 110 } {mx4test.001 mx4test.db}
93 111
94 do_test multiplex4-1.11 { 112 do_test multiplex4-1.11 {
95 db eval { 113 db eval {
96 DELETE FROM t1; 114 DELETE FROM t1;
97 VACUUM; 115 VACUUM;
98 } 116 }
99 multiplex_file_list mx4test 117 multiplex_file_list mx4test
100 } {mx4test.001 mx4test.db} 118 } {mx4test.001 mx4test.db}
101 119
102 do_test multiplex4-1.12 { 120 do_test multiplex4-1.12 {
103 db eval { 121 db eval {
104 PRAGMA multiplex_truncate=ON; 122 PRAGMA multiplex_truncate=ON;
105 DROP TABLE t1; 123 DROP TABLE t1;
106 VACUUM; 124 VACUUM;
107 } 125 }
108 multiplex_file_list mx4test 126 multiplex_file_list mx4test
109 } {mx4test.db} 127 } {mx4test.db}
110 128
111 catch { db close } 129 catch { db close }
112 forcedelete mx4test.db 130 forcedelete mx4test.db
113 sqlite3_multiplex_shutdown 131 sqlite3_multiplex_shutdown
114 finish_test 132 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/mmap1.test ('k') | third_party/sqlite/src/test/mutex1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698