Lines Matching refs:db
26 db eval {
30 file delete -force test2.db
31 file delete -force test2.db-journal
32 sqlite db2 test2.db
38 ATTACH 'test2.db' AS t2;
44 proc db_list {db} {
46 foreach {idx name file} [execsql {PRAGMA database_list} $db] {
51 db eval {DETACH t2}
53 # lock test2.db then try to attach it. Should get an error.
56 ATTACH 'test2.db' AS t2;
60 # make sure test2.db did not get attached.
61 db_list db
64 # unlock test2.db and try to attach again. should work this time.
67 ATTACH 'test2.db' AS t2;
71 db_list db
79 # lock test2.db and try to read from it. should get an error.
86 # but we can still read from test1.db even though test2.db is locked.
92 # start a transaction on test.db even though test2.db is locked.
104 # now try to write to test2.db. the write should fail
126 db close
127 set DB [sqlite db test.db]
128 set rc [catch {sqlite_compile $DB "ATTACH 'test2.db' AS t2" TAIL} VM]
140 db close
142 catch {db$i close}
144 file delete -force test2.db