From 92538de96903c45ffa2a041e01c4bbf0e1b641e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 5 May 2016 15:37:41 +0200 Subject: [PATCH] Remove useless warnings in the documentation of DatabaseReader.backup(to:) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GRBD serializes uses of writer connections: it’s useless to warn the user against using a database during a backup. --- GRDB/Core/DatabaseReader.swift | 9 --------- README.md | 6 ------ 2 files changed, 15 deletions(-) diff --git a/GRDB/Core/DatabaseReader.swift b/GRDB/Core/DatabaseReader.swift index 7ac52211d..4c493fa62 100644 --- a/GRDB/Core/DatabaseReader.swift +++ b/GRDB/Core/DatabaseReader.swift @@ -120,15 +120,6 @@ extension DatabaseReader { /// When the source is a DatabasePool, concurrent writes can happen during /// the backup. Those writes may, or may not, be reflected in the backup, /// but they won't trigger any error. - /// - /// Conversely, the destination database **must not** be used during the - /// backup. Quoting https://www.sqlite.org/c3ref/backup_finish.html: - /// - /// > SQLite does not currently check to see if the application incorrectly - /// > accesses the destination database connection and so no error code is - /// > reported, but the operations may malfunction nevertheless. Use of the - /// > destination database connection while a backup is in progress might - /// > also also cause a mutex deadlock. public func backup(to writer: DatabaseWriter) throws { try backup(to: writer, afterBackupInit: nil, afterBackupStep: nil) } diff --git a/README.md b/README.md index 0c0b357d8..a20c15d47 100644 --- a/README.md +++ b/README.md @@ -2577,12 +2577,6 @@ The `backup` method blocks the current thread until the destination database con When the source is a [database pool](#database-pools), concurrent writes can happen during the backup. Those writes may, or may not, be reflected in the backup, but they won't trigger any error. -Conversely, the destination database **must not** be used during the backup. Quoting [SQLite documentation](https://www.sqlite.org/c3ref/backup_finish.html): - -> SQLite does not currently check to see if the application incorrectly accesses the destination database connection and so no error code is reported, but the operations may malfunction nevertheless. Use of the destination database connection while a backup is in progress might also also cause a mutex deadlock. - -For a detailed discussion, see https://www.sqlite.org/c3ref/backup_finish.html. - Good To Know ============