[Webkit-unassigned] [Bug 29729] SQLiteTransaction should use BEGIN DEFERRED instead of BEGIN to begin read-only transactions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 28 18:51:59 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29729





--- Comment #10 from Dumitru Daniliuc <dumi at chromium.org>  2009-09-28 18:51:58 PDT ---
Mark, I talked to dglazkov about this, and he brought up a good point. Every
time we execute a SQL statement, SQLite implicitly creates a transaction. So
even if we wanted to change all Chromium code that uses SQLite, but doesn't do
it through WebCore, it wouldn't be as easy as grepping for BEGIN and changing
all occurrences to BEGIN IMMEDIATE. We'd have to:

1. Find every SQL statement that we execute.
2. Figure out if it goes through WebCore or not.
3. If it doesn't, wrap each statement into a "BEGIN IMMEDIATE; " + sqlStatement
+ "COMMIT;" (or similar) construct.

Even if this might seem like the right solution, going through the entire
Chromium code base looking for SQL statements, and then wrapping each one of
them into an explicit transaction seems unreasonable to us at this point.

Another point I want to bring up is that EVERY WebKit port that changes the
default behavior of SQLite's BEGIN command will suffer from this problem.
Chromium might be the only port that does it at the moment, but it's not
unthinkable that another port might want to do the same thing in the future.
Without this patch, they'll run into unexpected, hard-to-debug deadlocks as
soon as they change their default BEGIN behavior. We (Michael and I) feel that
a 1-word change to WebKit that explicitly states the expected default behavior
is a much smaller price to pay, even if this change seems redundant and
unnecessary (although we think that explicitly (re-)stating our expectations is
not redundant and has value).

Any chance we could come to an agreement here? This is not just a nice-to-have
or we-like-it-more-this-way change. Without this patch Chromium will not be
able to support HTML5 DBs (unless we wrap all our current SQL statements into
explicit transactions, which is probably not very likely to happen ever).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list