1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix bugs caused by assuming that shared-schemas are initialized. (CVS 2917)

FossilOrigin-Name: 3970eb875d1830d35b3a70a7583a8ab6b238cad6
This commit is contained in:
danielk1977
2006-01-11 14:09:31 +00:00
parent 003437a0a7
commit b82e7edae9
12 changed files with 117 additions and 84 deletions

View File

@@ -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;