1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Add more code to enforce the limits specified in limits.h. (CVS 3946)

FossilOrigin-Name: c59d436095b5258d7132a432c0cb6cd5a7990d85
This commit is contained in:
drh
2007-05-08 13:58:26 +00:00
parent 4b5710e486
commit e5c941b83b
8 changed files with 51 additions and 25 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.426 2007/05/08 01:08:49 drh Exp $
** $Id: build.c,v 1.427 2007/05/08 13:58:27 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -910,6 +910,10 @@ void sqlite3AddColumn(Parse *pParse, Token *pName){
char *z;
Column *pCol;
if( (p = pParse->pNewTable)==0 ) return;
if( p->nCol+1>SQLITE_MAX_COLUMN ){
sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
return;
}
z = sqlite3NameFromToken(pName);
if( z==0 ) return;
for(i=0; i<p->nCol; i++){