Lines Matching refs:db
28 db eval {
32 file delete -force test2.db
33 file delete -force test2.db-journal
34 sqlite db2 test2.db
40 ATTACH 'test2.db' AS t2;
46 proc db_list {db} {
48 foreach {idx name file} [execsql {PRAGMA database_list} $db] {
53 db eval {DETACH t2}
55 # lock test2.db then try to attach it. Should get an error.
58 ATTACH 'test2.db' AS t2;
62 # make sure test2.db did not get attached.
63 db_list db
66 # unlock test2.db and try to attach again. should work this time.
69 ATTACH 'test2.db' AS t2;
73 db_list db
81 # lock test2.db and try to read from it. should get an error.
88 # but we can still read from test1.db even though test2.db is locked.
94 # start a transaction on test.db even though test2.db is locked.
106 # now try to write to test2.db. the write should fail
128 db close
129 set DB [sqlite db test.db]
130 set rc [catch {sqlite_compile $DB "ATTACH 'test2.db' AS t2" TAIL} VM]
142 db close
144 catch {db$i close}
146 file delete -force test2.db