Changeset 158906 in webkit
- Timestamp:
- Nov 7, 2013 10:08:41 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r158904 r158906 1 2013-11-07 Brady Eidson <beidson@apple.com> 2 3 Enhance SQL journal_mode setting code to be less likely to log an error. 4 <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018 5 6 Reviewed by Anders Carlsson. 7 8 Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned. 9 Change the code to handle that. 10 11 * platform/sql/SQLiteDatabase.cpp: 12 (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition. 13 1 14 2013-11-07 Brady Eidson <beidson@apple.com> 2 15 -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp
r158865 r158906 100 100 101 101 SQLiteStatement walStatement(*this, ASCIILiteral("PRAGMA journal_mode=WAL;")); 102 if (walStatement.step() != SQLITE_ROW) 102 int result = walStatement.step(); 103 if (result != SQLITE_OK && result != SQLITE_ROW) 103 104 LOG_ERROR("SQLite database failed to set journal_mode to WAL, error: %s", lastErrorMsg()); 104 105 105 106 #ifndef NDEBUG 106 String mode = walStatement.getColumnText(0); 107 if (!equalIgnoringCase(mode, "wal")) 108 LOG_ERROR("journal_mode of database should be 'wal', but is '%s'", mode.utf8().data()); 107 if (result == SQLITE_ROW) { 108 String mode = walStatement.getColumnText(0); 109 if (!equalIgnoringCase(mode, "wal")) 110 LOG_ERROR("journal_mode of database should be 'wal', but is '%s'", mode.utf8().data()); 111 } 109 112 #endif 110 113
Note: See TracChangeset
for help on using the changeset viewer.