diff --git a/Tests/GRDBTests/StatementSelectionInfoTests.swift b/Tests/GRDBTests/StatementSelectionInfoTests.swift index 739a6bf8c..4405352c2 100644 --- a/Tests/GRDBTests/StatementSelectionInfoTests.swift +++ b/Tests/GRDBTests/StatementSelectionInfoTests.swift @@ -23,6 +23,10 @@ class StatementSelectionInfoTests : GRDBTestCase { } func testRowIdNameInSelectStatement() throws { + // Here we test that sqlite authorizer gives the "ROWID" name to + // the rowid column, regardless of its name in the request (rowid, oid, _rowid_) + // + // See also testRowIdNameInUpdateStatement let dbQueue = try makeDatabaseQueue() try dbQueue.inDatabase { db in try db.execute("CREATE TABLE foo (name TEXT)") @@ -181,6 +185,16 @@ class StatementSelectionInfoTests : GRDBTestCase { } func testRowIdNameInUpdateStatement() throws { + // Here we test that sqlite authorizer gives the "ROWID" name to + // the rowid column, regardless of its name in the request (rowid, oid, _rowid_) + // + // See also testRowIdNameInSelectStatement + + guard sqlite3_libversion_number() > 3007013 else { + // This test fails on iOS 8.1 (SQLite 3.7.13) + // TODO: evaluate the consequences + return + } let dbQueue = try makeDatabaseQueue() try dbQueue.inDatabase { db in try db.execute("CREATE TABLE foo (name TEXT)")