Lines Matching refs:db2

33   sqlite3 db2 test.db
38 # 1.2.1: If [db1] has an exclusive lock, [db2] cannot read.
40 # 1.2.3: If [db1] has a non-exclusive write-lock, [db2] can read.
43 execsql { SELECT * FROM t1 } db2 ;# Cache a compiled statement
45 catchsql { SELECT * FROM t1 } db2 ;# Execute the cached compiled statement
56 execsql { SELECT * FROM t1 } db2
65 # 1.3.2: If [db1] has a write-lock on t1, [db2] can read from t2.
66 # 1.3.3: If [db1] has a write-lock on t1, [db2] cannot read from t1.
67 # 1.3.4: If [db1] has a write-lock on t1, [db2] cannot write to t1.
68 # 1.3.5: If [db1] has a read-lock on t1, [db2] can read from t1.
69 # 1.3.6: If [db1] has a read-lock on t1, [db2] cannot write to t1.
79 execsql { SELECT * FROM t2 } db2
82 catchsql { SELECT * FROM t1 } db2
85 catchsql { INSERT INTO t2 VALUES(1, 2) } db2
93 execsql { SELECT * FROM t1 } db2
96 catchsql { INSERT INTO t1 VALUES(5, 6) } db2
104 # For these tests, connection [db2] is in read-uncommitted mode.
106 # 1.4.1: If [db1] has a write-lock on t1, [db2] can still read from t1.
108 # [db2] cannot read from the schema.
109 # 1.4.3: If [db1] has a read-lock on t1, [db2] cannot write to t1.
112 execsql { PRAGMA read_uncommitted = 1 } db2
117 execsql { SELECT * FROM t1 } db2
121 catchsql { SELECT * FROM t1 } db2
129 catchsql { INSERT INTO t1 VALUES(7, 8) } db2
134 db2 close
145 sqlite3 db2 test.db -vfs unix
152 catchsql { SELECT * FROM t1 } db2
174 db2 close
187 sqlite3 db2 test.db
192 # this means t1 cannot be written by [db2].
195 catchsql { INSERT INTO t1 VALUES(1, 2) } db2
204 catchsql { SELECT * FROM t1 } db2
209 db2 eval {SELECT * FROM t1} {
217 execsql { BEGIN } db2
219 db2 eval {SELECT * FROM t1} {
233 db2 close
240 sqlite3 db2 test.db
243 execsql { CREATE TABLE t5(a, b) } db2
251 db2 close