[go: nahoru, domu]

sql: Improve rationale for handling SQLITE_PROTOCOL.

Change-Id: I9fc200a040071cc6f08470ebe4c4bdb5510a29c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3522734
Commit-Queue: Victor Costan <pwnall@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#980809}
diff --git a/sql/error_delegate_util.cc b/sql/error_delegate_util.cc
index edd4681..e88deb6 100644
--- a/sql/error_delegate_util.cc
+++ b/sql/error_delegate_util.cc
@@ -201,9 +201,11 @@
       // the user if we run our recovery code or delete our databases.
       [[fallthrough]];
     case SQLITE_PROTOCOL:
-      // Timed out while attempting to grab a lock on the database. This should
-      // not be a problem for exclusive databases, which are strongly
-      // recommended for Chrome features.
+      // Gave up while attempting to grab a lock on a WAL database at the
+      // beginning of a transaction. In theory, this should not be a problem in
+      // Chrome, because we'll only allow enabling WAL on databases with
+      // exclusive locking. However, other software on the user's system may
+      // lock our databases in a way that triggers this error.
       [[fallthrough]];
     case SQLITE_SCHEMA:
       // The database schema was changed between the time when a prepared