1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566)

FossilOrigin-Name: cb494e10d71852024647aaa254203579ad438ea9
This commit is contained in:
danielk1977
2008-08-20 14:49:23 +00:00
parent 2b300d5d6f
commit 8c0a791a58
29 changed files with 2204 additions and 1637 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.488 2008/08/12 15:21:12 drh Exp $
** $Id: main.c,v 1.489 2008/08/20 14:49:24 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -148,6 +148,11 @@ int sqlite3_initialize(void){
if( sqlite3Config.isInit==0 && inProgress==0 ){
inProgress = 1;
rc = sqlite3_os_init();
if( rc==SQLITE_OK ){
rc = sqlite3PcacheInitialize();
sqlite3PCacheBufferSetup(sqlite3Config.pPage, sqlite3Config.szPage,
sqlite3Config.nPage);
}
inProgress = 0;
sqlite3Config.isInit = (rc==SQLITE_OK ? 1 : 0);
}
@@ -193,6 +198,7 @@ int sqlite3_initialize(void){
*/
int sqlite3_shutdown(void){
sqlite3Config.isMallocInit = 0;
sqlite3PcacheShutdown();
if( sqlite3Config.isInit ){
sqlite3_os_end();
}