Bug 62129

Summary: Assertion failure in SQLiteDatabase::turnOnIncrementalAutoVacuum()
Product: WebKit Reporter: Clifford Hung <chung>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ahmad.saleem792, beidson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Clifford Hung
Reported 2011-06-06 10:35:56 PDT
SQLiteDatabase::turnOnIncrementalAutoVacuum() runs the VACUUM command on a database and this will result in an assertion failure in SQLite's btree.c (found while using SQLite version 3.7.2): assert( !pBt->pPage1 && !pBt->pCursor ); in sqlite3BtreeSetPageSize(...) This can be fixed by finalizing the statement that reads the auto_vacuum mode before running the VACUUM command as follows: diff --git a/WebCore/platform/sql/SQLiteDatabase.cpp b/WebCore/platform/sql/SQLiteDatabase.cpp index e7cef38..9d1bb34 100644 --- a/WebCore/platform/sql/SQLiteDatabase.cpp +++ b/WebCore/platform/sql/SQLiteDatabase.cpp @@ -444,6 +444,7 @@ bool SQLiteDatabase::turnOnIncrementalAutoVacuum() SQLiteStatement statement(*this, "PRAGMA auto_vacuum"); int autoVacuumMode = statement.getColumnInt(0); int error = lastError(); + statement.finalize(); // Check if we got an error while trying to get the value of the auto_vacuum flag. // If we got a SQLITE_BUSY error, then there's probably another transaction in
Attachments
Ahmad Saleem
Comment 1 2023-01-06 17:42:10 PST
WebKit SQLiteStatement implementation does not have "finalize" method, while possible potential error will be tracked via bug 249598.
Note You need to log in before you can comment on or make changes to this bug.