aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
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);