diff options
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/pragma.c b/src/pragma.c index 504f51ec0..c5b5bb667 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1824,17 +1824,7 @@ 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. */ - int canChangeEnc = 1; /* True if allowed to change the encoding */ - int i; /* For looping over all attached databases */ - for(i=0; i<db->nDb; i++){ - if( db->aDb[i].pBt!=0 - && DbHasProperty(db,i,DB_SchemaLoaded) - && !DbHasProperty(db,i,DB_Empty) - ){ - canChangeEnc = 0; - } - } - if( canChangeEnc ){ + if( (db->mDbFlags & DBFLAG_EncodingFixed)==0 ){ for(pEnc=&encnames[0]; pEnc->zName; pEnc++){ if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){ u8 enc = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE; |