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

Begin implementing a new system of upper bounds on the capabilities

of SQLite.  By clearly defining the upper bounds, we make those
upper bounds explicitly testable.  This check-in is just infrastructure.
The upper bounds are not yet enforced. (CVS 3941)

FossilOrigin-Name: 93b623b232a43f78d2c90bfa2389dd5b28ad7280
This commit is contained in:
drh
2007-05-08 01:08:49 +00:00
parent 02d858364b
commit c797d4dccd
18 changed files with 633 additions and 465 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.58 2007/05/04 13:15:56 drh Exp $
** $Id: attach.c,v 1.59 2007/05/08 01:08:49 drh Exp $
*/
#include "sqliteInt.h"
@@ -83,9 +83,10 @@ static void attachFunc(
** * Transaction currently open
** * Specified database name already being used.
*/
if( db->nDb>=MAX_ATTACHED+2 ){
if( db->nDb>=SQLITE_MAX_ATTACHED+2 ){
sqlite3_snprintf(
sizeof(zErr), zErr, "too many attached databases - max %d", MAX_ATTACHED
sizeof(zErr), zErr, "too many attached databases - max %d",
SQLITE_MAX_ATTACHED
);
goto attach_error;
}
@@ -125,7 +126,7 @@ static void attachFunc(
** it to obtain the database schema. At this point the schema may
** or may not be initialised.
*/
rc = sqlite3BtreeFactory(db, zFile, 0, MAX_PAGES, &aNew->pBt);
rc = sqlite3BtreeFactory(db, zFile, 0, SQLITE_DEFAULT_CACHE_SIZE, &aNew->pBt);
if( rc==SQLITE_OK ){
aNew->pSchema = sqlite3SchemaGet(aNew->pBt);
if( !aNew->pSchema ){