1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

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
This commit is contained in:
danielk1977
2008-04-28 16:19:35 +00:00
parent 394f07ef8c
commit f51bf48b32
4 changed files with 43 additions and 16 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.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);