more attempts at sqlite3 fixage
This commit is contained in:
parent
f037a53452
commit
f79756769a
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* $Id$
|
||||
* sqlite2-specific db implementation
|
||||
* sqlite3-specific db implementation
|
||||
*
|
||||
* Copyright (C) 2005 Ron Pedde (ron@pedde.com)
|
||||
*
|
||||
|
@ -415,7 +415,7 @@ int db_sqlite3_event(int event_type) {
|
|||
case DB_SQL_EVENT_SONGSCANSTART:
|
||||
if(db_sqlite3_reload) {
|
||||
db_sqlite3_exec(NULL,E_FATAL,"pragma synchronous = off");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"begin transaction");
|
||||
// db_sqlite3_exec(NULL,E_FATAL,"begin transaction");
|
||||
} else {
|
||||
db_sqlite3_exec(NULL,E_DBG,"drop table updated");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"create temp table updated (id int)");
|
||||
|
@ -426,7 +426,7 @@ int db_sqlite3_event(int event_type) {
|
|||
|
||||
case DB_SQL_EVENT_SONGSCANEND:
|
||||
if(db_sqlite3_reload) {
|
||||
db_sqlite3_exec(NULL,E_FATAL,"commit transaction");
|
||||
// db_sqlite3_exec(NULL,E_FATAL,"commit transaction");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"create index idx_path on songs(path)");
|
||||
db_sqlite3_exec(NULL,E_DBG,"delete from config where term='rescan'");
|
||||
} else {
|
||||
|
@ -437,13 +437,13 @@ int db_sqlite3_event(int event_type) {
|
|||
break;
|
||||
|
||||
case DB_SQL_EVENT_PLSCANSTART:
|
||||
if(db_sqlite3_reload)
|
||||
db_sqlite3_exec(NULL,E_FATAL,"begin transaction");
|
||||
// if(db_sqlite3_reload)
|
||||
// db_sqlite3_exec(NULL,E_FATAL,"begin transaction");
|
||||
break;
|
||||
|
||||
case DB_SQL_EVENT_PLSCANEND:
|
||||
if(db_sqlite3_reload) {
|
||||
db_sqlite3_exec(NULL,E_FATAL,"end transaction");
|
||||
// db_sqlite3_exec(NULL,E_FATAL,"end transaction");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"pragma synchronous=normal");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"create index idx_songid on playlistitems(songid)");
|
||||
db_sqlite3_exec(NULL,E_FATAL,"create index idx_playlistid on playlistitems(playlistid)");
|
||||
|
|
|
@ -179,7 +179,7 @@ int db_sql_fetch_int(char **pe, int *result, char *fmt, ...) {
|
|||
db_sql_vmfree_fn(query);
|
||||
|
||||
if(err != DB_E_SUCCESS) {
|
||||
DPRINTF(E_SPAM,L_DB,"fetch_row failed in fetch_int: %s\n",*pe);
|
||||
DPRINTF(E_SPAM,L_DB,"fetch_row failed in fetch_int: %s\n",pe ? *pe : NULL);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue