diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-04-28 16:19:35 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-04-28 16:19:35 +0000 |
commit | f51bf48b327afde2a11727f76a0af9c44cbf372c (patch) | |
tree | 23fa9885ddf0dcb476b0404f67145c508da7f20d /src/main.c | |
parent | 394f07ef8c1704ea780542db372c659bbc86cb5f (diff) | |
download | sqlite-f51bf48b327afde2a11727f76a0af9c44cbf372c.tar.gz sqlite-f51bf48b327afde2a11727f76a0af9c44cbf372c.zip |
Fix a shared-cache mode problem triggered when sqlite3_open16() was used to open the second or subsequent connections to a utf-8 database. (CVS 5059)
FossilOrigin-Name: 20946bf6dd704416c41edd863103e85fc7ab4ef2
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c index 940a3c1c2..06fc5c1b9 100644 --- a/src/main.c +++ b/src/main.c @@ -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.434 2008/04/16 00:49:12 drh Exp $ +** $Id: main.c,v 1.435 2008/04/28 16:19:35 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1248,12 +1248,8 @@ int sqlite3_open16( rc = openDatabase(zFilename8, ppDb, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); assert( *ppDb || rc==SQLITE_NOMEM ); - if( rc==SQLITE_OK ){ + if( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){ ENC(*ppDb) = SQLITE_UTF16NATIVE; - if( rc!=SQLITE_OK ){ - sqlite3_close(*ppDb); - *ppDb = 0; - } } } sqlite3ValueFree(pVal); |