Failing test for #1124

This commit is contained in:
Gwendal Roué committed 2022-01-08 13:18:32 +01:00
1 parent 536ad2ebff
commit 2093b477df
1 file changed
+19
+19
View File
@@ -175,4 +175,23 @@ class ColumnInfoTests: GRDBTestCase {
}
#endif
}
func testIssue1124() throws {
class Observer: TransactionObserver {
func observes(eventsOfKind eventKind: DatabaseEventKind) -> Bool { true }
func databaseDidChange(with event: DatabaseEvent) { }
func databaseDidCommit(_ db: Database) { }
func databaseDidRollback(_ db: Database) { }
}
let dbQueue = try makeDatabaseQueue()
dbQueue.add(transactionObserver: Observer(), extent: .databaseLifetime)
try dbQueue.write { db in
try db.execute(sql: """
CREATE VIRTUAL TABLE t1 USING rtree(id,minX,maxX,minY,maxY);
CREATE TABLE t2 (a);
ALTER TABLE t2 RENAME TO t3;
""")
_ = try db.columns(in: "t1")
}
}
}