Lines Matching refs:db
28 catch { db close }
29 forcedelete test.db test.db-wal test.db-wal-summary
30 sqlite3_wal db test.db
46 db timeout 1000
72 file size test.db
80 list [file exists test.db-journal] \
81 [file exists test.db-wal] \
82 [file size test.db]
86 list [file exists test.db-journal] [file exists test.db-wal]
90 file size test.db-wal
110 sqlite3_wal db2 ./test.db
177 db close
178 sqlite3 db test.db
179 db func blob blob
180 list [execsql { SELECT * FROM t1 }] [file size test.db-wal]
205 set logsize [file size test.db-wal]
210 expr { $logsize == [file size test.db-wal] }
216 forcecopy test.db test2.db
217 forcecopy test.db-wal test2.db-wal
218 sqlite3 db2 test2.db
228 db func blob blob
234 sqlite3 db test.db
235 db func blob blob
236 list [execsql { SELECT * FROM t1 }] [file size test.db-wal]
262 set logsize [file size test.db-wal]
268 expr { $logsize == [file size test.db-wal] }
274 forcecopy test.db test2.db
275 forcecopy test.db-wal test2.db-wal
276 sqlite3 db2 test2.db
334 db close
339 forcedelete test.db test.db-wal
341 sqlite3 db test.db -vfs devsym
351 db close
352 file size test.db
356 log_deleted test.db-wal
362 forcedelete test.db test.db-wal
363 sqlite3_wal db test.db
369 list [file size test.db] [file size test.db-wal]
373 list [file size test.db] [file size test.db-wal]
381 catch { db close }
382 forcedelete test.db test.db-wal
384 sqlite3 db test.db
385 db function blob blob
405 file size test.db
412 file size test.db
433 file size test.db
436 sqlite3_wal db2 test.db
441 forcedelete test2.db test2.db-wal
442 copy_file test.db test2.db
443 copy_file test.db-wal test2.db-wal
444 sqlite3_wal db3 test2.db
452 sqlite3_wal db2 test.db
456 foreach handle {db db2 db3} { catch { $handle close } }
479 # Open a transaction and write to the database using [db]. Check that [db2]
487 # Have [db] commit the transaction. Check that [db2] is now seeing the
495 # Have [db2] open a read transaction. Then write to the db via [db]. Check
514 # database via [db]. This should fail (writer lock cannot be obtained).
516 # Then open a read-transaction with [db]. Commit the [db2] transaction
517 # to disk. Verify that [db] still cannot write to the database (because
520 # Close the current [db] transaction. Open a new one. [db] can now write
521 # to the database (as it is not locked and [db] is reading the latest
543 # Open a read transaction with [db2]. Check that this prevents [db] from
686 list [expr [file size test.db]/1024] [expr [file size test.db-wal]/1044]
690 list [expr [file size test.db]/1024] [file size test.db-wal]
694 list [expr [file size test.db]/1024] [file size test.db-wal]
705 list [expr [file size test.db]/1024] [file size test.db-wal]
715 list [expr [file size test.db]/1024] [file size test.db-wal]
725 list [expr [file size test.db]/1024] [file size test.db-wal]
728 db close
729 list [expr [file size test.db]/1024] [log_deleted test.db-wal]
731 sqlite3_wal db test.db
749 list [expr [file size test.db]/1024] [file size test.db-wal]
759 list [expr [file size test.db]/1024] [file size test.db-wal]
769 list [expr [file size test.db]/1024] [file size test.db-wal]
786 list [expr [file size test.db]/1024] [file size test.db-wal]
789 db close
790 sqlite3 db test.db
795 list [expr [file size test.db]/1024] [expr [file size test.db-wal]/1044]
799 list [expr [file size test.db]/1024] [expr [file size test.db-wal]/1044]
802 forcecopy test.db test2.db
803 forcecopy test.db-wal test2.db-wal
804 sqlite3_wal db2 test2.db
820 forcecopy test.db test2.db
821 forcecopy test.db-wal test2.db-wal
822 sqlite3_wal db2 test2.db
826 db close
836 catch { db close }
839 forcedelete test.db test.db-wal
840 sqlite3 db test.db
841 sqlite3 db2 test.db
859 # After executing the "PRAGMA wal_checkpoint", connection [db] was being
870 catch { db close }
877 forcedelete test.db test.db-wal
878 sqlite3 db test.db
894 sqlite3_wal_checkpoint db aux
897 sqlite3_errcode db
900 sqlite3_errmsg db
911 sqlite3_wal_checkpoint db main
914 sqlite3_errcode db
917 sqlite3_errmsg db
920 # Earlier versions returned an error is returned if the db cannot be
924 sqlite3 db2 test.db
933 sqlite3_wal_checkpoint db
936 sqlite3_errmsg db
939 # After [db2] drops its lock, [db] may checkpoint the db.
943 sqlite3_wal_checkpoint db
946 sqlite3_errmsg db
949 file size test.db
953 catch { db close }
961 1 {sqlite3_wal_checkpoint db} SQLITE_OK 1 1
962 2 {sqlite3_wal_checkpoint db ""} SQLITE_OK 1 1
963 3 {db eval "PRAGMA wal_checkpoint"} {0 10 10} 1 1
965 4 {sqlite3_wal_checkpoint db main} SQLITE_OK 1 0
966 5 {sqlite3_wal_checkpoint db aux} SQLITE_OK 0 1
967 6 {sqlite3_wal_checkpoint db temp} SQLITE_OK 0 0
968 7 {db eval "PRAGMA main.wal_checkpoint"} {0 10 10} 1 0
969 8 {db eval "PRAGMA aux.wal_checkpoint"} {0 13 13} 0 1
970 9 {db eval "PRAGMA temp.wal_checkpoint"} {0 -1 -1} 0 0
973 forcedelete test2.db test2.db-wal test2.db-journal
974 forcedelete test.db test.db-wal test.db-journal
976 sqlite3 db test.db
978 ATTACH 'test2.db' AS aux;
998 list [file size test.db] [file size test.db-wal]
1001 list [file size test2.db] [file size test2.db-wal]
1007 list [file size test.db] [file size test.db-wal]
1011 list [file size test2.db] [file size test2.db-wal]
1014 catch { db close }
1037 catch { db close }
1047 forcedelete test.db test.db-wal test.db-journal
1049 sqlite3 db test.db -vfs devsym
1068 file size test.db-wal
1072 file size test.db
1076 db close
1077 file size test.db
1092 forcedelete test.db test.db-wal test.db-journal
1094 sqlite3 db test.db
1110 forcecopy test.db testX.db
1111 forcecopy test.db-wal testX.db-wal
1112 db close
1113 list [file size testX.db] [file size testX.db-wal]
1127 forcecopy testX.db test.db
1128 forcecopy testX.db-wal test.db-wal
1130 hexio_write test.db-wal [expr 24 + $nFrame*(24+1024) + 20] 00000000
1132 sqlite3 db test.db
1138 db close
1165 forcecopy test.db testX.db
1186 forcecopy testX.db test.db
1187 forcedelete test.db-wal
1192 do_test wal-18.2.$tn.$pg.1 { file exists test.db-wal } 0
1193 do_test wal-18.2.$tn.$pg.2 { file exists test.db } 1
1194 do_test wal-18.2.$tn.$pg.3 { file size test.db } [expr 1024*3]
1206 # or too large), the db will not be corrupt as the log file will
1221 set fd [open test.db-wal w]
1228 file size test.db-wal
1232 sqlite3 db test.db
1233 set rc [catch { db one {PRAGMA integrity_check} } msg]
1237 db close
1254 forcedelete test.db test.db-wal test.db-journal
1255 sqlite3 db test.db
1256 sqlite3 db2 test.db
1272 db close
1274 file exists test.db-wal
1281 sqlite3 db test.db
1303 catch {db close}
1304 forcedelete test.db test.db-wal test.db-journal
1305 sqlite3 db test.db
1316 sqlite3 db test.db
1317 db transaction { db eval {
1342 db close
1343 sqlite3 db test.db
1350 catch { db close }
1401 expr {[file size test.db] % %PGSZ%}
1412 set walfile [file nativename [file join [get_pwd] test.db-wal]]
1414 set walfile test.db-wal
1416 catch {db close}
1417 forcedelete test.db
1431 sqlite3 db test.db
1437 db close
1457 catch {db close}
1458 forcedelete test.db
1459 sqlite3 db test.db
1476 db close
1477 sqlite3 db test.db
1478 file exists test.db-wal
1481 file size test.db
1489 file size test.db
1496 file size test.db-wal
1500 db close
1509 delete_file test.db test2.db
1510 sqlite3 db test.db
1512 db eval "PRAGMA journal_mode=$mode"
1513 db eval {ATTACH 'test2.db' AS t2; PRAGMA journal_mode=WAL;}
1515 db close
1520 file delete test.db
1521 sqlite3 db test.db
1522 db eval {PRAGMA journal_mode=WAL}
1525 file delete attached-$i.db
1526 db eval "ATTACH 'attached-$i.db' AS a$i;"
1527 db eval "PRAGMA a$i.journal_mode=WAL;"
1528 db eval "CREATE TABLE a$i.t$i (x);"
1529 db eval "INSERT INTO t$i VALUES(zeroblob(10000));"
1530 db eval "DELETE FROM t$i;"
1531 db eval "INSERT INTO t$i VALUES(randomblob(10000));"
1532 expr {[file size attached-$i.db-wal]>10000}
1537 db eval "PRAGMA a$i.wal_checkpoint(TRUNCATE);"
1538 file size attached-$i.db-wal
1542 expr {[file size attached-$j.db-wal]>10000}
1546 db close