зеркало из https://github.com/mozilla/pjs.git
Bug 329819 r=annie.sullivan Fix Tp regression from bug 329691, the dummy table
needs data in it to hold the statement (and hence the cache) open. Original committer: brettw%gmail.com Original revision: 1.81 Original date: 2006/03/08 21:23:22
This commit is contained in:
Родитель
3c6edf12c2
Коммит
a5d7f1dac7
|
@ -404,6 +404,8 @@ nsNavHistory::InitDB(PRBool *aDoImport)
|
|||
|
||||
// create a dummy table that we can keep a transaction open on; the
|
||||
// dummy statement needs something to work on that will always exist.
|
||||
// This table must have something in it or the statement will be
|
||||
// automatically closed because there is no data.
|
||||
rv = mDBConn->TableExists(NS_LITERAL_CSTRING("moz_dummy_table"), &tableExists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (! tableExists) {
|
||||
|
@ -411,6 +413,9 @@ nsNavHistory::InitDB(PRBool *aDoImport)
|
|||
NS_LITERAL_CSTRING("CREATE TABLE moz_dummy_table (id INTEGER PRIMARY KEY)"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
rv = mDBConn->ExecuteSimpleSQL(
|
||||
NS_LITERAL_CSTRING("INSERT OR IGNORE INTO moz_dummy_table VALUES (1)"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// dummy DB (see comment above function) and statement that stays open
|
||||
rv = mDBService->OpenDatabase(dbFile, getter_AddRefs(mDummyDBConn));
|
||||
|
|
Загрузка…
Ссылка в новой задаче