Add database/quick_startup directive to specify that the database should start up quickly -- without vacuum in the case of sqlite

This commit is contained in:
Ron Pedde 2006-10-12 01:42:15 +00:00
parent e0ff0c794e
commit 6d54f3c826
2 changed files with 6 additions and 2 deletions

View File

@ -321,7 +321,9 @@ int db_sqlite2_event(int event_type) {
switch(event_type) {
case DB_SQL_EVENT_STARTUP: /* this is a startup with existing songs */
db_sqlite2_exec(NULL,E_FATAL,"vacuum");
if(!conf_get_int("database","quick_startup",0))
db_sqlite2_exec(NULL,E_FATAL,"vacuum");
/* make sure our indexes exist */
db_sqlite2_exec(NULL,E_DBG,"create index idx_path on "
"songs(path,idx)");

View File

@ -356,7 +356,9 @@ int db_sqlite3_event(int event_type) {
switch(event_type) {
case DB_SQL_EVENT_STARTUP: /* this is a startup with existing songs */
db_sqlite3_exec(NULL,E_FATAL,"vacuum");
if(!conf_get_int("database","quick_startup",0))
db_sqlite3_exec(NULL,E_FATAL,"vacuum");
db_sqlite3_exec(NULL,E_DBG,"create index idx_path on "
"songs(path,idx)");
db_sqlite3_exec(NULL,E_DBG,"create index idx_songid on "