1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +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:
drh
2008-03-20 14:03:29 +00:00
parent f653d78282
commit bb4957f858
21 changed files with 284 additions and 364 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.474 2008/03/06 09:58:50 mlcreech Exp $
** $Id: build.c,v 1.475 2008/03/20 14:03:29 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -933,11 +933,14 @@ void sqlite3AddColumn(Parse *pParse, Token *pName){
int i;
char *z;
Column *pCol;
sqlite3 *db = pParse->db;
if( (p = pParse->pNewTable)==0 ) return;
if( p->nCol+1>SQLITE_MAX_COLUMN ){
#if SQLITE_MAX_COLUMN
if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){
sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
return;
}
#endif
z = sqlite3NameFromToken(pParse->db, pName);
if( z==0 ) return;
for(i=0; i<p->nCol; i++){