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

Fix some errors to do with attached databases and text encodings in shared-cache mode. (CVS 2895)

FossilOrigin-Name: 3e75d3d5efebc0dfff1adfc13d85e85ec39db3eb
This commit is contained in:
danielk1977
2006-01-09 16:12:04 +00:00
parent 52622828ce
commit 14db26653a
19 changed files with 205 additions and 143 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.41 2006/01/09 06:29:48 danielk1977 Exp $
** $Id: attach.c,v 1.42 2006/01/09 16:12:05 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -127,6 +127,11 @@ static void attachFunc(
if( !aNew->pSchema ){
rc = SQLITE_NOMEM;
}
if( aNew->pSchema->file_format && aNew->pSchema->enc!=ENC(db) ){
strcpy(zErr,
"attached databases must use the same text encoding as main database");
goto attach_error;
}
}
aNew->zName = sqliteStrDup(zName);
aNew->safety_level = 3;