1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Have flags passed to sqlite3_open_v2() apply to the main and any attached databases. And change things so that any "mode=xxx" or "cache=xxx" options specified as part of a URI for the main database do not also apply to attached databases.

FossilOrigin-Name: 3e490915301216e242a5cdeb0febaff12ed53cb9
This commit is contained in:
dan
2011-05-10 18:39:10 +00:00
parent eaadd59ab0
commit 1943299629
4 changed files with 33 additions and 10 deletions

View File

@@ -2163,6 +2163,7 @@ static int openDatabase(
nocaseCollatingFunc, 0);
/* Parse the filename/URI argument. */
db->openFlags = flags;
rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg);
if( rc!=SQLITE_OK ){
if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
@@ -2172,7 +2173,6 @@ static int openDatabase(
}
/* Open the backend database driver */
db->openFlags = flags;
rc = sqlite3BtreeOpen(db->pVfs, zOpen, db, &db->aDb[0].pBt, 0,
flags | SQLITE_OPEN_MAIN_DB);
if( rc!=SQLITE_OK ){