This commit is contained in:
Gwendal Roué committed 2016-07-08 16:10:38 +02:00
1 parent 252ec6fe59
commit 88e8c2ba33
1 file changed
+11 -15
@@ -442,21 +442,17 @@ class DatabasePoolConcurrencyTests: GRDBTestCase {
// SQLite has a statement that modifies the sqlite_master table, is
// still allowed as a regular select statement.
assertNoError {
do {
// This test uses a database pool, a connection for creating the
// search virtual table, and another conncetion for reading.
//
// This is the tested setup: don't change it.
let dbPool = try makeDatabasePool()
dbPool.write { db in
try! db.execute("CREATE VIRTUAL TABLE search USING fts3(title, tokenize = unicode61)")
}
let rows = dbPool.read { db -> [Row] in
return Row.fetchAll(db, "SELECT * FROM search")
}
print(rows)
// This test uses a database pool, a connection for creating the
// search virtual table, and another connection for reading.
//
// This is the tested setup: don't change it.
let dbPool = try makeDatabasePool()
try dbPool.write { db in
try db.execute("CREATE VIRTUAL TABLE search USING fts3(title, tokenize = unicode61)")
}
dbPool.read { db in
_ = Row.fetchAll(db, "SELECT * FROM search")
}
}
}