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

Side by Side Diff: third_party/sqlite/src/test/backup.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
« no previous file with comments | « third_party/sqlite/src/test/backcompat.test ('k') | third_party/sqlite/src/test/backup4.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 # 2009 January 30 1 # 2009 January 30
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 sqlite3 db2 $zDestFile 157 sqlite3 db2 $zDestFile
158 set db_dest db2 158 set db_dest db2
159 set file_dest main 159 set file_dest main
160 } { 160 } {
161 sqlite3 db $zSrcFile 161 sqlite3 db $zSrcFile
162 sqlite3 db2 $zDestFile 162 sqlite3 db2 $zDestFile
163 set db_dest db2 163 set db_dest db2
164 set file_dest temp 164 set file_dest temp
165 }] { 165 }] {
166 foreach rows_dest {0 3 10} { 166 foreach rows_dest {0 3 10} {
167 foreach pgsz_dest {512 1024 2048} { 167 foreach pgsz_dest {512 1024 2048 4096} {
168 foreach nPagePerStep {1 200} { 168 foreach nPagePerStep {1 200} {
169 169
170 # Open the databases. 170 # Open the databases.
171 catch { delete_file test.db } 171 catch { delete_file test.db }
172 catch { delete_file test2.db } 172 catch { delete_file test2.db }
173 eval $zOpenScript 173 eval $zOpenScript
174 174
175 # Set to true if copying to an in-memory destination. Copying to an 175 # Set to true if copying to an in-memory destination. Copying to an
176 # in-memory destination is only possible if the initial destination 176 # in-memory destination is only possible if the initial destination
177 # page size is the same as the source page size (in this case 1024 bytes). 177 # page size is the same as the source page size (in this case 1024 bytes).
178 # 178 #
179 set isMemDest [expr { 179 set isMemDest [expr { $zDestFile eq ":memory:" || $file_dest eq "temp" }]
180 $zDestFile eq ":memory:" || $file_dest eq "temp" && $TEMP_STORE>=2
181 }]
182 180
183 if { $isMemDest==0 || $pgsz_dest == 1024 } { 181 if 0 {
184 if 0 { 182 puts -nonewline "Test $iTest: src=$zSrcFile dest=$zDestFile"
185 puts -nonewline "Test $iTest: src=$zSrcFile dest=$zDestFile" 183 puts -nonewline " (as $db_dest.$file_dest)"
186 puts -nonewline " (as $db_dest.$file_dest)" 184 puts -nonewline " rows_dest=$rows_dest pgsz_dest=$pgsz_dest"
187 puts -nonewline " rows_dest=$rows_dest pgsz_dest=$pgsz_dest" 185 puts ""
188 puts "" 186 }
189 } 187
188 if { $isMemDest==0 || $pgsz_dest==1024 || $rows_dest==0 } {
190 189
191 # Set up the content of the source database. 190 # Set up the content of the source database.
192 execsql { 191 execsql {
193 PRAGMA page_size = 1024; 192 PRAGMA page_size = 1024;
194 BEGIN; 193 BEGIN;
195 CREATE TABLE t1(a, b); 194 CREATE TABLE t1(a, b);
196 CREATE INDEX i1 ON t1(a, b); 195 CREATE INDEX i1 ON t1(a, b);
197 INSERT INTO t1 VALUES(1, randstr(1000,1000)); 196 INSERT INTO t1 VALUES(1, randstr(1000,1000));
198 INSERT INTO t1 VALUES(2, randstr(1000,1000)); 197 INSERT INTO t1 VALUES(2, randstr(1000,1000));
199 INSERT INTO t1 VALUES(3, randstr(1000,1000)); 198 INSERT INTO t1 VALUES(3, randstr(1000,1000));
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 } $rc 963 } $rc
965 964
966 do_test backup-10.$tn.6 { 965 do_test backup-10.$tn.6 {
967 B finish 966 B finish
968 } {SQLITE_OK} 967 } {SQLITE_OK}
969 968
970 db2 close 969 db2 close
971 } 970 }
972 971
973 finish_test 972 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/backcompat.test ('k') | third_party/sqlite/src/test/backup4.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698