add pragmas

This commit is contained in:
hummypkg 2011-10-14 23:08:46 +00:00 committed by HummyPkg
parent 6b516bf434
commit 246860b7ec

5
main.c
View File

@ -164,6 +164,8 @@ sqlitedumpstart(char *file)
exit(1);
}
EXEC("pragma journal_mode = off");
EXEC("pragma synchronous = off");
EXEC(
"create table epg ("
"[service_id] integer, [event_id] integer, "
@ -816,9 +818,10 @@ nextopt:
return 1;
}
printf("epgd: DB time %ld, last %ld\n", st.st_mtime, last);
if (st.st_mtime > last)
{
printf("epgd: DB time %ld > last %ld\n", st.st_mtime, last);
printf("epgd: Regenerating.\n");
sqlitedumpstart(argv[1]);
parse(epgpath, sqlitedump, NULL, filter);
sqlitedumpend(argv[1]);