Changeset 48973 in webkit


Ignore:
Timestamp:
Oct 1, 2009 8:26:41 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-01 Dumitru Daniliuc <dumi@chromium.org>

Reviewed by Dimitri Glazkov.

Read-only transactions do not change file sizes and therefore
should not trigger quota updates.

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

  • storage/SQLTransaction.cpp: (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::runStatements):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r48971 r48973  
     12009-10-01  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Read-only transactions do not change file sizes and therefore
     6        should not trigger quota updates.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=29945
     9
     10        * storage/SQLTransaction.cpp:
     11        (WebCore::SQLTransaction::openTransactionAndPreflight):
     12        (WebCore::SQLTransaction::runStatements):
     13
    1142009-09-30  Timothy Hatcher  <timothy@apple.com>
    215
  • trunk/WebCore/storage/SQLTransaction.cpp

    r48653 r48973  
    233233    }
    234234
    235     // Set the maximum usage for this transaction
    236     m_database->m_sqliteDatabase.setMaximumSize(m_database->maximumSize());
     235    // Set the maximum usage for this transaction if this transactions is not read-only
     236    if (!m_readOnly)
     237        m_database->m_sqliteDatabase.setMaximumSize(m_database->maximumSize());
    237238
    238239    ASSERT(!m_sqliteTransaction);
     
    308309            // See ::openTransactionAndPreflight() for discussion
    309310
    310             // Reset the maximum size here, as it was increased to allow us to retry this statement
     311            // Reset the maximum size here, as it was increased to allow us to retry this statement.
     312            // m_shouldRetryCurrentStatement is set to true only when a statement exceeds
     313            // the quota, which can happen only in a read-write transaction. Therefore, there
     314            // is no need to check here if the transaction is read-write.
    311315            m_database->m_sqliteDatabase.setMaximumSize(m_database->maximumSize());
    312316        } else {
Note: See TracChangeset for help on using the changeset viewer.