• dumi@chromium.org's avatar
    WebCore: 1. Fix a bug in SQLiteTransaction: do not assume that COMMIT always · 71fb8a94
    dumi@chromium.org authored
    succeeds.
    2. Jump straight to the transaction error callback when a
    statement fails in a way that makes sqlite automatically rollback
    the transaction.
    3. Fix the code that handles the "quota reached" failure, as it is
    one of the failures that lead to an automatic transaction
    rollback.
    
    Reviewed by Eric Seidel.
    
    https://bugs.webkit.org/show_bug.cgi?id=34280
    
    * platform/sql/SQLiteDatabase.cpp:
    (WebCore::SQLiteDatabase::isAutoCommitOn):
    * platform/sql/SQLiteDatabase.h:
    * platform/sql/SQLiteTransaction.cpp:
    (WebCore::SQLiteTransaction::begin):
    (WebCore::SQLiteTransaction::commit):
    (WebCore::SQLiteTransaction::rollback):
    (WebCore::SQLiteTransaction::transactionWasRolledBackBySqlite):
    * platform/sql/SQLiteTransaction.h:
    * storage/SQLTransaction.cpp:
    (WebCore::SQLTransaction::SQLTransaction):
    (WebCore::SQLTransaction::runStatements):
    (WebCore::SQLTransaction::runCurrentStatement):
    (WebCore::SQLTransaction::handleCurrentStatementError):
    (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
    
    LayoutTests: 1. Enhance quota-tracking.html: if sqlite automatically rolls back
    a transaction because of a statement failure, make sure the rest
    of the statements in the transaction are not executed.
    2. Fix the expectations for quota-tracking.html. Sqlite cannot
    recover from reaching a DB's max size.
    
    Reviewed by Eric Seidel.
    
    * storage/quota-tracking-expected.txt:
    * storage/quota-tracking.html:
    
    
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@54393 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    71fb8a94
ChangeLog 133 KB