Add minimal failing test for #424

This commit is contained in:
Gwendal Roué committed 2018-10-04 08:35:02 +02:00
1 parent 9e8d08f579
commit 7a628bf23f
1 file changed
+14
+14
View File
@@ -105,4 +105,18 @@ class DatabaseWriterTests : GRDBTestCase {
}
try dbQueue.erase()
}
// See https://github.com/groue/GRDB.swift/issues/424
func testIssue424Minimal() throws {
let dbQueue = try makeDatabaseQueue()
try dbQueue.inDatabase { db in
try db.execute("""
CREATE TABLE t(a);
INSERT INTO t VALUES (1);
PRAGMA query_only = 1;
""")
_ = try Row.fetchCursor(db.cachedSelectStatement("SELECT * FROM t")).next()
}
try DatabaseQueue().backup(to: dbQueue)
}
}