Skip to content

Commit 69b786d

Browse files
committed
Allow COMMIT from a cancelled read-only access.
1 parent 9dd8b2c commit 69b786d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GRDB/Core/Database.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,11 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
13291329
return
13301330
}
13311331

1332+
// Commits when read-only are just like rollbacks above.
1333+
if statement.transactionEffect == .commitTransaction && isReadOnly {
1334+
return
1335+
}
1336+
13321337
// Suspension should not prevent adjusting the read-only mode.
13331338
// See <https://github.com/groue/GRDB.swift/issues/1715>.
13341339
if statement.isQueryOnlyPragma {

0 commit comments

Comments
 (0)