diff options
author | drh <drh@noemail.net> | 2019-01-31 15:38:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-01-31 15:38:53 +0000 |
commit | 23a885956e6f6798bf0b75ddf083e77c77ed41cd (patch) | |
tree | 3837daf7789e47681e4a4f4d80fe479ae0510ffd /src/global.c | |
parent | b92b019fe3d0669504a94dd8c26b63d5dd52441e (diff) | |
download | sqlite-23a885956e6f6798bf0b75ddf083e77c77ed41cd.tar.gz sqlite-23a885956e6f6798bf0b75ddf083e77c77ed41cd.zip |
Add the SQLITE_CONFIG_MEMDB_MAXSIZE configuration option for configuring
the default maximum size of an in-memory database created using
sqlite3_deserialize(). This is necessary to make the interface reasonably
testable.
FossilOrigin-Name: cb72ee0478ce98c48aae059fd5de4e36caf2b8c953e08fcb799bfd119ad46b73
Diffstat (limited to 'src/global.c')
-rw-r--r-- | src/global.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/global.c b/src/global.c index f1a391248..a78ea65a7 100644 --- a/src/global.c +++ b/src/global.c @@ -189,6 +189,13 @@ const unsigned char sqlite3CtypeMap[256] = { #endif +/* The default maximum size of an in-memory database created using +** sqlite3_deserialize() +*/ +#ifndef SQLITE_MEMDB_DEFAULT_MAXSIZE +# define SQLITE_MEMDB_DEFAULT_MAXSIZE 1073741824 +#endif + /* ** The following singleton contains the global configuration for ** the SQLite library. @@ -236,13 +243,16 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { 0, /* xVdbeBranch */ 0, /* pVbeBranchArg */ #endif +#ifdef SQLITE_ENABLE_DESERIALIZE + SQLITE_MEMDB_DEFAULT_MAXSIZE, /* mxMemdbSize */ +#endif #ifndef SQLITE_UNTESTABLE 0, /* xTestCallback */ #endif 0, /* bLocaltimeFault */ 0, /* bInternalFunctions */ 0x7ffffffe, /* iOnceResetThreshold */ - SQLITE_DEFAULT_SORTERREF_SIZE /* szSorterRef */ + SQLITE_DEFAULT_SORTERREF_SIZE, /* szSorterRef */ }; /* |