mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Initial implementation of per-connection limits and the sqlite3_limit() API.
The sqllimits1.test script crashes. SQLITE_LIMIT_PAGE_COUNT and SQLITE_LIMIT_VDBE_OP are currently ignored. (CVS 4897) FossilOrigin-Name: 60c77882b2de9f6a45f8bd87c9c6a0cc613f8373
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the ATTACH and DETACH commands.
|
||||
**
|
||||
** $Id: attach.c,v 1.73 2008/03/19 21:45:51 drh Exp $
|
||||
** $Id: attach.c,v 1.74 2008/03/20 14:03:29 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -87,10 +87,10 @@ static void attachFunc(
|
||||
** * Transaction currently open
|
||||
** * Specified database name already being used.
|
||||
*/
|
||||
if( db->nDb>=SQLITE_MAX_ATTACHED+2 ){
|
||||
if( db->nDb>=db->aLimit[SQLITE_LIMIT_ATTACHED]+2 ){
|
||||
sqlite3_snprintf(
|
||||
sizeof(zErr), zErr, "too many attached databases - max %d",
|
||||
SQLITE_MAX_ATTACHED
|
||||
db->aLimit[SQLITE_LIMIT_ATTACHED]
|
||||
);
|
||||
goto attach_error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user