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:
@@ -13,7 +13,7 @@
|
||||
** interface, and routines that contribute to loading the database schema
|
||||
** from disk.
|
||||
**
|
||||
** $Id: prepare.c,v 1.79 2008/03/19 13:03:34 drh Exp $
|
||||
** $Id: prepare.c,v 1.80 2008/03/20 14:03:29 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -538,7 +538,8 @@ static int sqlite3Prepare(
|
||||
sParse.db = db;
|
||||
if( nBytes>=0 && zSql[nBytes]!=0 ){
|
||||
char *zSqlCopy;
|
||||
if( SQLITE_MAX_SQL_LENGTH>0 && nBytes>SQLITE_MAX_SQL_LENGTH ){
|
||||
int mxLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
|
||||
if( nBytes>mxLen ){
|
||||
sqlite3Error(db, SQLITE_TOOBIG, "statement too long");
|
||||
(void)sqlite3SafetyOff(db);
|
||||
return SQLITE_TOOBIG;
|
||||
|
||||
Reference in New Issue
Block a user