| OLD | NEW |
| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 execsql " | 210 execsql " |
| 211 BEGIN; | 211 BEGIN; |
| 212 CREATE TABLE ${file_dest}.t1(a, b); | 212 CREATE TABLE ${file_dest}.t1(a, b); |
| 213 CREATE INDEX ${file_dest}.i1 ON t1(a, b); | 213 CREATE INDEX ${file_dest}.i1 ON t1(a, b); |
| 214 " $db_dest | 214 " $db_dest |
| 215 for {set ii 0} {$ii < $rows_dest} {incr ii} { | 215 for {set ii 0} {$ii < $rows_dest} {incr ii} { |
| 216 execsql " | 216 execsql " |
| 217 INSERT INTO ${file_dest}.t1 VALUES(1, randstr(1000,1000)) | 217 INSERT INTO ${file_dest}.t1 VALUES(1, randstr(1000,1000)) |
| 218 " $db_dest | 218 " $db_dest |
| 219 } | 219 } |
| 220 execsql COMMIT $db_dest |
| 220 } | 221 } |
| 221 | 222 |
| 222 # Backup the source database. | 223 # Backup the source database. |
| 223 do_test backup-2.$iTest.1 { | 224 do_test backup-2.$iTest.1 { |
| 224 sqlite3_backup B $db_dest $file_dest db main | 225 sqlite3_backup B $db_dest $file_dest db main |
| 225 while {[B step $nPagePerStep]=="SQLITE_OK"} {} | 226 while {[B step $nPagePerStep]=="SQLITE_OK"} {} |
| 226 B finish | 227 B finish |
| 227 } {SQLITE_OK} | 228 } {SQLITE_OK} |
| 228 | 229 |
| 229 # Run integrity check on the backup. | 230 # Run integrity check on the backup. |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 } $rc | 964 } $rc |
| 964 | 965 |
| 965 do_test backup-10.$tn.6 { | 966 do_test backup-10.$tn.6 { |
| 966 B finish | 967 B finish |
| 967 } {SQLITE_OK} | 968 } {SQLITE_OK} |
| 968 | 969 |
| 969 db2 close | 970 db2 close |
| 970 } | 971 } |
| 971 | 972 |
| 972 finish_test | 973 finish_test |
| OLD | NEW |