aboutsummaryrefslogtreecommitdiff
path: root/src/pragma.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2006-01-11 14:09:31 +0000
committerdanielk1977 <danielk1977@noemail.net>2006-01-11 14:09:31 +0000
commitb82e7edae9c6f8b0c9f2f6745442b5663a55b51a (patch)
treec388bb764973fcc40e8812c26ed450e7288a9c45 /src/pragma.c
parent003437a0a7563fddadb95d4103630da3a9d7f2ae (diff)
downloadsqlite-b82e7edae9c6f8b0c9f2f6745442b5663a55b51a.tar.gz
sqlite-b82e7edae9c6f8b0c9f2f6745442b5663a55b51a.zip
Fix bugs caused by assuming that shared-schemas are initialized. (CVS 2917)
FossilOrigin-Name: 3970eb875d1830d35b3a70a7583a8ab6b238cad6
Diffstat (limited to 'src/pragma.c')
-rw-r--r--src/pragma.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pragma.c b/src/pragma.c
index b9f510cd7..54fb19f64 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
-** $Id: pragma.c,v 1.112 2006/01/10 17:58:23 danielk1977 Exp $
+** $Id: pragma.c,v 1.113 2006/01/11 14:09:32 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -808,7 +808,10 @@ void sqlite3Pragma(
** will be overwritten when the schema is next loaded. If it does not
** already exists, it will be created to use the new encoding value.
*/
- if( !(pParse->db->flags&SQLITE_Initialized) ){
+ if(
+ !(DbHasProperty(db, 0, DB_SchemaLoaded)) ||
+ DbHasProperty(db, 0, DB_Empty)
+ ){
for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
ENC(pParse->db) = pEnc->enc;