Failing test for #424

This commit is contained in:
Gwendal Roué committed 2018-10-03 13:55:55 +02:00
1 parent ff28c02f21
commit 01c9e9e1e1
1 file changed
+15
+15
View File
@@ -90,4 +90,19 @@ class DatabaseWriterTests : GRDBTestCase {
try XCTAssertNil(Row.fetchOne(db, "SELECT * FROM sqlite_master"))
}
}
// See https://github.com/groue/GRDB.swift/issues/424
func testIssue424() throws {
let dbQueue = try makeDatabaseQueue()
try dbQueue.write { db in
try db.execute("""
CREATE TABLE t(a);
INSERT INTO t VALUES (1)
""")
}
try dbQueue.read { db in
_ = try Row.fetchCursor(db.cachedSelectStatement("SELECT * FROM t")).next()
}
try dbQueue.erase()
}
}