From: Kaj-Michael Lang Date: Mon, 7 Apr 2008 12:06:12 +0000 (+0300) Subject: Small cleanups. Set some sqlite3 pragmas on open. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61d0b084669297e361951c2cdb62df9d5261a7f7;p=mapper Small cleanups. Set some sqlite3 pragmas on open. --- diff --git a/src/db.c b/src/db.c index 3fc479d..94800e6 100644 --- a/src/db.c +++ b/src/db.c @@ -1,6 +1,8 @@ /* * This file is part of mapper * + * Generic sqlite database helper functions. + * * Copyright (C) 2007 Kaj-Michael Lang * * This program is free software; you can redistribute it and/or modify @@ -24,7 +26,6 @@ #include #include "db.h" -#include "osm-sql-tables.h" sqlite3 *_db=NULL; gchar *_mapper_db=NULL; @@ -145,6 +146,9 @@ if (SQLITE_OK!=(sqlite3_open(mapper_db, db))) { return FALSE; } +sqlite3_exec(*db, "PRAGMA page_size=4096;", NULL, NULL, NULL); +sqlite3_exec(*db, "PRAGMA encoding = \"UTF-8\";", NULL, NULL, NULL); + /* Use smaller cache as the IT does not have much memory to spare */ #ifdef WITH_DEVICE_770 sqlite3_exec(*db, "PRAGMA cache_size = 2000;", NULL, NULL, NULL);