diff options
author | drh <drh@noemail.net> | 2012-05-28 18:22:41 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-05-28 18:22:41 +0000 |
commit | 14bcd7d25e0902912d2eecef4839934e22f1b9db (patch) | |
tree | 5e011a6c08fa26cdd4388ce8713f04385ffb26d9 /src/main.c | |
parent | e56467fc9ffdf634b939c33886e6513fc27376c3 (diff) | |
parent | 9cb7200815baf934dff0db605a38ff675bcef40e (diff) | |
download | sqlite-14bcd7d25e0902912d2eecef4839934e22f1b9db.tar.gz sqlite-14bcd7d25e0902912d2eecef4839934e22f1b9db.zip |
Merge the unicode61 tokenizer and the shared-cache-memory database changes
into the sessions branch.
FossilOrigin-Name: df817e70afc3f41e680d8f84dfa5772d5b3ae4d9
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 53a9a3ce6..f297e460c 100644 --- a/src/main.c +++ b/src/main.c @@ -2033,10 +2033,14 @@ int sqlite3ParseUri( { "ro", SQLITE_OPEN_READONLY }, { "rw", SQLITE_OPEN_READWRITE }, { "rwc", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE }, + { "memory", + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE + | SQLITE_OPEN_MEMORY }, { 0, 0 } }; - mask = SQLITE_OPEN_READONLY|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE; + mask = SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE + | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY; aMode = aOpenMode; limit = mask & flags; zModeType = "access"; @@ -2057,7 +2061,7 @@ int sqlite3ParseUri( rc = SQLITE_ERROR; goto parse_uri_out; } - if( mode>limit ){ + if( (mode & ~SQLITE_OPEN_MEMORY)>limit ){ *pzErrMsg = sqlite3_mprintf("%s mode not allowed: %s", zModeType, zVal); rc = SQLITE_PERM; @@ -2076,6 +2080,7 @@ int sqlite3ParseUri( memcpy(zFile, zUri, nUri); zFile[nUri] = '\0'; zFile[nUri+1] = '\0'; + flags &= ~SQLITE_OPEN_URI; } *ppVfs = sqlite3_vfs_find(zVfs); |