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

Initial implementation of variable page sizes and the temp_store pragma. (CVS 1843)

FossilOrigin-Name: 4cf6e9db757931aba2f300b7869305434d6f2d2b
This commit is contained in:
drh
2004-07-22 01:19:35 +00:00
parent 900dfba8ef
commit 90f5ecb39d
13 changed files with 387 additions and 216 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.22 2004/07/19 00:56:24 drh Exp $
** $Id: attach.c,v 1.23 2004/07/22 01:19:35 drh Exp $
*/
#include "sqliteInt.h"
@@ -91,19 +91,15 @@ void sqlite3Attach(Parse *pParse, Token *pFilename, Token *pDbname, Token *pKey)
sqlite3ErrorMsg(pParse, "unable to open database: %s", zFile);
}
#if SQLITE_HAS_CODEC
{
extern int sqliteCodecAttach(sqlite*, int, void*, int);
assert( pKey!=0 );
if( pKey->n>0 ){
extern int sqlite3CodecAttach(sqlite*, int, void*, int);
char *zKey = 0;
int nKey;
if( pKey && pKey->z && pKey->n ){
sqlite3SetNString(&zKey, pKey->z, pKey->n, 0);
sqlite3Dequote(zKey);
nKey = strlen(zKey);
}else{
zKey = 0;
nKey = 0;
}
sqliteCodecAttach(db, db->nDb-1, zKey, nKey);
sqlite3BtreeSetPageSize(aNew->pBt, -1, 4);
sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
zKey = sqlite3NameFromToken(pKey);
nKey = strlen(zKey);
}
#endif
sqliteFree(zFile);