[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
eric at webkit.org
eric at webkit.org
Thu Oct 29 20:36:15 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 6276bb1213ac110f6165ed59078d11c116dc1af5
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 29 20:05:11 2009 +0000
2009-09-29 Dumitru Daniliuc <dumi at chromium.org>
Reviewed by Dimitri Glazkov.
Starting all read-only transactions with an explicit BEGIN
DEFERRED command instead of BEGIN, since some ports (chromium)
might compile their own SQLite library and set BEGIN to BEGIN
IMMEDIATE by default; which would result in a deadlock in case of
two concurrent read-only transactions on the same DB, and would
unnecessarily delay other potential transactions to the same DB.
https://bugs.webkit.org/show_bug.cgi?id=29729
* platform/sql/SQLiteTransaction.cpp:
(WebCore::SQLiteTransaction::begin):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3938c9f..925a8d9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-09-29 Dumitru Daniliuc <dumi at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Starting all read-only transactions with an explicit BEGIN
+ DEFERRED command instead of BEGIN, since some ports (chromium)
+ might compile their own SQLite library and set BEGIN to BEGIN
+ IMMEDIATE by default; which would result in a deadlock in case of
+ two concurrent read-only transactions on the same DB, and would
+ unnecessarily delay other potential transactions to the same DB.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29729
+
+ * platform/sql/SQLiteTransaction.cpp:
+ (WebCore::SQLiteTransaction::begin):
+
2009-09-29 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/platform/sql/SQLiteTransaction.cpp b/WebCore/platform/sql/SQLiteTransaction.cpp
index a4b2ac8..e0a8ff9 100644
--- a/WebCore/platform/sql/SQLiteTransaction.cpp
+++ b/WebCore/platform/sql/SQLiteTransaction.cpp
@@ -47,15 +47,21 @@ void SQLiteTransaction::begin()
{
if (!m_inProgress) {
ASSERT(!m_db.m_transactionInProgress);
- // Call BEGIN IMMEDIATE for a write transaction to acquire
- // a RESERVED lock on the DB file. Otherwise, another write
- // transaction (on another connection) could make changes
- // to the same DB file before this transaction gets to execute
- // any statements. If that happens, this transaction will fail.
+ // For read-only transactions, call BEGIN DEFERRED explicitly.
+ // Otherwise, a port might use a SQLite library that was build
+ // to interpret BEGIN as BEGIN IMMEDIATE, which would lead to
+ // a deadlock whenever two read transactions on the same DB
+ // are scheduled concurrently.
+ // For write transactions, call BEGIN IMMEDIATE to acquire
+ // a RESERVED lock on the DB file before the transaction
+ // callback is executed. Otherwise, another write transaction
+ // (on another connection) could make changes to the same DB file
+ // before this transaction gets to execute any statements.
+ // If that happens, this transaction will fail.
// http://www.sqlite.org/lang_transaction.html
// http://www.sqlite.org/lockingv3.html#locking
if (m_readOnly)
- m_inProgress = m_db.executeCommand("BEGIN;");
+ m_inProgress = m_db.executeCommand("BEGIN DEFERRED;");
else
m_inProgress = m_db.executeCommand("BEGIN IMMEDIATE;");
m_db.m_transactionInProgress = m_inProgress;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list