Changeset 70219 in webkit


Ignore:
Timestamp:
Oct 21, 2010 2:53:02 AM (14 years ago)
Author:
evan@chromium.org
Message:

2010-10-21 Evan Martin <evan@chromium.org>

Reviewed by Tony Chang.

sqlite: show extended error codes in error logs
https://bugs.webkit.org/show_bug.cgi?id=47859

SQLite can provide "extended" error codes, where extra information
about the error is potentially encoded in the high bits of the error
code. It's only off by default in case older apps rely on equality
testing on the older error codes, which WebKit doesn't do.

  • platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::open):
  • platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::step):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70216 r70219  
     12010-10-21  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        sqlite: show extended error codes in error logs
     6        https://bugs.webkit.org/show_bug.cgi?id=47859
     7
     8        SQLite can provide "extended" error codes, where extra information
     9        about the error is potentially encoded in the high bits of the error
     10        code.  It's only off by default in case older apps rely on equality
     11        testing on the older error codes, which WebKit doesn't do.
     12
     13        * platform/sql/SQLiteDatabase.cpp:
     14        (WebCore::SQLiteDatabase::open):
     15        * platform/sql/SQLiteStatement.cpp:
     16        (WebCore::SQLiteStatement::step):
     17
    1182010-10-21  Yuta Kitamura  <yutak@chromium.org>
    219
  • trunk/WebCore/platform/sql/SQLiteDatabase.cpp

    r70114 r70219  
    6969        LOG_ERROR("SQLite database failed to load from %s\nCause - %s", filename.ascii().data(),
    7070            sqlite3_errmsg(m_db));
     71        sqlite3_close(m_db);
     72        m_db = 0;
     73        return false;
     74    }
     75    if (sqlite3_extended_result_codes(m_db, 1) != SQLITE_OK) {
     76        LOG_ERROR("SQLite database error when enabling extended errors - %s", sqlite3_errmsg(m_db));
    7177        sqlite3_close(m_db);
    7278        m_db = 0;
Note: See TracChangeset for help on using the changeset viewer.